On Wed, Jun 10, 2015 at 9:06 AM, Jakub Jelinek <ja...@redhat.com> wrote: > On Wed, Jun 10, 2015 at 08:06:08AM +0200, Uros Bizjak wrote: >> > If -mx32 is a non-issue here, then perhaps my initial patch is good enough? >> >> It looks to me, that if you detect and record zero-extended UNSPEC_TP, >> your original patch would also handle -mx32. >> >> Can you please repost your original patch with the above addition? > > I've managed to come up with a testcase that ICEs on -mx32 (with > -maddress-mode=long, with the default UNSPEC_TP seems to be always loaded > separately), and this version fixes even that, ok for trunk/5/4.9/4.8? > > 2015-06-10 Jakub Jelinek <ja...@redhat.com> > > PR target/66470 > * config/i386/i386.c (ix86_split_long_move): For collisions > involving direct tls segment refs, move the UNSPEC_TP possibly > wrapped in ZERO_EXTEND out of the address for lea, to each of > the memory loads. > > * gcc.dg/tls/pr66470.c: New test. > * gcc.target/i386/pr66470.c: New test.
Yes, this patch is OK for mainline and release branches. Thanks, Uros.