[Bug middle-end/110791] [12/13/14 Regression] arm: Wrong code with -Os -march=armv8.1-m.main
wilco at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 24 15:14:11 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110791
Wilco <wilco at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Component|rtl-optimization |middle-end
Status|UNCONFIRMED |NEW
--- Comment #6 from Wilco <wilco at gcc dot gnu.org> ---
(In reply to Alex Coplan from comment #5)
> Thanks Wilco for the simpler example.
>
> It seems to have started with
> r13-1268-g8c99e307b20c502e55c425897fb3884ba8f05882 with both of these
> testcases, but it's probably a latent issue elsewhere (since it doesn't seem
> to show up on other targets). Needs more analysis.
The bug happens on all targets with -fmodulo-sched -Os, eg. AArch64:
bug:
sub x2, x1, x0
add x2, x2, 1
cmp x0, x1
bhi .L7
cmn x0, #1
bne .L9
.L7:
mov x2, 1
.L9:
subs x2, x2, #1
beq .L1
ldrb w0, [x1, -1]
cmp w0, 47
beq .L6
.L1:
ret
.L6:
sub x1, x1, #1
b .L9
More information about the Gcc-bugs
mailing list