diff options
Diffstat (limited to 'lib/CodeGen/IntrinsicLowering.cpp')
| -rw-r--r-- | lib/CodeGen/IntrinsicLowering.cpp | 28 | 
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/CodeGen/IntrinsicLowering.cpp b/lib/CodeGen/IntrinsicLowering.cpp index eb4099964242a..707113bd973b7 100644 --- a/lib/CodeGen/IntrinsicLowering.cpp +++ b/lib/CodeGen/IntrinsicLowering.cpp @@ -113,22 +113,22 @@ void IntrinsicLowering::AddPrototypes(Module &M) {        case Intrinsic::memcpy:          M.getOrInsertFunction("memcpy",            Type::getInt8PtrTy(Context), -                              Type::getInt8PtrTy(Context),  -                              Type::getInt8PtrTy(Context),  +                              Type::getInt8PtrTy(Context), +                              Type::getInt8PtrTy(Context),                                DL.getIntPtrType(Context));          break;        case Intrinsic::memmove:          M.getOrInsertFunction("memmove",            Type::getInt8PtrTy(Context), -                              Type::getInt8PtrTy(Context),  -                              Type::getInt8PtrTy(Context),  +                              Type::getInt8PtrTy(Context), +                              Type::getInt8PtrTy(Context),                                DL.getIntPtrType(Context));          break;        case Intrinsic::memset:          M.getOrInsertFunction("memset",            Type::getInt8PtrTy(Context), -                              Type::getInt8PtrTy(Context),  -                              Type::getInt32Ty(M.getContext()),  +                              Type::getInt8PtrTy(Context), +                              Type::getInt32Ty(M.getContext()),                                DL.getIntPtrType(Context));          break;        case Intrinsic::sqrt: @@ -210,13 +210,13 @@ static Value *LowerBSWAP(LLVMContext &Context, Value *V, Instruction *IP) {                                      "bswap.5");      Value* Tmp4 = Builder.CreateLShr(V, ConstantInt::get(V->getType(), 8),                                       "bswap.4"); -    Value* Tmp3 = Builder.CreateLShr(V,  +    Value* Tmp3 = Builder.CreateLShr(V,                                       ConstantInt::get(V->getType(), 24),                                       "bswap.3"); -    Value* Tmp2 = Builder.CreateLShr(V,  +    Value* Tmp2 = Builder.CreateLShr(V,                                       ConstantInt::get(V->getType(), 40),                                       "bswap.2"); -    Value* Tmp1 = Builder.CreateLShr(V,  +    Value* Tmp1 = Builder.CreateLShr(V,                                       ConstantInt::get(V->getType(), 56),                                       "bswap.1");      Tmp7 = Builder.CreateAnd(Tmp7, @@ -274,7 +274,7 @@ static Value *LowerCTPOP(LLVMContext &Context, Value *V, Instruction *IP) {    for (unsigned n = 0; n < WordSize; ++n) {      Value *PartValue = V; -    for (unsigned i = 1, ct = 0; i < (BitSize>64 ? 64 : BitSize);  +    for (unsigned i = 1, ct = 0; i < (BitSize>64 ? 64 : BitSize);           i <<= 1, ++ct) {        Value *MaskCst = ConstantInt::get(V->getType(), MaskValues[ct]);        Value *LHS = Builder.CreateAnd(PartValue, MaskCst, "cppop.and1"); @@ -381,7 +381,7 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {    case Intrinsic::siglongjmp: {      // Insert the call to abort -    ReplaceCallWith("abort", CI, CS.arg_end(), CS.arg_end(),  +    ReplaceCallWith("abort", CI, CS.arg_end(), CS.arg_end(),                      Type::getVoidTy(Context));      break;    } @@ -392,7 +392,7 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {    case Intrinsic::bswap:      CI->replaceAllUsesWith(LowerBSWAP(Context, CI->getArgOperand(0), CI));      break; -     +    case Intrinsic::ctlz:      CI->replaceAllUsesWith(LowerCTLZ(Context, CI->getArgOperand(0), CI));      break; @@ -420,7 +420,7 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {        CI->replaceAllUsesWith(Constant::getNullValue(CI->getType()));      break;    } -     +    case Intrinsic::get_dynamic_area_offset:      errs() << "WARNING: this target does not support the custom llvm.get."                "dynamic.area.offset.  It is being lowered to a constant 0\n"; @@ -473,7 +473,7 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {    case Intrinsic::assume:    case Intrinsic::var_annotation:      break;   // Strip out these intrinsics -  +    case Intrinsic::memcpy: {      Type *IntPtr = DL.getIntPtrType(Context);      Value *Size = Builder.CreateIntCast(CI->getArgOperand(2), IntPtr,  | 
