diff options
author | Richard Biener <rguenther@suse.de> | 2016-06-01 10:33:35 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-06-01 10:33:35 +0000 |
commit | 4618c453205f1812b32967312a845a66a1194495 (patch) | |
tree | 2d7310dadd055735f6b4ca5fc1c0cec9f8c7e6a3 /gcc | |
parent | a8e9f9a310c7073dbf656cf4d47b72bff4605a2d (diff) | |
download | gcc-4618c453205f1812b32967312a845a66a1194495.zip gcc-4618c453205f1812b32967312a845a66a1194495.tar.gz gcc-4618c453205f1812b32967312a845a66a1194495.tar.bz2 |
re PR tree-optimization/71311 (spec2006 test case 416.gamess fails since r235817)
2016-06-01 Richard Biener <rguenther@suse.de>
PR tree-optimization/71311
* match.pd (@0 < @1 && @0 < @2 -> @0 < min(@1,@2)): Add :c and
restrict to non-INTEGER_CST @0.
From-SVN: r236980
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/match.pd | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fc45d3511..92a4ed5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2016-06-01 Richard Biener <rguenther@suse.de> + PR tree-optimization/71311 + * match.pd (@0 < @1 && @0 < @2 -> @0 < min(@1,@2)): Add :c and + restrict to non-INTEGER_CST @0. + +2016-06-01 Richard Biener <rguenther@suse.de> + * match.pd ((A & B) - (A & ~B) -> B - (A ^ B)): Add missing :c. (relational patterns): Use :c to avoid pattern duplications. diff --git a/gcc/match.pd b/gcc/match.pd index dde6988..4d66243 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -3230,8 +3230,9 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (for op (lt le gt ge) ext (min min max max) (simplify - (bit_and (op:s @0 @1) (op:s @0 @2)) - (if (INTEGRAL_TYPE_P (TREE_TYPE (@0))) + (bit_and (op:cs @0 @1) (op:cs @0 @2)) + (if (INTEGRAL_TYPE_P (TREE_TYPE (@0)) + && TREE_CODE (@0) != INTEGER_CST) (op @0 (ext @1 @2))))) (simplify |