summaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@redhat.co.uk>2000-11-27 11:43:32 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2000-11-27 11:43:32 +0000
commit70bbeb8b66198585061972bd24aca9218d0f1d87 (patch)
tree996050d394a3a35c912470ab430f5912aada4aa4 /gcc/reload1.c
parentf98251686f1e33a6698e9d118d7f1c6a600c0c23 (diff)
downloadgcc-70bbeb8b66198585061972bd24aca9218d0f1d87.tar.gz
In cselib, do not consider constants with different modes equivalent.
From-SVN: r37792
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 60eac681ddf..44ff84ecaa5 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -8093,7 +8093,7 @@ reload_cse_simplify_set (set, insn)
/* ??? */
old_cost = rtx_cost (src, SET);
- val = cselib_lookup (src, VOIDmode, 0);
+ val = cselib_lookup (src, GET_MODE (SET_DEST (set)), 0);
if (! val)
return 0;
for (l = val->locs; l; l = l->next)
@@ -8178,8 +8178,11 @@ reload_cse_simplify_operands (insn)
CLEAR_HARD_REG_SET (equiv_regs[i]);
/* cselib blows up on CODE_LABELs. Trying to fix that doesn't seem
- right, so avoid the problem here. */
- if (GET_CODE (recog_data.operand[i]) == CODE_LABEL)
+ right, so avoid the problem here. Likewise if we have a constant
+ and the insn pattern doesn't tell us the mode we need. */
+ if (GET_CODE (recog_data.operand[i]) == CODE_LABEL
+ || (CONSTANT_P (recog_data.operand[i])
+ && recog_data.operand_mode[i] == VOIDmode))
continue;
v = cselib_lookup (recog_data.operand[i], recog_data.operand_mode[i], 0);