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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Related to 5738.

Try with -Os and you will see the RTL non PRE based GCSE does most of the job:
foo_p:
        fmov    s4, 1.0e+0
        fdiv    s0, s4, s0
        fsub    s1, s1, s3
        fsub    s2, s2, s3
        fcmpe   s0, #0.0
        blt     .L6
        fmul    s4, s1, s0
        fmul    s0, s2, s0
.L4:
        fadd    s0, s4, s0
        ret
.L6:
        fmul    s4, s2, s0
        fmul    s0, s1, s0
        b       .L4

Reply via email to