this is being miscompiled by the arm64 backend with global isel:
define i32 @test1(i32 %0) {
%2 = urem i32 %0, %0
%3 = udiv i32 %2, %0
ret i32 %3
}
we want it to just return 0 (or something else that always produces 0) but we get:
regehr@john-home:~$ llc foo.ll -o - -global-isel --march=arm64
.text
.file "foo.ll"
.globl test1 // -- Begin function test1
.p2align 2
.type test1,@function
test1: // @test1
.cfi_startproc
// %bb.0:
udiv w0, w0, w0
ret
.Lfunc_end0:
.size test1, .Lfunc_end0-test1
.cfi_endproc
// -- End function
.section ".note.GNU-stack","",@progbits
regehr@john-home:~$
cc @ornata @nunoplopes @ryan-berger @nbushehri @zhengyang92 @aqjune @Hatsunespica
this is being miscompiled by the arm64 backend with global isel:
we want it to just return 0 (or something else that always produces 0) but we get:
cc @ornata @nunoplopes @ryan-berger @nbushehri @zhengyang92 @aqjune @Hatsunespica