this function should return 1:
define i32 @f() {
%1 = sub i8 -66, 0
%2 = icmp ugt i8 -31, %1
%3 = select i1 %2, i32 1, i32 0
ret i32 %3
}
however, the arm64 backend (in LLVM 14 and also top of tree) has it returning 0:
regehr@john-home:~$ ~/llvm-project/for-alive/bin/llc foo.ll -o - -march=aarch64
.text
.file "foo.ll"
.globl f // -- Begin function f
.p2align 2
.type f,@function
f: // @f
.cfi_startproc
// %bb.0:
mov w0, wzr
ret
.Lfunc_end0:
.size f, .Lfunc_end0-f
.cfi_endproc
// -- End function
.section ".note.GNU-stack","",@progbits
regehr@john-home:~$
cc @ornata @nunoplopes @ryan-berger @nbushehri @zhengyang92 @aqjune @Hatsunespica
this function should return 1:
however, the arm64 backend (in LLVM 14 and also top of tree) has it returning 0:
cc @ornata @nunoplopes @ryan-berger @nbushehri @zhengyang92 @aqjune @Hatsunespica