[PATCH] Improve cst_int_power for integer types

Andrew Pinski pinskia@physics.uc.edu
Mon Dec 20 05:19:00 GMT 2004


I noticed that a ** 3 was not being "inlined" for integer types, this 
seems
wrong.  This patch fixes that so we just don't inline the float version
or when optimizing for size.  This most likely should be tweaked further
for the optimizing for size integer case.

I saw this in mgrid which is why I thought adding -ffast-math to get
this optimization seemed weird.


OK? Build with no regression on ppc-darwin.

Thanks,
Andrew Pinski

ChangeLog:
	* trans-expr.c (gfc_conv_cst_int_power): Only check for
	flag_unsafe_math_optimizations if we have a float type.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: temp.diff.txt
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20041220/0db8886b/attachment.txt>


More information about the Fortran mailing list