Uros Bizjak <ubiz...@gmail.com> writes:
> On Tue, Jun 9, 2015 at 9:30 PM, Jakub Jelinek <ja...@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.

That's in some ways a feature though.  I don't think we want to support
multiple offsets, since that implies having more than one representation
for the same address.

Thanks,
Richard

Reply via email to