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, 4 insertions, 6 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index 3ebc803..6da910e 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -928,7 +928,7 @@ match_reload (signed char out, signed char *ins, signed char *outs,
push_to_sequence (*before);
if (inmode != outmode)
{
- if (GET_MODE_SIZE (inmode) > GET_MODE_SIZE (outmode))
+ if (partial_subreg_p (outmode, inmode))
{
reg = new_in_reg
= lra_create_new_reg_with_unique_value (inmode, in_rtx,
@@ -1579,8 +1579,7 @@ simplify_operand_subreg (int nop, machine_mode reg_mode)
bitmap_set_bit (&lra_subreg_reload_pseudos, REGNO (new_reg));
insert_before = (type != OP_OUT
- || GET_MODE_SIZE (innermode)
- > GET_MODE_SIZE (mode));
+ || partial_subreg_p (mode, innermode));
insert_after = type != OP_IN;
insert_move_for_subreg (insert_before ? &before : NULL,
insert_after ? &after : NULL,
@@ -3939,8 +3938,7 @@ curr_insn_transform (bool check_only_p)
lra_assert (out >= 0 && in >= 0
&& curr_static_id->operand[out].type == OP_OUT
&& curr_static_id->operand[in].type == OP_IN);
- rld = (GET_MODE_SIZE (GET_MODE (dest)) <= GET_MODE_SIZE (GET_MODE (src))
- ? dest : src);
+ rld = partial_subreg_p (GET_MODE (src), GET_MODE (dest)) ? src : dest;
rld_mode = GET_MODE (rld);
#ifdef SECONDARY_MEMORY_NEEDED_MODE
sec_mode = SECONDARY_MEMORY_NEEDED_MODE (rld_mode);
@@ -3950,7 +3948,7 @@ curr_insn_transform (bool check_only_p)
new_reg = lra_create_new_reg (sec_mode, NULL_RTX,
NO_REGS, "secondary");
/* If the mode is changed, it should be wider. */
- lra_assert (GET_MODE_SIZE (sec_mode) >= GET_MODE_SIZE (rld_mode));
+ lra_assert (!partial_subreg_p (sec_mode, rld_mode));
if (sec_mode != rld_mode)
{
/* If the target says specifically to use another mode for