Move more functionality over to LLVMContext.
[oota-llvm.git] / lib / Transforms / Scalar / SimplifyLibCalls.cpp
index a2f9a82f334e2a877db86b61fb2afc69a2b747e5..8a28ca23b1b2c78bd997fd53eb196666a2447759 100644 (file)
@@ -1225,7 +1225,7 @@ struct VISIBILITY_HIDDEN AbsOpt : public LibCallOptimization {
     // abs(x) -> x >s -1 ? x : -x
     Value *Op = CI->getOperand(1);
     Value *Pos = B.CreateICmpSGT(Op, 
-                             Context->getConstantIntAllOnesValue(Op->getType()),
+                             Context->getAllOnesValue(Op->getType()),
                                  "ispos");
     Value *Neg = B.CreateNeg(Op, "neg");
     return B.CreateSelect(Pos, Op, Neg);