[Bug tree-optimization/125923] [17 regression] ICE on valid code at -O3 with "-fno-tree-dce" on x86_64-linux-gnu: in factor_out_conditional_load, at tree-ssa-phiopt.cc:3716 after r17-1704
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jun 22 17:36:12 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125923
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:
https://gcc.gnu.org/g:88b9e82a4429373468b65ccbe7fde86bec3f697b
commit r17-1755-g88b9e82a4429373468b65ccbe7fde86bec3f697b
Author: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
Date: Sun Jun 21 16:10:15 2026 -0700
phiopt: Reject instead of assert that the 2 vuse of the loads are the same
[PR125923]
So it turns out I thought we would always get a virtual phi when there was
a store
in front of the load. This is correct for all normal code except if heading
into
an infinite loop where there are no stores/loads. Since this is leading to
an infinite loop, rejecting this case does not change performance at all.
Bootstrapped and tested on x86_64-linux-gnu.
PR tree-optimization/125923
gcc/ChangeLog:
* tree-ssa-phiopt.cc (factor_out_conditional_load): Change
assert of the vuse being the same to rejecting if they are
different without a virtual phi.
gcc/testsuite/ChangeLog:
* gcc.dg/torture/pr125923-1.c: New test.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
More information about the Gcc-bugs
mailing list