No functional changes, just moving the code around to prepare the next patch. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- simplify.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/simplify.c b/simplify.c index ff2174388..e58c97c08 100644 --- a/simplify.c +++ b/simplify.c @@ -578,13 +578,14 @@ static long long check_shift_count(struct instruction *insn, unsigned long long static int simplify_or_lsr(struct instruction *insn, pseudo_t src, pseudo_t other, unsigned shift) { // src->def->opcode == OP_AND - pseudo_t src2 = src->def->src2; + struct instruction *insn2 = src->def; + pseudo_t src2 = insn2->src2; if (!constant(src2)) return 0; - if (((unsigned long long) src2->value) >> shift) - return 0; - return replace_pseudo(insn, &insn->src1, other); + if ((((unsigned long long)src2->value) >> shift) == 0) + return replace_pseudo(insn, &insn->src1, other); + return 0; } static int simplify_shift(struct instruction *insn, pseudo_t pseudo, long long 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