diff mbox

Fix gcc.dg/tree-ssa/pr18589-10.c

Message ID alpine.LSU.2.11.1604291044340.13384@t29.fhfr.qr
State New
Headers show

Commit Message

Richard Biener April 29, 2016, 8:45 a.m. UTC
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.
diff mbox

Patch

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