[Bug target/100163] -falign-loops sometimes produces invalid code for SH-2

vluchits at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Apr 20 22:25:03 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100163

--- Comment #2 from Victor Luchitz <vluchits at gmail dot com> ---
Here's relevant -S output for -O2:
...
        sub     r1,r15
        .align 2
.L186:
        mov.w   @r2,r0
        extu.w  r0,r4

And for -O2 -fno-align-loops:
...
        sub     r1,r15
.L186:
        mov.w   @r2,r0
        extu.w  r0,r4

I'm not sure what's workarounds are available for an end user here other than
to explicitly disable all kinds of alignments.


More information about the Gcc-bugs mailing list