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

--- Comment #5 from Torbjorn SVENSSON <azoff at gcc dot gnu.org> ---
(In reply to Sam James from comment #4)
> (In reply to Torbjorn SVENSSON from comment #3)
> > I'm not certain that this should be flagged as a regression since it was
> > wrong already when copysignsf3 pattern was introduced for arm back in
> > r5-5433-g3403c4c78e001d.
> 
> Did the builtin work on older GCC, or was it introduced in GCC 5?

$ gcc-arm-none-eabi-5_3-2016q1/bin/arm-none-eabi-gcc -O2 -mcpu=cortex-m3
-mthumb -mfloat-abi=soft -S t1.c -o -
...
f:
        @ args = 0, pretend = 0, frame = 0
        @ frame_needed = 0, uses_anonymous_args = 0
        @ link register save eliminated.
        cbz     r2, .L2
        mov     r0, r1
.L2:
        bx      lr


$ gcc-arm-none-eabi-4_9-2014q4/bin/arm-none-eabi-gcc -O2 -mcpu=cortex-m3
-mthumb -mfloat-abi=soft -S t1.c -o -
...
f:
        @ args = 0, pretend = 0, frame = 0
        @ frame_needed = 0, uses_anonymous_args = 0
        @ link register save eliminated.
        cbz     r2, .L2
        and     r1, r1, #-2147483648
        bic     r0, r0, #-2147483648
        orrs    r0, r0, r1
.L2:
        bx      lr


So, I suppose it is a regression.

Reply via email to