https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124746
--- Comment #14 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:bd39cdaabfe7fa17b14bd34b812982b8212fb19a commit r16-8428-gbd39cdaabfe7fa17b14bd34b812982b8212fb19a Author: Andrew Pinski <[email protected]> Date: Wed Apr 1 10:43:17 2026 -0700 phiprop: Fix speculating aggregate copies [PR124746] r16-5555-g952e145796da0f introduced a problem for aggregates. Allowing speculating non-trapping loads is ok but allowing speculating non-trapping aggregate copies is not valid as there is no ssa renaming for the lhs. So for aggregates, we need to treat it similar as a trapping load to find if it is speculating. Since we already reject 'delayed' loads for aggregates, we will skip over this load. Bootstrapped and tested on x86_64-linux-gnu. PR tree-optimization/124746 gcc/ChangeLog: * tree-ssa-phiprop.cc (propagate_with_phi): Treat and aggregate copy as it is a trapping load. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr124746-1.c: New test. Signed-off-by: Andrew Pinski <[email protected]>
