This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[spu, commit] Fix PR target/82960


Hello,

the ICE with --enable-checking=rtl reported in PR 82960 was caused by
spu.c:pad_bb using INSN_CODE on RTX with INSN_P false (specifically,
on jump_table_data).  Add checks to handle this case.

Tested on spu-elf, committed to mainline.

Bye,
Ulrich

ChangeLog:

	PR target/82960
	* config/spu/spu.c (pad_bb): Only check INSN_CODE when INSN_P is true.

Index: gcc/config/spu/spu.c
===================================================================
*** gcc/config/spu/spu.c	(revision 255408)
--- gcc/config/spu/spu.c	(working copy)
*************** pad_bb(void)
*** 2029,2036 ****
    for (; insn; insn = next_insn)
      {
        next_insn = next_active_insn (insn);
!       if (INSN_CODE (insn) == CODE_FOR_iprefetch
! 	  || INSN_CODE (insn) == CODE_FOR_hbr)
  	{
  	  if (hbr_insn)
  	    {
--- 2029,2037 ----
    for (; insn; insn = next_insn)
      {
        next_insn = next_active_insn (insn);
!       if (INSN_P (insn)
!           && (INSN_CODE (insn) == CODE_FOR_iprefetch
! 	      || INSN_CODE (insn) == CODE_FOR_hbr))
  	{
  	  if (hbr_insn)
  	    {
*************** pad_bb(void)
*** 2048,2054 ****
  	    }
  	  hbr_insn = insn;
  	}
!       if (INSN_CODE (insn) == CODE_FOR_blockage && next_insn)
  	{
  	  if (GET_MODE (insn) == TImode)
  	    PUT_MODE (next_insn, TImode);
--- 2049,2055 ----
  	    }
  	  hbr_insn = insn;
  	}
!       if (INSN_P (insn) && INSN_CODE (insn) == CODE_FOR_blockage && next_insn)
  	{
  	  if (GET_MODE (insn) == TImode)
  	    PUT_MODE (next_insn, TImode);
-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]