target/104453 - guard call folding with NULL LHS
authorRichard Biener <rguenther@suse.de>
Wed, 9 Feb 2022 07:48:35 +0000 (08:48 +0100)
committerRichard Biener <rguenther@suse.de>
Wed, 9 Feb 2022 09:07:29 +0000 (10:07 +0100)
commit1c827873ed283df282f2df11dfe0ff607e07dab3
tree49f90dce83b54ad9eeff896b4f5082439ff8c7c7
parent869fb813039e8933a85f5f2a3a53cde156030b0a
target/104453 - guard call folding with NULL LHS

This guards shift builtin folding to do nothing when there is
no LHS, similar to what other foldings do.

2022-02-09  Richard Biener  <rguenther@suse.de>

PR target/104453
* config/i386/i386.cc (ix86_gimple_fold_builtin): Guard shift
folding for NULL LHS.

* gcc.target/i386/pr104453.c: New testcase.
gcc/config/i386/i386.cc
gcc/testsuite/gcc.target/i386/pr104453.c [new file with mode: 0644]