diff mbox

Fix PR63898

Message ID alpine.LSU.2.11.1411171024240.374@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener Nov. 17, 2014, 9:25 a.m. UTC
Committed as obvious.

Richard.

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

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

Patch

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)