aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-04-25 00:40:36 +0000
committerNick Clifton <nickc@gcc.gnu.org>2000-04-25 00:40:36 +0000
commitaabb6c7408f8d51575e9cdaac5e9296d82d27b52 (patch)
tree37c99ee8398db84271209311cf3dba68f00bd517 /gcc/combine.c
parenta04678ca5666102eca111375a79c7e209663b2f1 (diff)
downloadgcc-aabb6c7408f8d51575e9cdaac5e9296d82d27b52.zip
gcc-aabb6c7408f8d51575e9cdaac5e9296d82d27b52.tar.gz
gcc-aabb6c7408f8d51575e9cdaac5e9296d82d27b52.tar.bz2
Do not try to combine a sequence of insns when the second insn has been
replaced by a note. From-SVN: r33398
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 9396959..366ada7 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -646,12 +646,21 @@ combine_instructions (f, nregs)
/* Try each sequence of three linked insns ending with this one. */
for (links = LOG_LINKS (insn); links; links = XEXP (links, 1))
- for (nextlinks = LOG_LINKS (XEXP (links, 0)); nextlinks;
- nextlinks = XEXP (nextlinks, 1))
- if ((next = try_combine (insn, XEXP (links, 0),
- XEXP (nextlinks, 0),
- &new_direct_jump_p)) != 0)
- goto retry;
+ {
+ rtx link = XEXP (links, 0);
+
+ /* If the linked insn has been replaced by a note, then there
+ is no point in persuing this chain any further. */
+ if (GET_CODE (link) == NOTE)
+ break;
+
+ for (nextlinks = LOG_LINKS (link);
+ nextlinks;
+ nextlinks = XEXP (nextlinks, 1))
+ if ((next = try_combine (insn, XEXP (links, 0),
+ XEXP (nextlinks, 0))) != 0)
+ goto retry;
+ }
#ifdef HAVE_cc0
/* Try to combine a jump insn that uses CC0