LLVM backend miscompilation
This Cmm program produces different result when compiled using the NCG and LLVM backends:
test() {
return (%zx64(%lobits16(%zx32(%lobits8((%lobits16(%shl((1 :: bits32), (45 :: bits64))) ^ (1 :: bits16)))))));
}
The NCG returns 1
while LLVM returns 0
with -O0
and 0x7ff3a69bc010
with -O1
. I believe 1
is correct.
Edited by Ben Gamari