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 <[email protected]>: https://gcc.gnu.org/g:88b9e82a4429373468b65ccbe7fde86bec3f697b commit r17-1755-g88b9e82a4429373468b65ccbe7fde86bec3f697b Author: Andrew Pinski <[email protected]> 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 <[email protected]>
