[committed,PR,target/85993] Remove dead conditional in SH target code

Message ID a9aee8d2-e740-15bf-96ab-19288e095507@redhat.com
State New
Headers show
Series
  • [committed,PR,target/85993] Remove dead conditional in SH target code
Related show

Commit Message

Jeff Law July 15, 2018, 8:30 p.m.
Per Oleg's comment in the PR, the second block is dead and should be
removed...

Committing to the trunk.   While I'm confident this won't change
anything, my tester will bootstrap sh4 & sh4eb overnight for additional
verification.

Jeff

Comments

Oleg Endo Sept. 28, 2019, 7:31 a.m. | #1
On Sun, 2018-07-15 at 14:30 -0600, Jeff Law wrote:
> 

> Per Oleg's comment in the PR, the second block is dead and should be

> removed...

> 

> Committing to the trunk.   While I'm confident this won't change

> anything, my tester will bootstrap sh4 & sh4eb overnight for

> additional

> verification.

> 


Probably irrelevant, but just for the record ...

I've just backported this patch to GCC 7 and GCC 8 branches as r276237
and r276239.

Tested briefly with "make all-gcc".

Cheers,
Oleg

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9179987e98c..c9e3f0b956d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@ 
+2018-07-15  Jeff Law  <law@redhat.com>
+
+	PR target/85993
+	* config/sh/sh.c (output_mi_thunk): Remove dead conditional
+	block.
+
 2018-07-14  Jim Wilson  <jimw@sifive.com>
 
 	* config/riscv/linux.h (TARGET_ASM_FILE_END): New.
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index a1cad42eb70..e58533c3bab 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -10890,12 +10890,6 @@  sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
 	  emit_insn (gen_add2_insn (scratch0, GEN_INT (vcall_offset)));
 	  offset_addr = scratch0;
 	}
-      else if (scratch0 != scratch1)
-	{
-	  emit_move_insn (scratch1, GEN_INT (vcall_offset));
-	  emit_insn (gen_add2_insn (scratch0, scratch1));
-	  offset_addr = scratch0;
-	}
       else
 	gcc_unreachable (); /* FIXME */
       emit_load_ptr (scratch0, offset_addr);