https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66123
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Index: tree-ssa-dom.c =================================================================== --- tree-ssa-dom.c (revision 223044) +++ tree-ssa-dom.c (working copy) @@ -2914,7 +2914,7 @@ propagate_rhs_into_lhs (gimple stmt, tre else val = gimple_goto_dest (use_stmt); - if (val && is_gimple_min_invariant (val)) + if (val && TREE_CODE (val) == INTEGER_CST) { basic_block bb = gimple_bb (use_stmt); edge te = find_taken_edge (bb, val);