VREGS fails to handle subreg of mem

Claudiu Zissulescu Claudiu.Zissulescu@synopsys.com
Mon Mar 31 12:03:00 GMT 2014


Hi,

In our ARC port, we found the following situation after expand:

(insn 23 22 24 5 (set (reg:SI 176)
        (subreg:SI (mem/c:DI (plus:SI (reg/f:SI 147 virtual-stack-vars)
                    (const_int -268 [0xfffffffffffffef4])) [3 tmpoutst.st_size+0 S8 A32]) 4)) t02.c:64 -1
     (nil))

The virtual-stack-vars should be handled by GCC's VREGS step, in instantiate_virtual_regs_in_insn(). However, this is not happening as the subroutine is not designed to handle subregs of a mem. As a consequence, virtual-stack-vars is not eliminated, and the compilation fails later on. To solve this issue, I am proposing the attached patch on vregs, that implements handling of such situation by instantiate_virtual_regs_in_insn().

Can you please let me know if this is an acceptable solution for the given issue?

//Claudiu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: function.c.patch
Type: application/octet-stream
Size: 2169 bytes
Desc: function.c.patch
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20140331/1c0669ea/attachment.obj>


More information about the Gcc mailing list