--- mem2reg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mem2reg.c b/mem2reg.c index bb5fadbf2..e27739701 100644 --- a/mem2reg.c +++ b/mem2reg.c @@ -86,6 +86,7 @@ static int find_dominating_parents(struct symbol *sym, struct instruction *insn, { pseudo_t pseudo = sym->pseudo; struct basic_block *parent; + pseudo_t dom; if (!bb->parents) return !!local; @@ -105,6 +106,7 @@ static int find_dominating_parents(struct symbol *sym, struct instruction *insn, } if (!dominance) continue; + dom = one->target; goto found_dominator; } END_FOR_EACH_PTR_REVERSE(one); no_dominance: @@ -117,7 +119,7 @@ no_dominance: continue; found_dominator: - add_pseudo(dominators, one->target); + add_pseudo(dominators, dom); } END_FOR_EACH_PTR(parent); return 1; } -- 2.14.0 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html