This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[spu, commit] Fix PR target/82960
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 8 Dec 2017 12:36:02 +0100 (CET)
- Subject: [spu, commit] Fix PR target/82960
- Authentication-results: sourceware.org; auth=none
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