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] Fix gcc.dg/tree-ssa/pr18589-10.c


The following adjusts gcc.dg/tree-ssa/pr18589-10.c after my match.pd
patch to add

+ /* Simplify powi(x,y) * powi(z,y) -> powi(x*z,y). */
+ (simplify
+  (mult (POWI:s @0 @1) (POWI:s @2 @1))
+   (POWI (mult @0 @2) @1))

which now generates one multiplication less (assembly is the same).

Committed to trunk.

Richard.

2016-04-29  Richard Biener  <rguenther@suse.de>

	* gcc.dg/tree-ssa/pr18589-10.c: Adjust.

Index: gcc/testsuite/gcc.dg/tree-ssa/pr18589-10.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/pr18589-10.c	(revision 235621)
+++ gcc/testsuite/gcc.dg/tree-ssa/pr18589-10.c	(working copy)
@@ -7,4 +7,4 @@ double baz (double x, double y, double z
 	  * __builtin_pow (z, 4.0));
 }
 
-/* { dg-final { scan-tree-dump-times " \\* " 5 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \\* " 4 "optimized" } } */


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