In simplify_cast(), the sizes of the instructions are compared to test if the cast is a truncating one or not. But now that we have finer grained cast instructions, this is not needed as we can simply test if the opcode is OP_TRUNC. 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 68195d5f9..94acd5670 100644 --- a/simplify.c +++ b/simplify.c @@ -992,7 +992,7 @@ static int simplify_cast(struct instruction *insn) switch (def_opcode(src)) { case OP_AND: /* A cast of a AND might be a no-op.. */ - if (def->size >= size) { + if (insn->opcode == OP_TRUNC) { pseudo_t val = def->src2; if (val->type == PSEUDO_VAL) { unsigned long long value = val->value; -- 2.18.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