On Wed, 15 Jan 2025, Jakub Jelinek wrote:

> On Wed, Jan 15, 2025 at 11:46:28AM +0100, Jakub Jelinek wrote:
> > BTW, I think we don't optimize returns-arg stuff like that at least right
> > now, and if we did, it wouldn't be through IPA-VRP, most of the returns-arg
> > functions actually return a pointer, not integer and for prange we just
> > track constant values, not say address of something.
> 
> I think for RA, perhaps we could add a REG_EQUIV note to the call insns
> which return singleton value range and let CSE etc. deal with that.

So in case we expand from _1 = foo (); this looks sensible - add
a REG_EQUAL with the constant.  But for the other way around I'm
not sure where to attach such note?  Expand the LHS of the call
anyway and add it on the then unused set pseudo?

Richard.

Reply via email to