diff mbox

Fix crossing jumps in functions with forced_labels (PR rtl-optimization/57763)

Message ID 20140118095958.GP892@tucnak.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek Jan. 18, 2014, 9:59 a.m. UTC
On Fri, Jan 17, 2014 at 09:31:00AM +0100, Jakub Jelinek wrote:
> 2014-01-17  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR rtl-optimization/57763
> 	* bb-reorder.c (fix_crossing_unconditional_branches): Set JUMP_LABEL
> 	on the new indirect jump_insn.

Eric requested LABEL_NUSES increment and after looking at the RTL dump, I
agree with that.  Uros has kindly bootstrapped/regtested this again on
alpha-linux and I've (uselessly) bootstrapped/regtested it on x86_64-linux
and i686-linux.  Ok for trunk?

2014-01-18  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/57763
	* bb-reorder.c (fix_crossing_unconditional_branches): Set JUMP_LABEL
	on the new indirect jump_insn and increment LABEL_NUSES (label).



	Jakub

Comments

Eric Botcazou Jan. 19, 2014, 10:17 a.m. UTC | #1
> 2014-01-18  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR rtl-optimization/57763
> 	* bb-reorder.c (fix_crossing_unconditional_branches): Set JUMP_LABEL
> 	on the new indirect jump_insn and increment LABEL_NUSES (label).

OK, thanks.
diff mbox

Patch

--- gcc/bb-reorder.c.jj	2014-01-16 20:12:54.596006095 +0100
+++ gcc/bb-reorder.c	2014-01-17 10:27:59.330134746 +0100
@@ -2183,6 +2183,9 @@  fix_crossing_unconditional_branches (voi
 	      emit_insn_before (indirect_jump_sequence, last_insn);
 	      delete_insn (last_insn);
 
+	      JUMP_LABEL (jump_insn) = label;
+	      LABEL_NUSES (label)++;
+
 	      /* Make BB_END for cur_bb be the jump instruction (NOT the
 		 barrier instruction at the end of the sequence...).  */