https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80054
--- Comment #4 from Bill Schmidt <wschmidt at gcc dot gnu.org> --- PRE creates a situation where a conditional SLSR candidate depends on a PHI that occurs prior to the basis for the candidate. SLSR doesn't notice this and eventually creates a phi basis that is not dominated by the true basis, leading to a use of an undefined variable. The fix will be to test whether the basis dominates all PHIs and their PHI argument definitions, and avoid the optimization in such cases. Testing now.