Buglet in gcse.c

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Sun Jun 18 18:43:00 GMT 2000


If we have a block that starts with a CODE_LABEL and ends with a CALL_INSN
and all parameter setting insns can't be found, we cn put insns between
the CODE_LABEL and NOTE, which will cause an abort if checking is on.

Sun Jun 18 21:42:15 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* gcse.c (insert_insn_end_bb): Always put after NOTE_INSN_BASIC_BLOCK.

*** gcse.c	2000/05/25 21:38:48	1.88
--- gcse.c	2000/06/18 22:46:08
*************** insert_insn_end_bb (expr, bb, pre)
*** 4347,4354 ****
  	 the insn in the wrong basic block.  In that case, put the insn
  	 after the CODE_LABEL.  Also, respect NOTE_INSN_BASIC_BLOCK.  */
!       if (GET_CODE (insn) == CODE_LABEL)
! 	insn = NEXT_INSN (insn);
!       else if (GET_CODE (insn) == NOTE
! 	       && NOTE_LINE_NUMBER (insn) == NOTE_INSN_BASIC_BLOCK)
  	insn = NEXT_INSN (insn);
  
--- 4347,4353 ----
  	 the insn in the wrong basic block.  In that case, put the insn
  	 after the CODE_LABEL.  Also, respect NOTE_INSN_BASIC_BLOCK.  */
!       while (GET_CODE (insn) == CODE_LABEL
! 	     || (GET_CODE (insn) == NOTE
! 		 && NOTE_LINE_NUMBER (insn) == NOTE_INSN_BASIC_BLOCK))
  	insn = NEXT_INSN (insn);
  


More information about the Gcc-patches mailing list