summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-08-31 22:18:43 +0000
committerSanjay Patel <spatel@rotateright.com>2016-08-31 22:18:43 +0000
commit0d70831d733f89d743ce5e4444796b834ae5797c (patch)
treece545f527a9bff9cf1839ead58e3e11bbbfca12e /llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
parent541aef4661dc19aa7eff6324756ab5f9124239de (diff)
downloadbcm5719-llvm-0d70831d733f89d743ce5e4444796b834ae5797c.tar.gz
bcm5719-llvm-0d70831d733f89d743ce5e4444796b834ae5797c.zip
[InstCombine] allow icmp (shr exact X, C2), C fold for splat constant vectors
The enhancement to foldICmpDivConstant ( http://llvm.org/viewvc/llvm-project?view=revision&revision=280299 ) allows us to remove the ConstantInt check; no other changes needed. llvm-svn: 280300
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index a5647715f31..d05b8d10e3c 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -1876,11 +1876,6 @@ Instruction *InstCombiner::foldICmpShrConstant(ICmpInst &Cmp,
if (IsAShr && (!Shr->isExact() || ShAmtVal == TypeBits - 1))
return nullptr;
- // FIXME: This check restricts this fold to scalar types.
- ConstantInt *ShAmt = dyn_cast<ConstantInt>(Shr->getOperand(1));
- if (!ShAmt)
- return nullptr;
-
// Revisit the shift (to delete it).
Worklist.Add(Shr);
OpenPOWER on IntegriCloud