This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Remove constraint on (X /[ex] A) * A -> X
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 12 Oct 2016 09:15:32 +0200 (CEST)
- Subject: [PATCH] Remove constraint on (X /[ex] A) * A -> X
- Authentication-results: sourceware.org; auth=none
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
Richard.
2016-10-12 Richard Biener <rguenther@suse.de>
* match.pd ((X /[ex] A) * A -> X): Remove unnecessary constraint
on the conversion.
Index: gcc/match.pd
===================================================================
--- gcc/match.pd (revision 241019)
+++ gcc/match.pd (working copy)
@@ -1783,10 +1783,8 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(simplify
(mult (convert1? (exact_div @0 @1)) (convert2? @2))
/* We cannot use matching captures here, since in the case of
- constants we don't see the second conversion. Look through
- a sign-changing or widening conversions. */
- (if (operand_equal_p (@1, @2, 0)
- && element_precision (@0) <= element_precision (type))
+ constants we don't see the second conversion. */
+ (if (operand_equal_p (@1, @2, 0))
(convert @0)))
/* Canonicalization of binary operations. */