> -----Original Message-----
> From: Uros Bizjak <ubiz...@gmail.com>
> Sent: Thursday, June 12, 2025 5:05 PM
> To: Cui, Lili <lili....@intel.com>
> Cc: gcc-patches@gcc.gnu.org; Liu, Hongtao <hongtao....@intel.com>;
> richard.guent...@gmail.com; Michael Matz <m...@suse.de>
> Subject: Re: [PATCH V2] x86: Enable separate shrink wrapping
> 
> On Thu, Jun 12, 2025 at 10:58 AM Uros Bizjak <ubiz...@gmail.com> wrote:
> >
> > On Thu, Jun 12, 2025 at 9:26 AM Cui, Lili <lili....@intel.com> wrote:
> > >
> > > > > @@ -7753,8 +7762,12 @@ pro_epilogue_adjust_stack (rtx dest, rtx
> > > > > src, rtx
> > > > offset,
> > > > >         add_frame_related_expr = true;
> > > > >      }
> > > > >
> > > > > +  if (crtl->shrink_wrapped_separate)  insn = emit_insn
> > > > > + (gen_rtx_SET
> > >  > > + (dest, gen_rtx_PLUS (Pmode, src, addend)));  >  > Please use
> > > ix86_expand_binary_operator here, it will correctly  > generate LEA
> > > during pro/epilogue generation. Also, please check indenting.
> > >  >
> > > Hi Uros,
> > >
> > > I'm confused here,  ix86_expand_binary_operator cannot return insn, and
> insn needs to be used later. Another thing is in ix86_expand_binary_operator,
> if !rtx_equal_p (dst, src1), it will generate clobber for it.
> >
> > Oh, I missed this condition. The original is OK, but please add a
> > comment why clobber-less LEA is required here.
> 
> BTW: Do you need to clobber memory to prevent EBP based memory access
> to get scheduled around the insn?  
> 

Yes, you are right, clobber memory is safer, this should be consistent with 
before.

Thanks,
Lili.

> Uros.

Reply via email to