When killing OP_SYMADDRs, their usage must be removed. Otherwise fake users remain and this may inhibit some memop conversions. However, in simplify_instruction() when dead_insn() is called on OP_SYMADDR the symbol's usage is ignored. Fix this by adding the missing &insn->symbol to this dead_insn(). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- simplify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simplify.c b/simplify.c index 36e34bc3e..2c29bc302 100644 --- a/simplify.c +++ b/simplify.c @@ -1217,7 +1217,7 @@ int simplify_instruction(struct instruction *insn) case OP_STORE: return simplify_memop(insn); case OP_SYMADDR: - if (dead_insn(insn, NULL, NULL, NULL)) + if (dead_insn(insn, &insn->symbol, NULL, NULL)) return REPEAT_CSE | REPEAT_SYMBOL_CLEANUP; return replace_with_pseudo(insn, insn->symbol); case OP_CAST: -- 2.17.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