Move remaining flag_unsafe_math_optimizations using simplify and match

Hurugalawadi, Naveen Naveen.Hurugalawadi@caviumnetworks.com
Tue Aug 25 03:48:00 GMT 2015


Hi,

Please find attached the remaining part of patch.

Tested the patch on AArch64 and X86 without any regressions.

Please review the patch and let me know if any modifications are required.

Thanks,
Naveen

ChangeLog

2015-08-25  Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>

	* fold-const.c (fold_binary_loc) : Move Optimize 
	root(x)*root(y)	as root(x*y) to match.pd.
	Move Optimize expN(x)*expN(y) as expN(x+y) to match.pd.
	Move Optimize pow(x,y)*pow(x,z) as pow(x,y+z) to match.pd.
	Move Optimize a/root(b/c) into a*root(c/b) to match.pd.
	Move Optimize x/expN(y) into x*expN(-y) to match.pd.

	* match.pd (mult (root:s @0) (root:s @1)): New simplifier.
	(mult (POW:s @0 @1) (POW:s @0 @2)) : New simplifier.
	(mult (exps:s @0) (exps:s @1)) : New simplifier.
	(rdiv @0 (root:s (rdiv:s @1 @2))) : New simplifier.
	(rdiv @0 (exps:s @1)) : New simplifier.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simplify-2.patch
Type: text/x-patch
Size: 4716 bytes
Desc: simplify-2.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150825/b0577a3a/attachment.bin>


More information about the Gcc-patches mailing list