diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2004-02-17 22:07:51 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@gcc.gnu.org> | 2004-02-17 22:07:51 +0000 |
commit | db33236e403545fe17a58c2c6b9e854b6da232ec (patch) | |
tree | 89b22e8b379997542e1eaaf88a11e7c7254da0c8 /gcc/combine.c | |
parent | e4c6167fec4df608a4ddc25e2947e14e21a77831 (diff) | |
download | gcc-db33236e403545fe17a58c2c6b9e854b6da232ec.zip gcc-db33236e403545fe17a58c2c6b9e854b6da232ec.tar.gz gcc-db33236e403545fe17a58c2c6b9e854b6da232ec.tar.bz2 |
combine.c (simplify_if_then_else): Do not replace (if_then_else (ne reg 0) (0) (const_int)) by (reg) if...
ChangeLog:
* combine.c (simplify_if_then_else): Do not replace
(if_then_else (ne reg 0) (0) (const_int)) by (reg) if the
modes differ.
testsuite/ChangeLog:
* gcc.dg/20040217-1.c: New test.
From-SVN: r77988
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 14cd64b..3cf8ae0 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -4930,6 +4930,7 @@ simplify_if_then_else (rtx x) /* (IF_THEN_ELSE (NE REG 0) (0) (8)) is REG for nonzero_bits (REG) == 8. */ if (true_code == NE && XEXP (cond, 1) == const0_rtx && false_rtx == const0_rtx && GET_CODE (true_rtx) == CONST_INT + && GET_MODE (XEXP (cond, 0)) == mode && (INTVAL (true_rtx) & GET_MODE_MASK (mode)) == nonzero_bits (XEXP (cond, 0), mode) && (i = exact_log2 (INTVAL (true_rtx) & GET_MODE_MASK (mode))) >= 0) |