[llvm-commits] [llvm] r122331 - /llvm/trunk/lib/Analysis/InstructionSimplify.cpp
Duncan Sands
baldrick at free.fr
Tue Dec 21 06:48:48 PST 2010
Author: baldrick
Date: Tue Dec 21 08:48:48 2010
New Revision: 122331
URL: http://llvm.org/viewvc/llvm-project?rev=122331&view=rev
Log:
Fix inverted condition noticed by Frits van Bommel.
Modified:
llvm/trunk/lib/Analysis/InstructionSimplify.cpp
Modified: llvm/trunk/lib/Analysis/InstructionSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstructionSimplify.cpp?rev=122331&r1=122330&r2=122331&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InstructionSimplify.cpp (original)
+++ llvm/trunk/lib/Analysis/InstructionSimplify.cpp Tue Dec 21 08:48:48 2010
@@ -491,7 +491,7 @@
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 @@
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 @@
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.
More information about the llvm-commits
mailing list