https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81083
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Patch I am testing: Index: gcc/tree-ssa-sccvn.c =================================================================== --- gcc/tree-ssa-sccvn.c (revision 249145) +++ gcc/tree-ssa-sccvn.c (working copy) @@ -2035,7 +2035,9 @@ vn_reference_lookup_3 (ao_ref *ref, tree ops[1] = bitsize_int (ref->size); ops[2] = bitsize_int (offset - offset2); tree val = vn_nary_build_or_lookup (rcode, vr->type, ops); - if (val) + if (val + && (TREE_CODE (val) != SSA_NAME + || ! SSA_NAME_OCCURS_IN_ABNORMAL_PHI (val))) { vn_reference_t res = vn_reference_lookup_or_insert_for_pieces (vuse, vr->set, vr->type, vr->operands, val);