Move more functionality over to LLVMContext.
llvm-svn: 75497
diff --git a/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp b/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp
index 24ac7bf..4116c66 100644
--- a/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp
+++ b/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp
@@ -1754,7 +1754,7 @@
switch (BO->getOpcode()) {
case Instruction::And: {
// "and i32 %a, %b" EQ -1 then %a EQ -1 and %b EQ -1
- ConstantInt *CI = ConstantInt::getAllOnesValue(Ty);
+ ConstantInt *CI = cast<ConstantInt>(Context->getAllOnesValue(Ty));
if (Canonical == CI) {
add(CI, Op0, ICmpInst::ICMP_EQ, NewContext);
add(CI, Op1, ICmpInst::ICMP_EQ, NewContext);
@@ -1892,7 +1892,7 @@
Constant *Zero = Context->getNullValue(Ty);
Constant *One = ConstantInt::get(Ty, 1);
- ConstantInt *AllOnes = ConstantInt::getAllOnesValue(Ty);
+ ConstantInt *AllOnes = cast<ConstantInt>(Context->getAllOnesValue(Ty));
switch (Opcode) {
default: break;