@@ -824,7 +824,7 @@ static int simplify_seteq_setne(struct instruction *insn, long long value)
return 0;
}
-static int simplify_and_or_mask(struct instruction *insn, pseudo_t and, pseudo_t other, unsigned long long mask)
+static int simplify_and_or_mask(pseudo_t and, unsigned long long mask)
{
struct instruction *def = and->def;
unsigned long long omask, nmask;
@@ -835,8 +835,6 @@ static int simplify_and_or_mask(struct instruction *insn, pseudo_t and, pseudo_t
nmask = omask & mask;
if (nmask == omask)
return 0;
- if (nmask == 0)
- return replace_pseudo(insn, &insn->src1, other);
def->src2 = value_pseudo(nmask);
return REPEAT_CSE;
}
@@ -860,9 +858,9 @@ static int simplify_constant_mask(struct instruction *insn, unsigned long long m
src1 = def->src1;
src2 = def->src2;
if (def_opcode(src1) == OP_AND)
- return simplify_and_or_mask(insn, src1, src2, mask);
+ return simplify_and_or_mask(src1, mask);
if (def_opcode(src2) == OP_AND)
- return simplify_and_or_mask(insn, src2, src1, mask);
+ return simplify_and_or_mask(src2, mask);
break;
case OP_ZEXT:
osize = def->orig_type->bit_size;