diff options
author | Dan Gohman <gohman@apple.com> | 2010-04-08 23:03:40 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-04-08 23:03:40 +0000 |
commit | e05678132345eb8a632362dbd320ee7d36226e67 (patch) | |
tree | 5abab0d5eea67b10e047a6b8f07c29aff47754c5 /lib/Transforms/InstCombine/InstCombineCompares.cpp | |
parent | 287df1bc0309962770b6c176f2d143795dd3cc2f (diff) |
Add variants of ult, ule, etc. which take a uint64_t RHS, for convenience.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100824 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineCompares.cpp')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineCompares.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCompares.cpp b/lib/Transforms/InstCombine/InstCombineCompares.cpp index 72fd5588d1..861cf92d28 100644 --- a/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -1325,7 +1325,7 @@ Instruction *InstCombiner::visitICmpInstWithInstAndIntCst(ICmpInst &ICI, // If we have a signed (X % (2^c)) == 0, turn it into an unsigned one. if (RHSV == 0 && isa<ConstantInt>(BO->getOperand(1)) &&BO->hasOneUse()){ const APInt &V = cast<ConstantInt>(BO->getOperand(1))->getValue(); - if (V.sgt(APInt(V.getBitWidth(), 1)) && V.isPowerOf2()) { + if (V.sgt(1) && V.isPowerOf2()) { Value *NewRem = Builder->CreateURem(BO->getOperand(0), BO->getOperand(1), BO->getName()); |