From c293be1a19d6213249aa9707f75003d83a03962d Mon Sep 17 00:00:00 2001 From: Bill Schmidt Date: Tue, 9 Dec 2014 23:02:06 +0000 Subject: [PATCH] re PR middle-end/64225 (-funsafe-math-optimizations generates call to pow where multiply instruction would do) 2014-12-09 Bill Schmidt PR middle-end/64225 * tree-ssa-reassoc.c (acceptable_pow_call): Disable transformation for BUILT_IN_POW when flag_errno_math is present. From-SVN: r218546 --- gcc/ChangeLog | 6 ++++++ gcc/tree-ssa-reassoc.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cbef2f2693a..ce5183523cb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-12-09 Bill Schmidt + + PR middle-end/64225 + * tree-ssa-reassoc.c (acceptable_pow_call): Disable transformation + for BUILT_IN_POW when flag_errno_math is present. + 2014-12-09 Ilya Verbin * lto-wrapper.c (compile_offload_image): Start processing in_argv diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index 68a67b65f53..4fae8fcad70 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -3988,6 +3988,9 @@ acceptable_pow_call (gimple stmt, tree *base, HOST_WIDE_INT *exponent) switch (DECL_FUNCTION_CODE (fndecl)) { CASE_FLT_FN (BUILT_IN_POW): + if (flag_errno_math) + return false; + *base = gimple_call_arg (stmt, 0); arg1 = gimple_call_arg (stmt, 1); -- 2.30.2