From cafe096b4078bb18ff8e9fad8cfdca5ad0b49191 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Thu, 1 May 2003 02:33:13 +0000 Subject: Merge from rewrite branch. From-SVN: r66318 --- gcc/combine.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'gcc/combine.c') diff --git a/gcc/combine.c b/gcc/combine.c index f7c9852..6e3bbb2 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -1437,7 +1437,7 @@ cant_combine_insn_p (insn) /* Never combine loads and stores involving hard regs that are likely to be spilled. The register allocator can usually handle such - reg-reg moves by tying. If we allow the combiner to make + reg-reg moves by tying. If we allow the combiner to make substitutions of likely-spilled regs, we may abort in reload. As an exception, we allow combinations involving fixed regs; these are not available to the register allocator so there's no risk involved. */ @@ -10159,6 +10159,14 @@ gen_lowpart_for_combine (mode, x) if (GET_MODE (x) == mode) return x; + /* Return identity if this is a CONST or symbolic + reference. */ + if (mode == Pmode + && (GET_CODE (x) == CONST + || GET_CODE (x) == SYMBOL_REF + || GET_CODE (x) == LABEL_REF)) + return x; + /* We can only support MODE being wider than a word if X is a constant integer or has a mode the same size. */ @@ -10242,6 +10250,8 @@ gen_lowpart_for_combine (mode, x) { sub_mode = int_mode_for_mode (mode); x = gen_lowpart_common (sub_mode, x); + if (x == 0) + return gen_rtx_CLOBBER (VOIDmode, const0_rtx); } res = simplify_gen_subreg (mode, x, sub_mode, offset); if (res) -- cgit v1.1