aboutsummaryrefslogtreecommitdiff
path: root/gcc/simplify-rtx.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2005-02-07 05:39:05 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2005-02-07 05:39:05 +0000
commitb1a224073ea134943717c8dcdbbfb5ce004a418a (patch)
treec31c203ba0f2e2ce0750bf38cb96677a0d2330d0 /gcc/simplify-rtx.c
parent149056b0940ecede19695c936984a3bb8a6f1764 (diff)
downloadgcc-b1a224073ea134943717c8dcdbbfb5ce004a418a.zip
gcc-b1a224073ea134943717c8dcdbbfb5ce004a418a.tar.gz
gcc-b1a224073ea134943717c8dcdbbfb5ce004a418a.tar.bz2
re PR rtl-optimization/19800 (mmix-knuth-mmixware broken, building newlib/libm/common/s_fmax.c)
PR rtl-optimization/19800 * simplify_rtx.c (simplify_relational_operaration_1): Explicitly call gen_lowpart_common and gen_lowpart_SUBREG instead of calling gen_lowpart. From-SVN: r94691
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r--gcc/simplify-rtx.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index f23dba7..a92fc3c 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -2888,9 +2888,17 @@ simplify_relational_operation_1 (enum rtx_code code, enum machine_mode mode,
&& cmp_mode != VOIDmode
&& nonzero_bits (op0, cmp_mode) == 1
&& STORE_FLAG_VALUE == 1)
- return GET_MODE_SIZE (mode) > GET_MODE_SIZE (cmp_mode)
- ? simplify_gen_unary (ZERO_EXTEND, mode, op0, cmp_mode)
- : gen_lowpart (mode, op0);
+ {
+ 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 NULL_RTX;
}