On Wed, Nov 26, 2014 at 2:00 PM, Andrew Pinski <pins...@gmail.com> wrote: > Hi, > The problem here is lra_substitute_pseudo calls gen_rtx_SUBREG with > a VOIDmode (const_int) argument but really it should not be calling > gen_rtx_SUBREG directly instead it should be using > gen_lowpart_if_possible. This patch fixes that and adds a testcase > that had happened on x86_64.
I forgot to say I ran into this issue first on aarch64-linux-gnu while building libgo. Thanks, Andrew > > OK? I bootstrapped and tested this on both aarch64-linux-gnu and > x86_64-linux-gnu with no regression on either. > > Thanks, > Andrew Pinski > > ChangeLog: > * lra.c (lra_substitute_pseudo): Use gen_lowpart_if_possible > instead of gen_rtx_SUBREG/gen_lowpart_SUBREG. > > testsuite/ChangeLog: > > * gcc.dg/pr64061.c: New testcase.