summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-08 03:38:26 +0000
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-08 03:38:26 +0000
commit632e21759952448dc8dc08ea24478f1990d7d6b9 (patch)
tree7db421c076fd06b7d2b5e6245315fae25a27e846 /gcc
parentb6e523e9e19ec63086ec9fa6eb68d4aa24f3ac72 (diff)
downloadppe42-gcc-632e21759952448dc8dc08ea24478f1990d7d6b9.tar.gz
ppe42-gcc-632e21759952448dc8dc08ea24478f1990d7d6b9.zip
* simplify-rtx.c (simplify_relational_operation_1): Avoid creating
zero extensions of BImode operands. Call lowpart_subreg instead of gen_lowpart_common and gen_lowpart_SUBREG. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94730 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/simplify-rtx.c15
2 files changed, 10 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index adc920625ea..fbd956b273d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-02-07 Roger Sayle <roger@eyesopen.com>
+
+ * simplify-rtx.c (simplify_relational_operation_1): Avoid creating
+ zero extensions of BImode operands. Call lowpart_subreg instead
+ of gen_lowpart_common and gen_lowpart_SUBREG.
+
2005-02-07 Nathanael Nerode <neroden@gcc.gnu.org>
PR ada/19489
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index a92fc3c71c6..95735e6f4cd 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -2886,19 +2886,12 @@ simplify_relational_operation_1 (enum rtx_code code, enum machine_mode mode,
&& op1 == const0_rtx
&& GET_MODE_CLASS (mode) == MODE_INT
&& cmp_mode != VOIDmode
+ && cmp_mode != BImode
&& nonzero_bits (op0, cmp_mode) == 1
&& STORE_FLAG_VALUE == 1)
- {
- rtx tmp;
- if (GET_MODE_SIZE (mode) > GET_MODE_SIZE (cmp_mode))
- return simplify_gen_unary (ZERO_EXTEND, mode, op0, cmp_mode);
- tmp = gen_lowpart_common (mode, op0);
- if (tmp)
- return tmp;
- if (GET_MODE (op0) != mode)
- return gen_lowpart_SUBREG (mode, op0);
- return op0;
- }
+ return GET_MODE_SIZE (mode) > GET_MODE_SIZE (cmp_mode)
+ ? simplify_gen_unary (ZERO_EXTEND, mode, op0, cmp_mode)
+ : lowpart_subreg (mode, op0, cmp_mode);
return NULL_RTX;
}
OpenPOWER on IntegriCloud