This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix ix86_split_long_move collision handling with TLS (PR target/66470)
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 10 Jun 2015 08:06:08 +0200
- Subject: Re: [PATCH] Fix ix86_split_long_move collision handling with TLS (PR target/66470)
- Authentication-results: sourceware.org; auth=none
- References: <20150609115739 dot GZ10247 at tucnak dot redhat dot com> <CAFULd4aqtXddc6HGnMgXbnhkcGmXEH6jrFjrOmLsZOW7X0KaLQ at mail dot gmail dot com> <20150609125703 dot GA10247 at tucnak dot redhat dot com> <CAFULd4Zv0yo6tRWE8WvW9OqAs8U-kf=woHnAWLWwB9KBBDzoAA at mail dot gmail dot com> <20150609133905 dot GB10247 at tucnak dot redhat dot com> <CAFULd4ZVP0UVe7SzGk0aZLMcJ3qfQ=-TThK03GR5_FbB7U=_LQ at mail dot gmail dot com> <20150609142638 dot GC10247 at tucnak dot redhat dot com> <CAFULd4bScM-5osEKdbTiZDHV47+Hm+7OBW28HC7NxAwZP_VvDg at mail dot gmail dot com> <20150609162132 dot GE10247 at tucnak dot redhat dot com> <CAFULd4ag80XLNrt0SP=fB8B=ywM=A2k6rP31=VSzz+x7b4mBAQ at mail dot gmail dot com> <20150609193050 dot GF10247 at tucnak dot redhat dot com>
On Tue, Jun 9, 2015 at 9:30 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Tue, Jun 09, 2015 at 08:09:28PM +0200, Uros Bizjak wrote:
>> Please find attach a patch that takes your idea slightly further. We
>> find perhaps zero-extended UNSPEC_TP, and copy it for further use. At
>> its place, we simply slap const0_rtx. We know that address to
>
> Is that safe? I mean, the address, even if offsetable, can have some
> immediate already (seems e.g. the offsettable_memref_p predicate just checks
> you can plus_constant some small integer and be recognized again) and if you
> turn the %gs: into a const0_rtx, it would fail next decompose.
> And when you already have the PLUS which has UNSPEC_TP as one of its
> arguments, replacing that PLUS with the other argument is IMHO very easy.
> Perhaps you are right that there is no need to copy_rtx, supposedly
> the rtx shouldn't be shared with anything and thus can be modified in place.
Hm, you are right. I was under impression that decompose_address can
handle multiple CONST_INT addends, which is unfortunatelly not the
case.
> 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?
Thanks,
Uros.