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

Reply via email to