aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-07-15 06:08:15 +0000
committerChris Lattner <sabre@nondot.org>2011-07-15 06:08:15 +0000
commitc73b24db5f6226ed44ebc44ce1c25bb357206623 (patch)
tree90c8c745f068ecbe1b3f739c5fde0190fa646331 /lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
parentb447387726ff94ddb2a23408f39e22714c42f79b (diff)
start using the new helper methods a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135251 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineMulDivRem.cpp')
-rw-r--r--lib/Transforms/InstCombine/InstCombineMulDivRem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp b/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
index 2d29403097..630a6fee39 100644
--- a/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
+++ b/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
@@ -691,14 +691,14 @@ Instruction *InstCombiner::visitSRem(BinaryOperator &I) {
bool hasNegative = false;
for (unsigned i = 0; !hasNegative && i != VWidth; ++i)
if (ConstantInt *RHS = dyn_cast<ConstantInt>(RHSV->getOperand(i)))
- if (RHS->getValue().isNegative())
+ if (RHS->isNegative())
hasNegative = true;
if (hasNegative) {
std::vector<Constant *> Elts(VWidth);
for (unsigned i = 0; i != VWidth; ++i) {
if (ConstantInt *RHS = dyn_cast<ConstantInt>(RHSV->getOperand(i))) {
- if (RHS->getValue().isNegative())
+ if (RHS->isNegative())
Elts[i] = cast<ConstantInt>(ConstantExpr::getNeg(RHS));
else
Elts[i] = RHS;