Issue 55490
Summary miscompile from arm64 backend
Labels backend:AArch64, llvm:codegen, miscompilation
Assignees
Reporter regehr
    here's a function that needs to return true:
```llvm
define i1 @f() {
  %1 = sub i4 -6, -8
  %2 = icmp ult i4 %1, 3
  ret i1 %2
}
```
however, since the 14 release the arm64 backend got a regression causing it to return false:
```console
regehr@john-home:~/tmp$ ~/clang+llvm-14.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/llc foo.ll -o - -march=arm64
	.text
	.file	"foo.ll"
	.globl	f                               // -- Begin function f
	.p2align	2
	.type	f,@function
f:                                      // @f
	.cfi_startproc
// %bb.0:
	mov	w0, #1
	ret
.Lfunc_end0:
	.size	f, .Lfunc_end0-f
	.cfi_endproc
                                        // -- End function
	.section	".note.GNU-stack","",@progbits
regehr@john-home:~/tmp$ ~/llvm-project/for-alive/bin/llc foo.ll -o - -march=arm64
	.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:~/tmp$ 
```

cc @ornata @nunoplopes @ryan-berger @nbushehri @zhengyang92 @aqjune @Hatsunespica
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to