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?

Richard.

> gcc/ChangeLog:
>         PR target/100660
>         * config/i386/i386.c (ix86_gimple_fold_builtin): Create a tmp
>         variable for lhs when it doesn't exist.
>
> gcc/testsuite/ChangeLog:
>         PR target/100660
>         * gcc.target/i386/pr100660.c: New test.
>
>
>
> --
> BR,
> Hongtao

Reply via email to