re PR tree-optimization/63898 (r217560 caused segfault building 462.libquantum from...
authorRichard Biener <rguenther@suse.de>
Mon, 17 Nov 2014 09:31:33 +0000 (09:31 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 17 Nov 2014 09:31:33 +0000 (09:31 +0000)
2014-11-17  Richard Biener  <rguenther@suse.de>

PR middle-end/63898
* match.pd: Guard X / CST -> X * CST' transform against
zero CST.

From-SVN: r217650

gcc/ChangeLog
gcc/match.pd

index 543e24b84e403e842677042710138bbcbc7bdc7b..ff93f9af5312d562fadb13ebe4c8550e94001444 100644 (file)
@@ -1,3 +1,9 @@
+2014-11-17  Richard Biener  <rguenther@suse.de>
+
+       PR middle-end/63898
+       * match.pd: Guard X / CST -> X * CST' transform against
+       zero CST.
+
 2014-11-17  Terry Guo  <terry.guo@arm.com>
 
        * config/arm/thumb1.md (*addsi3_cbranch_scratch): Updated to UAL
index 127c7d9b5e4e1cada2c05376daeac1e2d8b36283..da6599c750d29e047b7a8586b14c8438c4440014 100644 (file)
@@ -166,7 +166,8 @@ along with GCC; see the file COPYING3.  If not see
  (simplify
   (rdiv @0 cst@1)
   (if (optimize)
-   (if (flag_reciprocal_math)
+   (if (flag_reciprocal_math
+       && !real_zerop (@1))
     (with
      { tree tem = fold_binary (RDIV_EXPR, type, build_one_cst (type), @1); }
      (if (tem)