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

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 63091
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63091&action=edit
New testcase

This testcase shows the issue even on aarch64, we get an extra mov inside the
loop:
```
.L8:
        add     x1, x1, 4
        cmp     x1, x3
        beq     .L5
.L4:
        ldr     w2, [x1]
        mov     x0, x1
        cmp     w2, w4
        bne     .L8
        ret
```

vs what it was in GCC 15 (and before):
```
.L7:
        add     x0, x0, 4
        cmp     x0, x2
        beq     .L4
.L3:
        ldr     w1, [x0]
        cmp     w1, w3
        bne     .L7
        ret
```

Reply via email to