This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] allow zero_extract combines - checked in
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: echristo at redhat dot com (Eric Christopher)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 9 May 2003 16:41:48 -0400 (EDT)
- Subject: Re: [PATCH] allow zero_extract combines - checked in
> > -bash-2.05b$ /xxx/gnu/gcc-3.3/objdir/gcc/stage1/xgcc -B/xxx/gnu/gcc-3.3/objdir/gcc/stage1/ -S -O1 920501-13.c
> > 920501-13.c: In function `y':
> > 920501-13.c:1: internal compiler error: in find_free_reg, at local-alloc.c:2185
>
> Thanks. I'll look at that today or tomorrow. Sorry for the regressions.
> (The one platform I didn't have access to at the time. Figures.)
The problem is the REG_DEAD notes. Before combine, we have
(insn 6 5 7 0 0000000000000000 (set (reg:SI 69)
(mem/s:SI (plus:DI (reg/f:DI 29 %r29)
(const_int -64 [0xffffffffffffffc0])) [0+0 S4 A32])) 70 {*pa.md:2251} (nil)
(nil))
(insn 7 6 8 0 0000000000000000 (set (zero_extract:DI (subreg:DI (reg:SI 69) 0)
(const_int 32 [0x20])
(const_int 32 [0x20]))
(reg:DI 68 [ u ])) 277 {insv_64} (insn_list 5 (insn_list 6 (nil)))
(expr_list:REG_DEAD (reg:DI 68 [ u ])
(nil)))
(insn 8 7 9 0 0000000000000000 (set (mem/s:SI (plus:DI (reg/f:DI 29 %r29)
(const_int -64 [0xffffffffffffffc0])) [0+0 S4 A32])
(reg:SI 69)) 70 {*pa.md:2251} (insn_list 7 (nil))
(expr_list:REG_DEAD (reg:SI 69)
(expr_list:REG_DEAD (reg/f:DI 29 %r29)
(nil))))
After combine, we have
(insn 6 5 7 0 0000000000000000 (set (reg:SI 69)
(mem/s:SI (plus:DI (reg/f:DI 29 %r29)
(const_int -64 [0xffffffffffffffc0])) [0+0 S4 A32])) 70 {*pa.md:2251} (nil)
(nil))
(note 7 6 8 0 NOTE_INSN_DELETED)
(insn 8 7 9 0 0000000000000000 (set (mem/s:SI (plus:DI (reg/f:DI 29 %r29)
(const_int -64 [0xffffffffffffffc0])) [0+0 S4 A32])
(subreg:SI (reg:DI 68 [ u ]) 4)) 70 {*pa.md:2251} (insn_list 5 (nil))
(expr_list:REG_DEAD (reg:DI 68 [ u ])
(expr_list:REG_DEAD (reg/f:DI 29 %r29)
(nil))))
There isn't a REG_DEAD note for reg:SI 69 any longer. This causes
find_free_reg to fail because dead_index for this QTYNO is -1:
(gdb) p qty[1]
$1 = {n_refs = 1, freq = 1000, birth = 6, death = -1, size = 1,
n_calls_crossed = 0, first_reg = 69, min_class = GENERAL_REGS,
alternate_class = NO_REGS, mode = SImode, phys_reg = -1}
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)