VREGS fails to handle subreg of mem
Eric Botcazou
ebotcazou@adacore.com
Mon Mar 31 20:20:00 GMT 2014
> 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?
Very likely not, there should be no SUBREGs of MEMs after expand.
--
Eric Botcazou
More information about the Gcc
mailing list