This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: Handle pow10 like exp10 optab


 > From: Kazu Hirata <kazu@cs.umass.edu>
 > 
 > Hi Roger and Kaveh,
 > 
 > > > 	* builtins.c (expand_builtin_mathfn): Add pow10* to the
 > > > 	existing exp10* case.
 > > > 	(expand_builtin): Likewise.
 > 
 > You might be interested in knowing that these builtin optimizations
 > probably never trigger on tree-ssa.  (See PR 14541.)
 > 
 > According to Andrew Pinski and Daniel Berlin, an expression like
 > "a = log (exp (x))" is gimplified first like
 > 
 >   T = exp (x);
 >   a = log (T);
 > 
 > before fold() [CALL_EXPR] gets to see "log (exp (x))".

I see your point, and I guess something will need to be done about
that.  However FYI this particular pow10 optimization is expanded at
the RTL level irrespective of what it's argument would be.

		Thanks,
		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]