aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2023-12-13 11:34:12 +0100
committerJakub Jelinek <jakub@redhat.com>2023-12-13 11:34:12 +0100
commit02c30fdad2f46a1f7b4e30d0eff0ac275cd108a5 (patch)
tree84d643aa64f0fb6014a4d81c2d564dcf1c291714 /gcc/fortran
parent4dfc6bcabb5a040417e60cb8072e562e25974917 (diff)
downloadgcc-02c30fdad2f46a1f7b4e30d0eff0ac275cd108a5.zip
gcc-02c30fdad2f46a1f7b4e30d0eff0ac275cd108a5.tar.gz
gcc-02c30fdad2f46a1f7b4e30d0eff0ac275cd108a5.tar.bz2
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 <jakub@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.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions