This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH[2/n] Remove GENERIC stmt combining from SCCVN
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 25 Jun 2015 15:19:07 +0200 (CEST)
- Subject: [PATCH[2/n] Remove GENERIC stmt combining from SCCVN
- Authentication-results: sourceware.org; auth=none
This shows up in gcc.dg/tree-ssa/reassoc-13.c where the 'reassoc:'
case in fold_binary happily handles floats if flag_associative_math.
Thus here, too.
Bootstrap & regtest ongoing on x86_64-unknown-linux-gnu.
Richard.
2015-06-25 Richard Biener <rguenther@suse.de>
* match.pd: Allow associating FLOAT_TYPE_P when flag_associative_math.
Index: gcc/match.pd
===================================================================
--- gcc/match.pd (revision 224893)
+++ gcc/match.pd (working copy)
@@ -561,9 +578,10 @@ (define_operator_list swapped_tcc_compar
&& !TYPE_OVERFLOW_SANITIZED (type))
(convert @1)))
- /* We can't reassociate floating-point or fixed-point plus or minus
- because of saturation to +-Inf. */
- (if (!FLOAT_TYPE_P (type) && !FIXED_POINT_TYPE_P (type))
+ /* We can't reassociate floating-point unless -fassociative-math
+ or fixed-point plus or minus because of saturation to +-Inf. */
+ (if ((!FLOAT_TYPE_P (type) || flag_associative_math)
+ && !FIXED_POINT_TYPE_P (type))
/* Match patterns that allow contracting a plus-minus pair
irrespective of overflow issues. */