diff options
author | Duncan Sands <baldrick@free.fr> | 2010-12-21 14:48:48 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2010-12-21 14:48:48 +0000 |
commit | 75d289ed6201e82718343d7a36d2a2fa082f6217 (patch) | |
tree | 4dfd2e21ebd501854bf719a783ff0e51895f730f | |
parent | 82fdab335881cd90f8f7ab3ad1f1ca0bb3ee886a (diff) | |
download | external_llvm-75d289ed6201e82718343d7a36d2a2fa082f6217.zip external_llvm-75d289ed6201e82718343d7a36d2a2fa082f6217.tar.gz external_llvm-75d289ed6201e82718343d7a36d2a2fa082f6217.tar.bz2 |
Fix inverted condition noticed by Frits van Bommel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122331 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Analysis/InstructionSimplify.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Analysis/InstructionSimplify.cpp b/lib/Analysis/InstructionSimplify.cpp index df94497..157193d 100644 --- a/lib/Analysis/InstructionSimplify.cpp +++ b/lib/Analysis/InstructionSimplify.cpp @@ -491,7 +491,7 @@ static Value *SimplifyAddInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW, 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. @@ -554,7 +554,7 @@ static Value *SimplifySubInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW, 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. @@ -607,7 +607,7 @@ static Value *SimplifyMulInst(Value *Op0, Value *Op1, const TargetData *TD, 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. |