This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/24123] [4.1/4.2 Regression] Massive performance regression for -ffast-math due to the recip tree pass
- From: "bonzini at gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Jan 2006 15:30:17 -0000
- Subject: [Bug tree-optimization/24123] [4.1/4.2 Regression] Massive performance regression for -ffast-math due to the recip tree pass
- References: <bug-24123-1649@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #23 from bonzini at gnu dot org 2006-01-03 15:30 -------
> 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
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24123