This function used an early return when the test guarding the simplification failed but this make impossible to add other ones simplifications. In preparation for incoming additional simplifications, negate the test and siwtch the returns so that the early return is now a catch-all return when no simplifications can apply. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- simplify.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/simplify.c b/simplify.c index 8d3ba44f3..a9635a9fd 100644 --- a/simplify.c +++ b/simplify.c @@ -564,12 +564,11 @@ static int simplify_mask_or_and(struct instruction *insn, unsigned long long mas return 0; omask = src2->value; nmask = omask & mask; - if (nmask != 0) - return 0; - // replace OP(((A & M') | B), C) - // by OP(B, C) - // when (M' & M) == 0 - return replace_pseudo(insn, &insn->src1, orb); + if (nmask == 0) { + // if (M' & M) == 0: ((a & M') | b) -> b + return replace_pseudo(insn, &insn->src1, orb); + } + return 0; } /// -- 2.18.0