public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-5770] sel-sched-ir: Add missing call to `onlyjump_p'
@ 2020-12-05 18:28 Maciej W. Rozycki
  0 siblings, 0 replies; only message in thread
From: Maciej W. Rozycki @ 2020-12-05 18:28 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:4ec78ef4837eab9b7ce3f20d7f7b39c8a2f1e41c

commit r11-5770-g4ec78ef4837eab9b7ce3f20d7f7b39c8a2f1e41c
Author: Maciej W. Rozycki <macro@linux-mips.org>
Date:   Sat Dec 5 18:26:24 2020 +0000

    sel-sched-ir: Add missing call to `onlyjump_p'
    
    Do not try to remove a conditional jump if it has side effects.
    
            gcc/
            * sel-sched-ir.c (maybe_tidy_empty_bb): Only try to remove a
            conditional jump if `onlyjump_p'.

Diff:
---
 gcc/sel-sched-ir.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index c8e086e4950..2bcd398391b 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -3793,7 +3793,8 @@ maybe_tidy_empty_bb (basic_block bb)
 	  else if (single_succ_p (pred_bb) && any_condjump_p (BB_END (pred_bb)))
 	    {
 	      /* If possible, try to remove the unneeded conditional jump.  */
-	      if (INSN_SCHED_TIMES (BB_END (pred_bb)) == 0
+	      if (onlyjump_p (BB_END (pred_bb))
+		  && INSN_SCHED_TIMES (BB_END (pred_bb)) == 0
 		  && !IN_CURRENT_FENCE_P (BB_END (pred_bb)))
 		{
 		  if (!sel_remove_insn (BB_END (pred_bb), false, false))


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-05 18:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-05 18:28 [gcc r11-5770] sel-sched-ir: Add missing call to `onlyjump_p' Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).