re PR middle-end/64225 (-funsafe-math-optimizations generates call to pow where multi...
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Tue, 9 Dec 2014 23:02:06 +0000 (23:02 +0000)
committerWilliam Schmidt <wschmidt@gcc.gnu.org>
Tue, 9 Dec 2014 23:02:06 +0000 (23:02 +0000)
2014-12-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

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
gcc/tree-ssa-reassoc.c

index cbef2f2693a073e829b9626f64df7552a8d829cf..ce5183523cbc06fbe45b3694c86fad06b15c5b34 100644 (file)
@@ -1,3 +1,9 @@
+2014-12-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       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  <ilya.verbin@intel.com>
 
        * lto-wrapper.c (compile_offload_image): Start processing in_argv
index 68a67b65f53eeed8b8e061c4272cdd65ca1c98df..4fae8fcad7089c5d2332a39222bac8b197e5ecd5 100644 (file)
@@ -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);