summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-01-04 06:19:11 +0000
committerBill Wendling <isanbard@gmail.com>2009-01-04 06:19:11 +0000
commit0c04f9fdc361e93351af2ed78a541882c80df431 (patch)
tree4c50a1a72a7417a9a4da2a3c62cfba3fd7893e44 /llvm
parenta0979b24d39d88f8240056110f201dbf98d7b703 (diff)
downloadbcm5719-llvm-0c04f9fdc361e93351af2ed78a541882c80df431.tar.gz
bcm5719-llvm-0c04f9fdc361e93351af2ed78a541882c80df431.zip
Revert this transform. It was causing some dramatic slowdowns in a few tests. See PR3266.
llvm-svn: 61623
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 39c48c3b438..b1474cca843 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -4880,37 +4880,6 @@ Instruction *InstCombiner::visitXor(BinaryOperator &I) {
if (FCmpInst *FCI = dyn_cast<FCmpInst>(Op0))
return new FCmpInst(FCI->getInversePredicate(),
FCI->getOperand(0), FCI->getOperand(1));
-
- // xor (or (cmp x,m),(cmp y,n)),true --> and (!cmp x,m),(!cmp y,n)
- //
- // Proof:
- // Let A = (cmp x,m)
- // Let B = (cmp y,n)
- // Let C = (or A, B)
- // C true implies that either A, B, or both are true.
- //
- // (xor C, true) is true only if C is false. We can then apply de
- // Morgan's law. QED.
- BinaryOperator *Op0I = dyn_cast<BinaryOperator>(Op0);
- if (Op0I) {
- Value *A, *B;
- if (match(Op0I, m_Or(m_Value(A), m_Value(B)))) {
- ICmpInst *AOp = dyn_cast<ICmpInst>(A);
- ICmpInst *BOp = dyn_cast<ICmpInst>(B);
-
- if (AOp && BOp) {
- ICmpInst *NewA = new ICmpInst(AOp->getInversePredicate(),
- AOp->getOperand(0),
- AOp->getOperand(1));
- InsertNewInstBefore(NewA, I);
- ICmpInst *NewB = new ICmpInst(BOp->getInversePredicate(),
- BOp->getOperand(0),
- BOp->getOperand(1));
- InsertNewInstBefore(NewB, I);
- return BinaryOperator::CreateAnd(NewA, NewB);
- }
- }
- }
}
// fold (xor(zext(cmp)), 1) and (xor(sext(cmp)), -1) to ext(!cmp).
OpenPOWER on IntegriCloud