summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/Reassociate.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-13 20:58:05 +0000
committerOwen Anderson <resistor@mac.com>2009-07-13 20:58:05 +0000
commit542619e6d56d97e40b22b0876f6ca57f61112169 (patch)
tree79db7a82031449710a7cdb8fa0dbe3fe356bea01 /llvm/lib/Transforms/Scalar/Reassociate.cpp
parent74a0ba15d335ee53eccdb091a8d905c0cc2d3055 (diff)
downloadbcm5719-llvm-542619e6d56d97e40b22b0876f6ca57f61112169.tar.gz
bcm5719-llvm-542619e6d56d97e40b22b0876f6ca57f61112169.zip
Move more functionality over to LLVMContext.
llvm-svn: 75497
Diffstat (limited to 'llvm/lib/Transforms/Scalar/Reassociate.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/Reassociate.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp
index 054e09d3c5b..6465fc1b96e 100644
--- a/llvm/lib/Transforms/Scalar/Reassociate.cpp
+++ b/llvm/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());
}
}
}
OpenPOWER on IntegriCloud