https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68799
--- Comment #9 from Bill Schmidt <wschmidt at gcc dot gnu.org> --- It appears that the stmt_cand_map, which is a hash_map from gimple*s to candidates, must be getting overwritten. At the time things go south, we have done a lookup on the var _1338 using base_cand_from_table., which finds the SSA_NAME_DEF_STMT for _1338 and looks up the corresponding candidate in the table. I've verified that _1338 is defined by a PHI that's present in block 197, and that candidate 274 in the table represents that PHI, at the time of failure. So the only way that we return NULL from base_cand_from_table must be because the mapping from the PHI to candidate 274 is no longer in the hash_map.