https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112962

--- Comment #17 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:02c30fdad2f46a1f7b4e30d0eff0ac275cd108a5

commit r14-6485-g02c30fdad2f46a1f7b4e30d0eff0ac275cd108a5
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Wed Dec 13 11:34:12 2023 +0100

    i386: Fix ICE on __builtin_ia32_pabsd128 without lhs [PR112962]

    The following patch fixes ICE on the testcase in similar way to how
    other folded builtins are handled in ix86_gimple_fold_builtin when
    they don't have a lhs; these builtins are const or pure, so normally
    DCE would remove them later, but with -O0 that isn't guaranteed to
    happen, and during expansion if they are marked TREE_SIDE_EFFECTS
    it might still be attempted to be expanded.
    This removes them right away during the folding.

    Initially I wanted to also change all gsi_replace last args in that
function
    to true, but Andrew pointed to PR107209, so I've kept them as is.

    2023-12-13  Jakub Jelinek  <ja...@redhat.com>

            PR target/112962
            * config/i386/i386.cc (ix86_gimple_fold_builtin): For shifts
            and abs without lhs replace with nop.

            * gcc.target/i386/pr112962.c: New test.

Reply via email to