[Bug middle-end/67124] [6 Regression] wrong code at -O1, -O2 and -O3 on x86_64-linux-gnu
rsandifo at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Aug 6 18:56:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67124
--- Comment #6 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
(In reply to Uroš Bizjak from comment #5)
> Wrong expansion, adding CC.
The expand code looks OK to me. Assigning to one DImode word
of a TImode isn't supposed to change the other half.
I think the problem is in LRA. It tries to reload the low half
of the TImode as follows:
Creating newreg=104, assigning class NO_REGS to secondary r104
51: r104:DI=r103:DI
Inserting the sec. move after:
52: r90:TI#0=r104:DI
then allocates it as an xmm<-mem move:
Choosing alt 14 in insn 52: (0) *v (1) m {*movdi_internal}
That isn't right because the move won't preserve the high half
of the xmm register. It would need to be a strict_lowpart to do that.
More information about the Gcc-bugs
mailing list