aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-10-10 10:57:01 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1993-10-10 10:57:01 -0400
commitff12fdac9b0679941912411b85263c7eba027a64 (patch)
tree433c8d35c3299fdc0cfe39525335b624c54c54d7 /gcc/combine.c
parent888184ea7e1da391c8cf8ae43923461c4b384629 (diff)
downloadgcc-ff12fdac9b0679941912411b85263c7eba027a64.zip
gcc-ff12fdac9b0679941912411b85263c7eba027a64.tar.gz
gcc-ff12fdac9b0679941912411b85263c7eba027a64.tar.bz2
(subst, case SUREG):Only call force_to_mode if both inner and output
modes are MODE_INT. From-SVN: r5709
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index abc224c..4d05b01 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -3177,11 +3177,13 @@ subst (x, from, to, in_dest, unique_copy)
)
return gen_lowpart_for_combine (mode, SUBREG_REG (x));
- /* If we are narrowing the object, we need to see if we can simplify
- the expression for the object knowing that we only need the
+ /* If we are narrowing an integral object, we need to see if we can
+ simplify the expression for the object knowing that we only need the
low-order bits. */
- if (GET_MODE_SIZE (mode) < GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))
+ if (GET_MODE_CLASS (mode) == MODE_INT
+ && GET_MODE_CLASS (GET_MODE (SUBREG_REG (x))) == MODE_INT
+ && GET_MODE_SIZE (mode) < GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))
&& subreg_lowpart_p (x))
return force_to_mode (SUBREG_REG (x), mode, GET_MODE_MASK (mode),
NULL_RTX);