On Fri, Mar 16, 2012 at 2:18 PM, Bernd Schmidt <ber...@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.


> Bernd

Reply via email to