diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1992-06-27 15:45:24 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1992-06-27 15:45:24 -0400 |
commit | 02f4ada4da5583b290c2e66351512b5076aa5061 (patch) | |
tree | 13a85b22473ae64537fa44cd9f0497a26df54518 /gcc | |
parent | 47545f760f61285a89ccb88bf784ba2527c418b4 (diff) | |
download | gcc-02f4ada4da5583b290c2e66351512b5076aa5061.zip gcc-02f4ada4da5583b290c2e66351512b5076aa5061.tar.gz gcc-02f4ada4da5583b290c2e66351512b5076aa5061.tar.bz2 |
*** empty log message ***
From-SVN: r1316
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/combine.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index eeea4bc..922e6c6 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -1483,6 +1483,7 @@ try_combine (i3, i2, i1) /* If I2DEST is a hard register or the only use of a pseudo, we can change its mode. */ if (GET_MODE (SET_DEST (newpat)) != GET_MODE (i2dest) + && GET_MODE (SET_DEST (newpat)) != VOIDmode && (REGNO (i2dest) < FIRST_PSEUDO_REGISTER || (reg_n_sets[REGNO (i2dest)] == 1 && ! added_sets_2 && ! REG_USERVAR_P (i2dest)))) @@ -2952,6 +2953,18 @@ subst (x, from, to, in_dest, unique_copy) GET_MODE_BITSIZE (mode) - 1); goto restart; } + + /* If we are adding two things that have no bits in common, convert + the addition into an IOR. This will often be further simplified, + for example in cases like ((a & 1) + (a & 2)), which can + become a & 3. */ + + if ((significant_bits (XEXP (x, 0), mode) + & significant_bits (XEXP (x, 1), mode)) == 0) + { + x = gen_binary (IOR, mode, XEXP (x, 0), XEXP (x, 1)); + goto restart; + } break; case MINUS: @@ -2966,18 +2979,6 @@ subst (x, from, to, in_dest, unique_copy) - INTVAL (XEXP (XEXP (x, 1), 1)) - 1); goto restart; } - - /* If we are adding two things that have no bits in common, convert - the addition into an IOR. This will often be further simplified, - for example in cases like ((a & 1) + (a & 2)), which can - become a & 3. */ - - if ((significant_bits (XEXP (x, 0), mode) - & significant_bits (XEXP (x, 1), mode)) == 0) - { - x = gen_binary (IOR, mode, XEXP (x, 0), XEXP (x, 1)); - goto restart; - } break; case MULT: |