aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/Reassociate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Scalar/Reassociate.cpp')
-rw-r--r--lib/Transforms/Scalar/Reassociate.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp
index 054e09d..6465fc1 100644
--- a/lib/Transforms/Scalar/Reassociate.cpp
+++ b/lib/Transforms/Scalar/Reassociate.cpp
@@ -201,7 +201,7 @@ static BinaryOperator *isReassociableOp(Value *V, unsigned Opcode) {
static Instruction *LowerNegateToMultiply(Instruction *Neg,
std::map<AssertingVH<>, unsigned> &ValueRankMap,
LLVMContext *Context) {
- Constant *Cst = Context->getConstantIntAllOnesValue(Neg->getType());
+ Constant *Cst = Context->getAllOnesValue(Neg->getType());
Instruction *Res = BinaryOperator::CreateMul(Neg->getOperand(1), Cst, "",Neg);
ValueRankMap.erase(Neg);
@@ -626,7 +626,7 @@ Value *Reassociate::OptimizeExpression(BinaryOperator *I,
return Context->getNullValue(X->getType());
} else if (Opcode == Instruction::Or) { // ...|X|~X = -1
++NumAnnihil;
- return Context->getConstantIntAllOnesValue(X->getType());
+ return Context->getAllOnesValue(X->getType());
}
}
}