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  <rguent...@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" } } */

Reply via email to