return Constant::getAllOnesValue(Op0->getType());
/// i1 add -> xor.
- if (!MaxRecurse && Op0->getType()->isIntegerTy(1))
+ if (MaxRecurse && Op0->getType()->isIntegerTy(1))
return SimplifyXorInst(Op0, Op1, TD, DT, MaxRecurse-1);
// Try some generic simplifications for associative operations.
return X;
/// i1 sub -> xor.
- if (!MaxRecurse && Op0->getType()->isIntegerTy(1))
+ if (MaxRecurse && Op0->getType()->isIntegerTy(1))
return SimplifyXorInst(Op0, Op1, TD, DT, MaxRecurse-1);
// Mul distributes over Sub. Try some generic simplifications based on this.
return Op0;
/// i1 mul -> and.
- if (!MaxRecurse && Op0->getType()->isIntegerTy(1))
+ if (MaxRecurse && Op0->getType()->isIntegerTy(1))
return SimplifyAndInst(Op0, Op1, TD, DT, MaxRecurse-1);
// Try some generic simplifications for associative operations.