https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93056
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
-O3 is worse:
.p2align 3,,7
.L2:
add x5, x0, x3, sxtw 2
ldr w6, [x0, w3, sxtw 2]
add w4, w3, 1
sub w7, w3, #1
ldr w5, [x5, -4]
lsl w4, w4, 1
cmp w5, w6
blt .L3
str w5, [x0, w1, sxtw 2]
lsl w3, w3, 1
cmp w2, w3
mov w1, w7
bgt .L2
.L5:
mov w0, 0
ret
.p2align 2,,3
.L3:
str w6, [x0, w1, sxtw 2]
cmp w2, w4
mov w1, w3
mov w3, w4
bgt .L2
