On Thu, May 20, 2021 at 10:06:36AM +0200, Richard Biener wrote:
> On Thu, May 20, 2021 at 8:54 AM Hongtao Liu <crazy...@gmail.com> wrote:
> >
> > Hi:
> >   In folding target-specific builtin, when lhs is NULL, create a
> > temporary variable for it.
> >   Bootstrapped and regtested on x86_64-linux-gnu{-m32,}
> 
> I would suggest to drop the stmt or leave it unfolded instead.
> Note dropping would mean replacing it with a GIMPLE_NOP
> (gimple_build_nop ()).  But creating a new unused LHS certainly
> works as well.
> 
> Jakub, any preference?

Yeah, nop would be my preference too.

Though, maybe even better would be make sure the builtin is const and
just punt on folding it if lhs is missing?
Then the middle-end should DCE those when lhs is gone.

        Jakub

Reply via email to