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]

[PATCH] Improve cst_int_power for integer types


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.

Attachment: temp.diff.txt
Description: Text document


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