Committed as obvious.

Richard.

2014-11-17  Richard Biener  <rguent...@suse.de>

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

Index: gcc/match.pd
===================================================================
--- gcc/match.pd        (revision 217647)
+++ gcc/match.pd        (working copy)
@@ -166,7 +166,8 @@ (define_operator_list inverted_tcc_compa
  (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)

Reply via email to