summaryrefslogtreecommitdiff
path: root/gcc/integrate.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/integrate.c')
-rw-r--r--gcc/integrate.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c
index 9b7a4e74d51..ff9d33f20c4 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -2411,19 +2411,14 @@ subst_constants (loc, insn, map, memonly)
valid. We handle two cases: extracting a full word in an
integral mode and extracting the low part. */
subst_constants (&inner, NULL_RTX, map, 0);
-
- if (GET_MODE_CLASS (GET_MODE (x)) == MODE_INT
- && GET_MODE_SIZE (GET_MODE (x)) == UNITS_PER_WORD
- && GET_MODE (SUBREG_REG (x)) != VOIDmode)
- new = operand_subword (inner, SUBREG_BYTE (x) / UNITS_PER_WORD,
- 0, GET_MODE (SUBREG_REG (x)));
-
- cancel_changes (num_changes);
- if (new == 0 && subreg_lowpart_p (x))
- new = gen_lowpart_common (GET_MODE (x), inner);
+ new = simplify_gen_subreg (GET_MODE (x), inner,
+ GET_MODE (SUBREG_REG (x)),
+ SUBREG_BYTE (x));
if (new)
validate_change (insn, loc, new, 1);
+ else
+ cancel_changes (num_changes);
return;
}