summaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorechristo <echristo@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-01 02:33:13 +0000
committerechristo <echristo@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-01 02:33:13 +0000
commitc9e1a04882fddc9c536ec918781f4ce178956a78 (patch)
tree737ec79a7682fc9ba6748959af7ccb8ed03d759d /gcc/combine.c
parentea780751e87a2e34dfb447eab1eed34cfe2e46b1 (diff)
downloadgcc-c9e1a04882fddc9c536ec918781f4ce178956a78.tar.gz
Merge from rewrite branch.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66318 138bc75d-0d04-0410-961f-82ee72b054a4
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 f7c98526833..6e3bbb2fb56 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)