diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2015-05-14 16:45:33 +0200 |
---|---|---|
committer | Marc Glisse <glisse@gcc.gnu.org> | 2015-05-14 14:45:33 +0000 |
commit | aea417d748969d87d4973a34e055f40ce4a1d739 (patch) | |
tree | 3f458e1179a5b2faa934d97e293a20431f09ecda /gcc/match.pd | |
parent | ddbd742bf84e7ed28d9d37d2c7b4cc9f3d7d05c0 (diff) | |
download | gcc-aea417d748969d87d4973a34e055f40ce4a1d739.zip gcc-aea417d748969d87d4973a34e055f40ce4a1d739.tar.gz gcc-aea417d748969d87d4973a34e055f40ce4a1d739.tar.bz2 |
generic-match-head.c (types_match): Handle non-types.
2015-05-14 Marc Glisse <marc.glisse@inria.fr>
gcc/
* generic-match-head.c (types_match): Handle non-types.
* gimple-match-head.c (types_match): Likewise.
* match.pd: Remove unnecessary TREE_TYPE for types_match.
From-SVN: r223199
Diffstat (limited to 'gcc/match.pd')
-rw-r--r-- | gcc/match.pd | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/match.pd b/gcc/match.pd index 51a950a..fffe694 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -289,7 +289,7 @@ along with GCC; see the file COPYING3. If not see (if (((TREE_CODE (@1) == INTEGER_CST && INTEGRAL_TYPE_P (TREE_TYPE (@0)) && int_fits_type_p (@1, TREE_TYPE (@0))) - || types_match (TREE_TYPE (@0), TREE_TYPE (@1))) + || types_match (@0, @1)) /* ??? This transform conflicts with fold-const.c doing Convert (T)(x & c) into (T)x & (T)c, if c is an integer constants (if x has signed type, the sign bit cannot be set @@ -948,7 +948,7 @@ along with GCC; see the file COPYING3. If not see /* Unordered tests if either argument is a NaN. */ (simplify (bit_ior (unordered @0 @0) (unordered @1 @1)) - (if (types_match (TREE_TYPE (@0), TREE_TYPE (@1))) + (if (types_match (@0, @1)) (unordered @0 @1))) (simplify (bit_ior:c (unordered @0 @0) (unordered:c@2 @0 @1)) @@ -1068,8 +1068,8 @@ along with GCC; see the file COPYING3. If not see && TYPE_PRECISION (type) == GET_MODE_PRECISION (TYPE_MODE (type)) /* The inner conversion must be a widening conversion. */ && TYPE_PRECISION (TREE_TYPE (@2)) > TYPE_PRECISION (TREE_TYPE (@0)) - && types_match (TREE_TYPE (@0), TREE_TYPE (@1)) - && types_match (TREE_TYPE (@0), type) + && types_match (@0, @1) + && types_match (@0, type) && single_use (@4)) (if (TYPE_OVERFLOW_WRAPS (TREE_TYPE (@0))) (convert (op @0 @1))) @@ -1099,7 +1099,7 @@ along with GCC; see the file COPYING3. If not see && TYPE_PRECISION (type) == GET_MODE_PRECISION (TYPE_MODE (type)) /* The inner conversion must be a widening conversion. */ && TYPE_PRECISION (TREE_TYPE (@2)) > TYPE_PRECISION (TREE_TYPE (@0)) - && types_match (TREE_TYPE (@0), TREE_TYPE (@1)) + && types_match (@0, @1) && (tree_int_cst_min_precision (@4, UNSIGNED) <= TYPE_PRECISION (TREE_TYPE (@0))) && single_use (@5)) |