aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>2000-05-15 23:21:04 -0700
committerRichard Henderson <rth@gcc.gnu.org>2000-05-15 23:21:04 -0700
commit7f9d9ea1ff544fd1ea3a510dbafddb2d0c95472c (patch)
tree1b55b6444bd17bd7241a921e165045e73a41c3fe
parent085ce8c6aceb12dbb1fb9ba9bec6c014d65f0445 (diff)
downloadgcc-7f9d9ea1ff544fd1ea3a510dbafddb2d0c95472c.zip
gcc-7f9d9ea1ff544fd1ea3a510dbafddb2d0c95472c.tar.gz
gcc-7f9d9ea1ff544fd1ea3a510dbafddb2d0c95472c.tar.bz2
ifcvt.c (cond_exec_process_insns): Drop USE and CLOBBER insns that get in the way after reload.
* ifcvt.c (cond_exec_process_insns): Drop USE and CLOBBER insns that get in the way after reload. (cond_exec_process_if_block): Skip a label heading THEN block. From-SVN: r33923
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/ifcvt.c17
2 files changed, 23 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dd6ecb3..d867b3e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2000-05-15 Richard Henderson <rth@cygnus.com>
+ * ifcvt.c (cond_exec_process_insns): Drop USE and CLOBBER insns
+ that get in the way after reload.
+ (cond_exec_process_if_block): Skip a label heading THEN block.
+
+2000-05-15 Richard Henderson <rth@cygnus.com>
+
* varasm.c (output_constant_pool): Abort instead of converting
(improperly) deleted labels to zero.
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index f4142e2..2403651 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -197,6 +197,19 @@ cond_exec_process_insns (start, end, test, prob_val, mod_ok)
if (GET_CODE (insn) != INSN && GET_CODE (insn) != CALL_INSN)
abort ();
+ /* Remove USE and CLOBBER insns that get in the way. */
+ if (reload_completed
+ && (GET_CODE (PATTERN (insn)) == USE
+ || GET_CODE (PATTERN (insn)) == CLOBBER))
+ {
+ /* ??? Ug. Actually unlinking the thing is problematic,
+ given what we'd have to coordinate with our callers. */
+ PUT_CODE (insn, NOTE);
+ NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;
+ NOTE_SOURCE_FILE (insn) = 0;
+ goto insn_done;
+ }
+
/* Last insn wasn't last? */
if (must_be_last)
return FALSE;
@@ -288,6 +301,10 @@ cond_exec_process_if_block (test_bb, then_bb, else_bb, join_bb)
then_start = then_bb->head;
then_end = then_bb->end;
+ /* Skip a label heading THEN block. */
+ if (GET_CODE (then_start) == CODE_LABEL)
+ then_start = NEXT_INSN (then_start);
+
/* Skip a (use (const_int 0)) or branch as the final insn. */
if (GET_CODE (then_end) == INSN
&& GET_CODE (PATTERN (then_end)) == USE