aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorEric Christopher <echristo@gcc.gnu.org>2003-05-01 02:33:13 +0000
committerEric Christopher <echristo@gcc.gnu.org>2003-05-01 02:33:13 +0000
commitcafe096b4078bb18ff8e9fad8cfdca5ad0b49191 (patch)
tree737ec79a7682fc9ba6748959af7ccb8ed03d759d /gcc/combine.c
parent6481daa9711df83b9c1a3f37710cf8afbd147a1c (diff)
downloadgcc-cafe096b4078bb18ff8e9fad8cfdca5ad0b49191.zip
gcc-cafe096b4078bb18ff8e9fad8cfdca5ad0b49191.tar.gz
gcc-cafe096b4078bb18ff8e9fad8cfdca5ad0b49191.tar.bz2
Merge from rewrite branch.
From-SVN: r66318
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c12
1 files changed, 11 insertions, 1 deletions
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)