This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix gcc.dg/tree-ssa/pr18589-10.c
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 29 Apr 2016 10:45:40 +0200 (CEST)
- Subject: [PATCH] Fix gcc.dg/tree-ssa/pr18589-10.c
- Authentication-results: sourceware.org; auth=none
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" } } */