This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
init-regs pass initializes virtual-stack-vars?
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: GCC <gcc at gcc dot gnu dot org>
- Date: Sat, 16 Jun 2007 20:11:18 +0200
- Subject: init-regs pass initializes virtual-stack-vars?
Hello!
There is something strange going on, it looks that initialization of
virtual-stack-vars register in init-regs pass confuses greg. In
154r.regclass we have this sequence:
(insn 326 325 327 46 1804.c:1981 (clobber (mem/s/c:BLK (plus:DI
(reg/f:DI 54 virtual-stack-vars)
(const_int -16 [0xfffffffffffffff0])) [17 A128])) -1
(expr_list:REG_DEAD (reg/f:DI 54 virtual-stack-vars)
(nil)))
(insn 327 326 984 46 1804.c:1981 (set (mem/s/c:DI (plus:DI (reg/f:DI 20
frame)
(const_int -16 [0xfffffffffffffff0])) [3 S8 A128])
(symbol_ref/f:DI ("*.LC6") [flags 0x2] <string_cst
0x2aaaae4f5600>)) 82 {*movdi_1_rex64} (nil))
*** and in 156.r.init-regs:
(insn 997 325 326 46 (set (reg/f:DI 54 virtual-stack-vars)
(const_int 0 [0x0])) -1 (nil))
(insn 326 997 327 46 1804.c:1981 (clobber (mem/s/c:BLK (plus:DI
(reg/f:DI 54 virtual-stack-vars)
(const_int -16 [0xfffffffffffffff0])) [17 A128])) -1
(expr_list:REG_DEAD (reg/f:DI 54 virtual-stack-vars)
(nil)))
(insn 327 326 984 46 1804.c:1981 (set (mem/s/c:DI (plus:DI (reg/f:DI 20
frame)
(const_int -16 [0xfffffffffffffff0])) [3 S8 A128])
(symbol_ref/f:DI ("*.LC6") [flags 0x2] <string_cst
0x2aaaae4f5600>)) 82 {*movdi_1_rex64} (nil))
*** This leads to the failure in 172r.greg, where:
Reloads for insn # 997
Reload 0: reload_out (DI) = (reg/f:DI 54 virtual-stack-vars)
GENERAL_REGS, RELOAD_FOR_OUTPUT (opnum = 0)
reload_out_reg: (reg/f:DI 54 virtual-stack-vars)
reload_reg_rtx: (reg:DI 1 dx)
...
(insn:HI 997 325 1075 44 (set (reg:DI 1 dx)
(const_int 0 [0x0])) 82 {*movdi_1_rex64} (expr_list:REG_EQUAL
(const_int 0 [0x0])
(nil)))
(insn 1075 997 327 44 (set (reg/f:DI 54 virtual-stack-vars)
(reg:DI 1 dx)) 82 {*movdi_1_rex64} (nil))
(insn:HI 327 1075 984 44 1804.c:1981 (set (mem/s/c:DI (plus:DI (reg/f:DI
7 sp)
(const_int 96 [0x60])) [3 S8 A128])
(symbol_ref/f:DI ("*.LC6") [flags 0x2] <string_cst
0x2aaaae4f5600>)) 82 {*movdi_1_rex64} (nil))
... and compilation crashes on insn 1075 with:
1804.c:2087: error: insn does not satisfy its constraints:
(insn 1075 997 327 44 (set (reg/f:DI 54 virtual-stack-vars)
(reg:DI 1 dx)) 82 {*movdi_1_rex64} (nil))
1804.c:2087: internal compiler error: in reload_cse_simplify_operands,
at postreload.c:396
It looks that init-regs pass (new df stuff?) needs to special-case
VIRTUAL_STACK_VARS_REGNUM.
Uros.