This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Preserve pointer types in ivopts


On Fri, Mar 16, 2012 at 2:18 PM, Bernd Schmidt <bernds@codesourcery.com> wrote:
> On 03/16/2012 02:15 PM, Richard Guenther wrote:
>> Hmm, ok. ?So to have your lea represented on RTL you cannot use
>> a fancy pattern using add because it would not be an add. ?Hmm.
>> If it merely does not affect upper bits then
>>
>> ?(set (reg:SI ptr) (add (reg:SI ptr) (reg:SI off))
>>
>> might work (if Pmode aka DImode is word_mode of course - otherwise
>> the upper bits would be lost ...).
>
> It's not.
>
> Really, this isn't a problem right now. I already have a patch which
> makes a ptr_plus RTX code and handles it everywhere.

Fair enough.

>> Maybe simply dispatching through a two-mode optab for expanding
>> POINTER_PLUS_EXPRs would suit you?
>
> padd_optab, yes.
>
>> Yes, that could work. ?Though it might end up being incredibly ugly ;)
>
> In the code? Should really only change a few lines in the patch I would
> have thought. I'll get back to you when I have a new version - thanks
> for the tip.

No, in the GIMPLE IL.

Richard.

>
> Bernd


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]