This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
CHECK_DEAD_NOTES abort in sched1 for sh-elf
- From: "Sanjiv Kumar Gupta, Noida" <sanjivg at noida dot hcltech dot com>
- To: gcc at gcc dot gnu dot org, Joern Rennecke <joern dot rennecke at superh dot com>
- Date: Thu, 7 Aug 2003 18:47:58 +0530
- Subject: CHECK_DEAD_NOTES abort in sched1 for sh-elf
Hi,
For the following test case,
struct frame {
int stereo;
int single;
};
extern int a ();
int do_layer2(struct frame *fr)
{
int clip=0;
int j;
int stereo = fr->stereo;
int single = fr->single;
if(stereo == 1 || single == 3)
single = 0;
for (j=0;j<3;j++)
{
if(single >= 0)
{
clip += a();
}
}
return clip;
}
CHECK_DEAD_NOTES is getting an extra REG_DEAD note after
sched1 calls update_life_info.
Here are the rtl dumps.
test.c.20.life
---------------
(insn 114 113 115 0 test.c:16 (set (reg:SI 181)
(const_int -1 [0xffffffff])) 123 {movsi_ie} (nil)
(nil))
(insn 115 114 116 0 test.c:16 (parallel [
(set (reg:SI 180)
(neg:SI (plus:SI (reg:SI 147 t)
(reg:SI 181))))
(set (reg:SI 147 t)
(ne:SI (ior:SI (reg:SI 147 t)
(reg:SI 181))
(const_int 0 [0x0])))
]) 94 {negc} (insn_list 113 (insn_list 114 (nil)))
(expr_list:REG_DEAD (reg:SI 181)
(expr_list:REG_UNUSED (reg:SI 147 t)
(nil))))
test.c.21.combine
-----------------
(note 114 113 115 0 NOTE_INSN_DELETED)
(insn 115 114 116 0 test.c:16 (set (reg:SI 182)
(eq:SI (reg:SI 147 t)
(const_int 1 [0x1]))) 212 {movt} (insn_list 113 (nil))
(nil))
test.c.24.sched
-----------------
(insn:HI 115 113 116 0 test.c:16 (set (reg:SI 182)
(eq:SI (reg:SI 147 t)
(const_int 1 [0x1]))) 212 {movt} (insn_list 113 (nil))
(expr_list:REG_DEAD (reg:SI 147 t) --> extra REG_DEAD note. <--
(nil)))
I am not sure whether this is a problem with distribute_notes in combiner,
or update_life_info in sched1.
recompute_reg_usage before sched1 does not pass PROP_DEATH_NOTES flag to
update_life_info. But if I do that it solves the problem.
The bug can be reproduced by enabling the sched1 in sh.h.
Any pointers to this would be a great help.
Thanks
Sanjiv