From 0d70831d733f89d743ce5e4444796b834ae5797c Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Wed, 31 Aug 2016 22:18:43 +0000 Subject: [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 --- llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'llvm/lib') 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(Shr->getOperand(1)); - if (!ShAmt) - return nullptr; - // Revisit the shift (to delete it). Worklist.Add(Shr); -- cgit v1.2.3