Get rid of one more non-DebugLoc getNode and
[oota-llvm.git] / lib / CodeGen / IntrinsicLowering.cpp
index 7c549bc9a184357aafbe940d75603ead151d283f..e893a06699c33ab6c85f3448876f87cd7f37011f 100644 (file)
@@ -98,22 +98,19 @@ void IntrinsicLowering::AddPrototypes(Module &M) {
         EnsureFunctionExists(M, "abort", I->arg_end(), I->arg_end(),
                              Type::VoidTy);
         break;
-      case Intrinsic::memcpy_i32:
-      case Intrinsic::memcpy_i64:
+      case Intrinsic::memcpy:
         M.getOrInsertFunction("memcpy", PointerType::getUnqual(Type::Int8Ty),
                               PointerType::getUnqual(Type::Int8Ty), 
                               PointerType::getUnqual(Type::Int8Ty), 
                               TD.getIntPtrType(), (Type *)0);
         break;
-      case Intrinsic::memmove_i32:
-      case Intrinsic::memmove_i64:
+      case Intrinsic::memmove:
         M.getOrInsertFunction("memmove", PointerType::getUnqual(Type::Int8Ty),
                               PointerType::getUnqual(Type::Int8Ty), 
                               PointerType::getUnqual(Type::Int8Ty), 
                               TD.getIntPtrType(), (Type *)0);
         break;
-      case Intrinsic::memset_i32:
-      case Intrinsic::memset_i64:
+      case Intrinsic::memset:
         M.getOrInsertFunction("memset", PointerType::getUnqual(Type::Int8Ty),
                               PointerType::getUnqual(Type::Int8Ty), 
                               Type::Int32Ty, 
@@ -536,6 +533,8 @@ static Instruction *LowerPartSet(CallInst *CI) {
       Lo = new ZExtInst(Lo_pn, ValTy, "", entry);
     } else if (ValBits < 32) {
       Lo = new TruncInst(Lo_pn, ValTy, "", entry);
+    } else {
+      Lo = Lo_pn;
     }
     // Determine if the replacement bits are larger than the number of bits we
     // are replacing and deal with it.
@@ -784,8 +783,7 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
   case Intrinsic::var_annotation:
     break;   // Strip out annotate intrinsic
     
-  case Intrinsic::memcpy_i32:
-  case Intrinsic::memcpy_i64: {
+  case Intrinsic::memcpy: {
     static Constant *MemcpyFCache = 0;
     Value *Size = CI->getOperand(3);
     const Type *IntPtr = TD.getIntPtrType();
@@ -803,8 +801,7 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
                     MemcpyFCache);
     break;
   }
-  case Intrinsic::memmove_i32: 
-  case Intrinsic::memmove_i64: {
+  case Intrinsic::memmove: {
     static Constant *MemmoveFCache = 0;
     Value *Size = CI->getOperand(3);
     const Type *IntPtr = TD.getIntPtrType();
@@ -822,8 +819,7 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
                     MemmoveFCache);
     break;
   }
-  case Intrinsic::memset_i32:
-  case Intrinsic::memset_i64: {
+  case Intrinsic::memset: {
     static Constant *MemsetFCache = 0;
     Value *Size = CI->getOperand(3);
     const Type *IntPtr = TD.getIntPtrType();