summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-08-17 16:38:57 +0000
committerSanjay Patel <spatel@rotateright.com>2016-08-17 16:38:57 +0000
commit63e14a07e80fcbeea20292108be603bcd0d3fc9a (patch)
tree34ec4294bf84753a897bd2d8fe213e2ff60c53c0 /llvm/lib
parent943e92efde269162465e9125d20992965421568d (diff)
downloadbcm5719-llvm-63e14a07e80fcbeea20292108be603bcd0d3fc9a.tar.gz
bcm5719-llvm-63e14a07e80fcbeea20292108be603bcd0d3fc9a.zip
[InstCombine] use m_APInt to allow icmp (or X, Y), C folds for splat constant vectors
This is a sibling of: https://reviews.llvm.org/rL278859 https://reviews.llvm.org/rL278935 llvm-svn: 278945
Diffstat (limited to 'llvm/lib')
-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 2b80c57e3e7..5d2ed74c307 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -1882,11 +1882,6 @@ Instruction *InstCombiner::foldICmpAndConstant(ICmpInst &ICI, Instruction *LHSI,
/// Fold icmp (or X, Y), C.
Instruction *InstCombiner::foldICmpOrConstant(ICmpInst &Cmp, Instruction *Or,
const APInt *C) {
- // FIXME: This check restricts all folds under here to scalar types.
- ConstantInt *RHS = dyn_cast<ConstantInt>(Cmp.getOperand(1));
- if (!RHS)
- return nullptr;
-
ICmpInst::Predicate Pred = Cmp.getPredicate();
if (*C == 1) {
// icmp slt signum(V) 1 --> icmp slt V, 1
OpenPOWER on IntegriCloud