[PATCH] D30270: [InstCombine] don't try SimplifyDemandedInstructionBits from add/sub because it's slow and unlikely to succeed
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 22 15:12:59 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL295898: [InstCombine] don't try SimplifyDemandedInstructionBits from add/sub becauseā¦ (authored by spatel).
Changed prior to commit:
https://reviews.llvm.org/D30270?vs=89402&id=89434#toc
Repository:
rL LLVM
https://reviews.llvm.org/D30270
Files:
llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp
Index: llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp
===================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp
@@ -1078,11 +1078,6 @@
// FIXME: Use the match above instead of dyn_cast to allow these transforms
// for splat vectors.
if (ConstantInt *CI = dyn_cast<ConstantInt>(RHS)) {
- // See if SimplifyDemandedBits can simplify this. This handles stuff like
- // (X & 254)+1 -> (X&254)|1
- if (SimplifyDemandedInstructionBits(I))
- return &I;
-
// zext(bool) + C -> bool ? C + 1 : C
if (ZExtInst *ZI = dyn_cast<ZExtInst>(LHS))
if (ZI->getSrcTy()->isIntegerTy(1))
@@ -1589,9 +1584,6 @@
if (match(Op1, m_Add(m_Value(X), m_Constant(C2))))
return BinaryOperator::CreateSub(ConstantExpr::getSub(C, C2), X);
- if (SimplifyDemandedInstructionBits(I))
- return &I;
-
// Fold (sub 0, (zext bool to B)) --> (sext bool to B)
if (C->isNullValue() && match(Op1, m_ZExt(m_Value(X))))
if (X->getType()->getScalarType()->isIntegerTy(1))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30270.89434.patch
Type: text/x-patch
Size: 1155 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170222/05e8f947/attachment.bin>
More information about the llvm-commits
mailing list