DontBelieveMe / helix

"Compiler Optimisation Techniques" - BSc Computer Science Final Year Project (Sheffield Hallam University)
2 stars 0 forks source link

Test f0012-integral-casts-small-to-big.c failing #29

Closed DontBelieveMe closed 2 years ago

DontBelieveMe commented 2 years ago
[2022-01-11 16:24:34.233] [general] [info] Creating module from 'C:\helix\testsuite\f0\f0012-integral-casts-small-to-big.c'
[2022-01-11 16:24:34.235] [driver] [trace] End frontend compilation
[2022-01-11 16:24:34.235] [driver] [trace] Begin middle & backend compilation
[2022-01-11 16:24:34.235] [pass_manager] [trace] Registered pass (1) 'genlegal' - [Generic] Legalise illegal constructs IR to a legal equivilant
[2022-01-11 16:24:34.235] [pass_manager] [trace] Registered pass (2) 'structslegal' - [Generic] Legalise loading & storing struct types to/from virtual registers
[2022-01-11 16:24:34.235] [pass_manager] [trace] Registered pass (3) 'retcomb' - [Generic] Combine multiple returns into a singular exit point
[2022-01-11 16:24:34.236] [pass_manager] [trace] Registered pass (4) 'genlower' - [Generic] Lower high level IR constructs
[2022-01-11 16:24:34.236] [pass_manager] [trace] Registered pass (5) 'consthoist' - [ARM] Split and hoist constants to a form compatible with the ARM
[2022-01-11 16:24:34.236] [pass_manager] [trace] Registered pass (6) 'cconv' - [ARM] Lower IR to be compatible with the platform calling convention
[2022-01-11 16:24:34.236] [pass_manager] [trace] Registered pass (7) 'lowerallocastructs' - [Generic] Lower the stack allocations of structs to arrays
[2022-01-11 16:24:34.236] [pass_manager] [trace] Registered pass (8) 'regalloc' - [ARM] Register allocation
[2022-01-11 16:24:34.236] [pass_manager] [trace] Registered pass (9) 'match' - [ARM] Matches the IR to it's machine instructions and generates machine IR
[2022-01-11 16:24:34.236] [pass_manager] [trace] Registered pass (10) 'emit' - [ARM] Matches the IR to it's machine instructions and emits it as assembly to a file
[2022-01-11 16:24:34.237] [validate] [warning] instruction 'sext' has no validation rules, ignoring
[2022-01-11 16:24:34.237] [validate] [warning] instruction 'zext' has no validation rules, ignoring
[2022-01-11 16:24:34.237] [validate] [warning] instruction 'sext' has no validation rules, ignoring
[2022-01-11 16:24:34.237] [validate] [warning] instruction 'zext' has no validation rules, ignoring
[2022-01-11 16:24:34.237] [pass_manager] [trace] Pass: genlegal
[2022-01-11 16:24:34.237] [pass_manager] [trace] Validating pass 'genlegal'
[2022-01-11 16:24:34.237] [validate] [warning] instruction 'sext' has no validation rules, ignoring
[2022-01-11 16:24:34.238] [validate] [warning] instruction 'zext' has no validation rules, ignoring
[2022-01-11 16:24:34.238] [validate] [warning] instruction 'sext' has no validation rules, ignoring
[2022-01-11 16:24:34.238] [validate] [warning] instruction 'zext' has no validation rules, ignoring
[2022-01-11 16:24:34.238] [pass_manager] [trace] Pass: structslegal
[2022-01-11 16:24:34.238] [pass_manager] [trace] Validating pass 'structslegal'
[2022-01-11 16:24:34.238] [validate] [warning] instruction 'sext' has no validation rules, ignoring
[2022-01-11 16:24:34.238] [validate] [warning] instruction 'zext' has no validation rules, ignoring
[2022-01-11 16:24:34.238] [validate] [warning] instruction 'sext' has no validation rules, ignoring
[2022-01-11 16:24:34.239] [validate] [warning] instruction 'zext' has no validation rules, ignoring
[2022-01-11 16:24:34.239] [pass_manager] [trace] Pass: retcomb
[2022-01-11 16:24:34.239] [pass_manager] [trace] Validating pass 'retcomb'
[2022-01-11 16:24:34.239] [validate] [warning] instruction 'sext' has no validation rules, ignoring
[2022-01-11 16:24:34.239] [validate] [warning] instruction 'zext' has no validation rules, ignoring
[2022-01-11 16:24:34.239] [validate] [warning] instruction 'sext' has no validation rules, ignoring
[2022-01-11 16:24:34.239] [validate] [warning] instruction 'zext' has no validation rules, ignoring
[2022-01-11 16:24:34.240] [pass_manager] [trace] Pass: genlower
[2022-01-11 16:24:34.240] [genlower] [debug] Found 0 instructions that require lowering
[2022-01-11 16:24:34.240] [genlower] [debug] Found 0 instructions that require lowering
[2022-01-11 16:24:34.240] [genlower] [debug] Found 0 instructions that require lowering
[2022-01-11 16:24:34.240] [genlower] [debug] Found 0 instructions that require lowering
[2022-01-11 16:24:34.240] [pass_manager] [trace] Validating pass 'genlower'
[2022-01-11 16:24:34.240] [validate] [warning] instruction 'sext' has no validation rules, ignoring
[2022-01-11 16:24:34.240] [validate] [warning] instruction 'zext' has no validation rules, ignoring
[2022-01-11 16:24:34.241] [validate] [warning] instruction 'sext' has no validation rules, ignoring
[2022-01-11 16:24:34.241] [validate] [warning] instruction 'zext' has no validation rules, ignoring
[2022-01-11 16:24:34.241] [pass_manager] [trace] Pass: consthoist
[2022-01-11 16:24:34.241] [pass_manager] [trace] Validating pass 'consthoist'
[2022-01-11 16:24:34.241] [validate] [warning] instruction 'sext' has no validation rules, ignoring
[2022-01-11 16:24:34.241] [validate] [warning] instruction 'zext' has no validation rules, ignoring
[2022-01-11 16:24:34.241] [validate] [warning] instruction 'sext' has no validation rules, ignoring
[2022-01-11 16:24:34.241] [validate] [warning] instruction 'zext' has no validation rules, ignoring
[2022-01-11 16:24:34.241] [pass_manager] [trace] Pass: cconv
[2022-01-11 16:24:34.241] [pass_manager] [trace] Validating pass 'cconv'
[2022-01-11 16:24:34.241] [validate] [warning] instruction 'sext' has no validation rules, ignoring
[2022-01-11 16:24:34.241] [validate] [warning] instruction 'zext' has no validation rules, ignoring
[2022-01-11 16:24:34.241] [validate] [warning] instruction 'sext' has no validation rules, ignoring
[2022-01-11 16:24:34.242] [validate] [warning] instruction 'zext' has no validation rules, ignoring
[2022-01-11 16:24:34.242] [pass_manager] [trace] Pass: lowerallocastructs
[2022-01-11 16:24:34.242] [pass_manager] [trace] Validating pass 'lowerallocastructs'
[2022-01-11 16:24:34.242] [validate] [warning] instruction 'sext' has no validation rules, ignoring
[2022-01-11 16:24:34.242] [validate] [warning] instruction 'zext' has no validation rules, ignoring
[2022-01-11 16:24:34.242] [validate] [warning] instruction 'sext' has no validation rules, ignoring
[2022-01-11 16:24:34.242] [validate] [warning] instruction 'zext' has no validation rules, ignoring
[2022-01-11 16:24:34.242] [pass_manager] [trace] Pass: regalloc
[2022-01-11 16:24:34.242] [regalloc] [debug] @ i32=4 bytes, +4
[2022-01-11 16:24:34.242] [regalloc] [debug] @ i16=2 bytes, +6
[2022-01-11 16:24:34.242] [regalloc] [debug] @ i16=2 bytes, +8
[2022-01-11 16:24:34.242] [regalloc] [debug] @ i32=4 bytes, +12
[2022-01-11 16:24:34.243] [regalloc] [debug] @ i16=2 bytes, +14
[2022-01-11 16:24:34.243] [regalloc] [debug] Result Offset: 12 (Stack Frame: 16, Var Offset: 4)
[2022-01-11 16:24:34.243] [regalloc] [debug] Result Offset: 10 (Stack Frame: 16, Var Offset: 6)
[2022-01-11 16:24:34.243] [regalloc] [debug] Result Offset: 8 (Stack Frame: 16, Var Offset: 8)
[2022-01-11 16:24:34.243] [regalloc] [debug] Result Offset: 4 (Stack Frame: 16, Var Offset: 12)
[2022-01-11 16:24:34.243] [regalloc] [debug] Result Offset: 2 (Stack Frame: 16, Var Offset: 14)
[2022-01-11 16:24:34.243] [regalloc] [debug] @ i32=4 bytes, +4
[2022-01-11 16:24:34.243] [regalloc] [debug] @ i16=2 bytes, +6
[2022-01-11 16:24:34.243] [regalloc] [debug] @ i16=2 bytes, +8
[2022-01-11 16:24:34.243] [regalloc] [debug] @ i32=4 bytes, +12
[2022-01-11 16:24:34.243] [regalloc] [debug] @ i16=2 bytes, +14
[2022-01-11 16:24:34.243] [regalloc] [debug] Result Offset: 12 (Stack Frame: 16, Var Offset: 4)
[2022-01-11 16:24:34.244] [regalloc] [debug] Result Offset: 10 (Stack Frame: 16, Var Offset: 6)
[2022-01-11 16:24:34.244] [regalloc] [debug] Result Offset: 8 (Stack Frame: 16, Var Offset: 8)
[2022-01-11 16:24:34.244] [regalloc] [debug] Result Offset: 4 (Stack Frame: 16, Var Offset: 12)
[2022-01-11 16:24:34.244] [regalloc] [debug] Result Offset: 2 (Stack Frame: 16, Var Offset: 14)
[2022-01-11 16:24:34.244] [regalloc] [debug] @ i32=4 bytes, +4
[2022-01-11 16:24:34.244] [regalloc] [debug] @ i16=2 bytes, +6
[2022-01-11 16:24:34.244] [regalloc] [debug] @ i16=2 bytes, +8
[2022-01-11 16:24:34.244] [regalloc] [debug] @ i32=4 bytes, +12
[2022-01-11 16:24:34.244] [regalloc] [debug] @ i16=2 bytes, +14
[2022-01-11 16:24:34.244] [regalloc] [debug] Result Offset: 12 (Stack Frame: 16, Var Offset: 4)
[2022-01-11 16:24:34.245] [regalloc] [debug] Result Offset: 10 (Stack Frame: 16, Var Offset: 6)
[2022-01-11 16:24:34.245] [regalloc] [debug] Result Offset: 8 (Stack Frame: 16, Var Offset: 8)
[2022-01-11 16:24:34.245] [regalloc] [debug] Result Offset: 4 (Stack Frame: 16, Var Offset: 12)
[2022-01-11 16:24:34.245] [regalloc] [debug] Result Offset: 2 (Stack Frame: 16, Var Offset: 14)
[2022-01-11 16:24:34.245] [regalloc] [debug] @ i32=4 bytes, +4
[2022-01-11 16:24:34.245] [regalloc] [debug] @ i16=2 bytes, +6
[2022-01-11 16:24:34.245] [regalloc] [debug] @ i16=2 bytes, +8
[2022-01-11 16:24:34.245] [regalloc] [debug] @ i32=4 bytes, +12
[2022-01-11 16:24:34.245] [regalloc] [debug] @ i16=2 bytes, +14
[2022-01-11 16:24:34.245] [regalloc] [debug] Result Offset: 12 (Stack Frame: 16, Var Offset: 4)
[2022-01-11 16:24:34.245] [regalloc] [debug] Result Offset: 10 (Stack Frame: 16, Var Offset: 6)
[2022-01-11 16:24:34.246] [regalloc] [debug] Result Offset: 8 (Stack Frame: 16, Var Offset: 8)
[2022-01-11 16:24:34.246] [regalloc] [debug] Result Offset: 4 (Stack Frame: 16, Var Offset: 12)
[2022-01-11 16:24:34.246] [regalloc] [debug] Result Offset: 2 (Stack Frame: 16, Var Offset: 14)
[2022-01-11 16:24:34.246] [pass_manager] [trace] Validating pass 'regalloc'
[2022-01-11 16:24:34.246] [validate] [warning] instruction 'sext' has no validation rules, ignoring
[2022-01-11 16:24:34.246] [validate] [warning] instruction 'zext' has no validation rules, ignoring
[2022-01-11 16:24:34.246] [validate] [warning] instruction 'sext' has no validation rules, ignoring
[2022-01-11 16:24:34.246] [validate] [warning] instruction 'zext' has no validation rules, ignoring
[2022-01-11 16:24:34.246] [pass_manager] [trace] Pass: match
[2022-01-11 16:24:34.246] [general] [error] Failed to match instruction 'sext [i16 -> i32], r0:i16, r1:i32'
[2022-01-11 16:24:34.246] [critical] ******************** Internal Compiler Error ********************
[2022-01-11 16:24:34.246] [critical]     Unreachable code reached (paradoxical, i know)
[2022-01-11 16:24:34.247] [critical]
[2022-01-11 16:24:34.247] [critical]     File:        C:\helix\vs2022\src\arm-md.cpp
[2022-01-11 16:24:34.247] [critical]     Line:        609
[2022-01-11 16:24:34.247] [critical]     Function:    Helix::ARMv7::Expand
[2022-01-11 16:24:34.247] [critical]     Explanation: cannot expand instruction to machine ir, check arm.md
[2022-01-11 16:24:34.247] [critical] ******************** Internal Compiler Error ********************
DontBelieveMe commented 2 years ago

This is because codegen support has not been added for sext & zext yet.

DontBelieveMe commented 2 years ago

Support for this added in 71189b0be02c153b7c7e4f413cf6f34b90059409