diff options
author | Marek Polacek <polacek@redhat.com> | 2015-06-11 10:42:44 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2015-06-11 10:42:44 +0000 |
commit | 6e28e5162a44473169a5a55ce24b9eebdfcdd3e0 (patch) | |
tree | 7e6f322565df076e73cdf41ad2004edfc332198e /gcc | |
parent | 06b8f7acf3786fafb54e402ebdf794e7ee3caa3e (diff) | |
download | gcc-6e28e5162a44473169a5a55ce24b9eebdfcdd3e0.zip gcc-6e28e5162a44473169a5a55ce24b9eebdfcdd3e0.tar.gz gcc-6e28e5162a44473169a5a55ce24b9eebdfcdd3e0.tar.bz2 |
* match.pd: Use single_use throughout.
From-SVN: r224368
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/match.pd | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 409171c..cfa86f6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2015-06-11 Marek Polacek <polacek@redhat.com> + + * match.pd: Use single_use throughout. + 2015-06-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com> * config/arm/arm.c (arm_option_params_internal): When optimising diff --git a/gcc/match.pd b/gcc/match.pd index 48358a8..33fa717 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -301,7 +301,7 @@ along with GCC; see the file COPYING3. If not see /* x + (x & 1) -> (x + 1) & ~1 */ (simplify (plus:c @0 (bit_and@2 @0 integer_onep@1)) - (if (TREE_CODE (@2) != SSA_NAME || has_single_use (@2)) + (if (single_use (@2)) (bit_and (plus @0 @1) (bit_not @1)))) /* x & ~(x & y) -> x & ~y */ @@ -309,7 +309,7 @@ along with GCC; see the file COPYING3. If not see (for bitop (bit_and bit_ior) (simplify (bitop:c @0 (bit_not (bitop:c@2 @0 @1))) - (if (TREE_CODE (@2) != SSA_NAME || has_single_use (@2)) + (if (single_use (@2)) (bitop @0 (bit_not @1))))) /* (x | y) & ~x -> y & ~x */ @@ -449,15 +449,14 @@ along with GCC; see the file COPYING3. If not see /* (x & ~m) | (y & m) -> ((x ^ y) & m) ^ x */ (simplify (bit_ior:c (bit_and:c@3 @0 (bit_not @2)) (bit_and:c@4 @1 @2)) - (if ((TREE_CODE (@3) != SSA_NAME || has_single_use (@3)) - && (TREE_CODE (@4) != SSA_NAME || has_single_use (@4))) + (if (single_use (@3) && single_use (@4)) (bit_xor (bit_and (bit_xor @0 @1) @2) @0))) /* Associate (p +p off1) +p off2 as (p +p (off1 + off2)). */ (simplify (pointer_plus (pointer_plus@2 @0 @1) @3) - (if (TREE_CODE (@2) != SSA_NAME || has_single_use (@2)) + (if (single_use (@2)) (pointer_plus @0 (plus @1 @3)))) /* Pattern match |