PR middle-end/84309
* match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
of exps and logs in the use_exp2 case.
* gcc.dg/pr84309-2.c: New test.
From-SVN: r257634
+2018-02-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/84309
+ * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
+ of exps and logs in the use_exp2 case.
+
2018-02-13 Jeff Law <law@redhat.com>
* config/rl/rl78.c (rl78_attribute_table): Fix terminator and
/* As libmvec doesn't have a vectorized exp2, defer optimizing
this until after vectorization. */
(if (canonicalize_math_after_vectorization_p ())
- (exps (mult (logs @0) @1))))))))
+ (exp2s (mult (log2s @0) @1))))))))
(for sqrts (SQRT)
cbrts (CBRT)
+2018-02-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/84309
+ * gcc.dg/pr84309-2.c: New test.
+
2018-02-12 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/84321
--- /dev/null
+/* PR middle-end/84309 */
+/* { dg-do compile } */
+/* { dg-options "-Ofast -fdump-tree-optimized" } */
+
+double
+foo (double x)
+{
+ return __builtin_pow (2.0, x);
+}
+
+/* { dg-final { scan-tree-dump "__builtin_exp2 " "optimized" { target *-*-linux* *-*-gnu* } } } */