diff options
author | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-25 21:11:46 +0000 |
---|---|---|
committer | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-25 21:11:46 +0000 |
commit | aa11e43ea145a2ba20d6d120fea31eef605bb10f (patch) | |
tree | 260e724a6feef7912abb6417fced519a0095722d /gcc/combine.c | |
parent | 708bb234cc105e3dcfb39e25387be9146d670ef7 (diff) | |
download | gcc-aa11e43ea145a2ba20d6d120fea31eef605bb10f.tar.gz |
* combine.c (simplify_comparison): Re-enable widening of comparisons
with non-paradoxical subregs of non-REG expressions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70785 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index afa25b0357d..cc7c7de156e 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -11277,9 +11277,6 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1) op1 = make_compound_operation (op1, SET); if (GET_CODE (op0) == SUBREG && subreg_lowpart_p (op0) - /* Case 3 above, to sometimes allow (subreg (mem x)), isn't - implemented. */ - && GET_CODE (SUBREG_REG (op0)) == REG && GET_MODE_CLASS (GET_MODE (op0)) == MODE_INT && GET_MODE_CLASS (GET_MODE (SUBREG_REG (op0))) == MODE_INT && (code == NE || code == EQ)) @@ -11287,8 +11284,13 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1) if (GET_MODE_SIZE (GET_MODE (op0)) > GET_MODE_SIZE (GET_MODE (SUBREG_REG (op0)))) { - op0 = SUBREG_REG (op0); - op1 = gen_lowpart_for_combine (GET_MODE (op0), op1); + /* For paradoxical subregs, allow case 1 as above. Case 3 isn't + implemented. */ + if (GET_CODE (SUBREG_REG (op0)) == REG) + { + op0 = SUBREG_REG (op0); + op1 = gen_lowpart_for_combine (GET_MODE (op0), op1); + } } else if ((GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (op0))) <= HOST_BITS_PER_WIDE_INT) |