aboutsummaryrefslogtreecommitdiff
path: root/gcc/lra-constraints.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/lra-constraints.c')
-rw-r--r--gcc/lra-constraints.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index c3bbfd7..a423f06 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -1772,10 +1772,9 @@ uses_hard_regs_p (rtx x, HARD_REG_SET set)
mode = GET_MODE (x);
if (code == SUBREG)
{
+ mode = wider_subreg_mode (x);
x = SUBREG_REG (x);
code = GET_CODE (x);
- if (GET_MODE_SIZE (GET_MODE (x)) > GET_MODE_SIZE (mode))
- mode = GET_MODE (x);
}
if (REG_P (x))
@@ -1953,10 +1952,8 @@ process_alt_operands (int only_alternative)
biggest_mode[nop] = GET_MODE (op);
if (GET_CODE (op) == SUBREG)
{
+ biggest_mode[nop] = wider_subreg_mode (op);
operand_reg[nop] = reg = SUBREG_REG (op);
- if (GET_MODE_SIZE (biggest_mode[nop])
- < GET_MODE_SIZE (GET_MODE (reg)))
- biggest_mode[nop] = GET_MODE (reg);
}
if (! REG_P (reg))
operand_reg[nop] = NULL_RTX;
@@ -5659,8 +5656,7 @@ invariant_p (const_rtx x)
{
x = SUBREG_REG (x);
code = GET_CODE (x);
- if (GET_MODE_SIZE (GET_MODE (x)) > GET_MODE_SIZE (mode))
- mode = GET_MODE (x);
+ mode = wider_subreg_mode (mode, GET_MODE (x));
}
if (MEM_P (x))