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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index d716ee4..e739a46 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -250,6 +250,7 @@ in_class_p (rtx reg, enum reg_class cl, enum reg_class *new_class,
{
enum reg_class rclass, common_class;
machine_mode reg_mode;
+ rtx src;
int class_size, hard_regno, nregs, i, j;
int regno = REGNO (reg);
@@ -265,6 +266,7 @@ in_class_p (rtx reg, enum reg_class cl, enum reg_class *new_class,
}
reg_mode = GET_MODE (reg);
rclass = get_reg_class (regno);
+ src = curr_insn_set != NULL ? SET_SRC (curr_insn_set) : NULL;
if (regno < new_regno_start
/* Do not allow the constraints for reload instructions to
influence the classes of new pseudos. These reloads are
@@ -273,12 +275,10 @@ in_class_p (rtx reg, enum reg_class cl, enum reg_class *new_class,
where other reload pseudos are no longer allocatable. */
|| (!allow_all_reload_class_changes_p
&& INSN_UID (curr_insn) >= new_insn_uid_start
- && curr_insn_set != NULL
- && ((OBJECT_P (SET_SRC (curr_insn_set))
- && ! CONSTANT_P (SET_SRC (curr_insn_set)))
- || (GET_CODE (SET_SRC (curr_insn_set)) == SUBREG
- && OBJECT_P (SUBREG_REG (SET_SRC (curr_insn_set)))
- && ! CONSTANT_P (SUBREG_REG (SET_SRC (curr_insn_set)))))))
+ && src != NULL
+ && ((REG_P (src) || MEM_P (src))
+ || (GET_CODE (src) == SUBREG
+ && (REG_P (SUBREG_REG (src)) || MEM_P (SUBREG_REG (src)))))))
/* When we don't know what class will be used finally for reload
pseudos, we use ALL_REGS. */
return ((regno >= new_regno_start && rclass == ALL_REGS)