[Bug tree-optimization/24123] [4.1/4.2 Regression] Massive performance regression for -ffast-math due to the recip tree pass

paolo dot bonzini at lu dot unisi dot ch gcc-bugzilla@gcc.gnu.org
Wed Jan 4 16:29:00 GMT 2006



------- Comment #25 from paolo dot bonzini at lu dot unisi dot ch  2006-01-04 16:29 -------
Subject: Re:  [4.1/4.2 Regression] Massive performance
 regression for -ffast-math due to the recip tree pass


>For PowerPC, it is effective to use the instruction if
>there are multiple divides, such as the three divisions mentioned above.  The
>IBM XLC compiler propagates the reciprocal and numerator pair through its
>equivalent to RTL.
>  
>
I am not sure I follow you.  I see two questions, but it could be that 
you asked neither:

1) You want to use the reciprocal instruction instead of a FP divide.  
This could be done in the expander, or with a new RECIP_EXPR tree code.  
I'd rather do the former.

2) Multiplying by the result of the reciprocal instruction always 
provides the exact result of the division, so you want to enable the 
pass always.  It could be possible to parameterize the recip pass on a 
separate -fdivide-by-reciprocals flag, turned on by 
-funsafe-math-optimization, but also always turned on in 
config/rs6000/rs6000.c

Paolo


-- 


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




More information about the Gcc-bugs mailing list