[Bug optimization/13219] -fgcse pessimizes double complex calculation

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Nov 28 17:33:00 GMT 2003


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-11-28 17:33 -------
I can confirm this on the mainline on powerpc-apple-darwin (where there are plenty of registers):
-O1:
        fmul f13,f12,f12
        fmsub f13,f11,f11,f13
        fmul f0,f11,f12
        fadd f0,f0,f0
        fadd f11,f13,f8
        fadd f12,f0,f9
        fmul f0,f12,f12
        fmadd f0,f11,f11,f0
        fcmpu cr7,f0,f10
        cror 30,29,30
        beq- cr7,L3
        addi r2,r2,1
        cmpwi cr7,r2,255
        ble+ cr7,L7

-O1 -fgcse:
        fmul f0,f12,f12
        fmsub f0,f11,f11,f0
        fmul f13,f11,f12
        fadd f13,f13,f13
        fadd f0,f0,f8
        fadd f13,f13,f9
        fmr f11,f0
        fmr f12,f13
        fmul f13,f13,f13
        fmadd f0,f0,f0,f13
        fcmpu cr7,f0,f10
        cror 30,29,30
        beq- cr7,L3
        addi r2,r2,1
        cmpwi cr7,r2,255
        ble+ cr7,L7
See the extra fmr that is the problem.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|c                           |optimization
     Ever Confirmed|                            |1
           Keywords|                            |pessimizes-code
   Last reconfirmed|0000-00-00 00:00:00         |2003-11-28 17:33:42
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13219



More information about the Gcc-bugs mailing list