--- Reverse-merging r99929 into '.':
U    gcc/llvm-convert.cpp

llvm-svn: 99966
diff --git a/llvm-gcc-4.2/gcc/llvm-convert.cpp b/llvm-gcc-4.2/gcc/llvm-convert.cpp
index c960e49..7a9ff1e 100644
--- a/llvm-gcc-4.2/gcc/llvm-convert.cpp
+++ b/llvm-gcc-4.2/gcc/llvm-convert.cpp
@@ -1559,17 +1559,15 @@
                               unsigned Align) {
   const Type *SBP = Type::getInt8PtrTy(Context);
   const Type *IntPtr = TD.getIntPtrType(Context);
-  Value *Ops[5] = {
+  Value *Ops[4] = {
     BitCastToType(DestPtr, SBP),
     BitCastToType(SrcPtr, SBP),
     CastToSIntType(Size, IntPtr),
-    ConstantInt::get(Type::getInt32Ty(Context), Align),
-   ConstantInt::get(Type::getInt1Ty(Context), false)
+    ConstantInt::get(Type::getInt32Ty(Context), Align)
   };
-  const Type *ArgTypes[3] = {SBP, SBP, IntPtr };
 
   Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Intrinsic::memcpy,
-                                               ArgTypes, 3), Ops, Ops+5);
+                                               &IntPtr, 1), Ops, Ops+4);
   return Ops[0];
 }
 
@@ -1577,17 +1575,15 @@
                                unsigned Align) {
   const Type *SBP = Type::getInt8PtrTy(Context);
   const Type *IntPtr = TD.getIntPtrType(Context);
-  Value *Ops[5] = {
+  Value *Ops[4] = {
     BitCastToType(DestPtr, SBP),
     BitCastToType(SrcPtr, SBP),
     CastToSIntType(Size, IntPtr),
-    ConstantInt::get(Type::getInt32Ty(Context), Align),
-    ConstantInt::get(Type::getInt1Ty(Context), false)
+    ConstantInt::get(Type::getInt32Ty(Context), Align)
   };
-  const Type *ArgTypes[3] = {SBP, SBP, IntPtr };
 
   Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Intrinsic::memmove,
-                                               ArgTypes, 3), Ops, Ops+5);
+                                               &IntPtr, 1), Ops, Ops+4);
   return Ops[0];
 }
 
@@ -1595,16 +1591,15 @@
                               unsigned Align) {
   const Type *SBP = Type::getInt8PtrTy(Context);
   const Type *IntPtr = TD.getIntPtrType(Context);
-  Value *Ops[5] = {
+  Value *Ops[4] = {
     BitCastToType(DestPtr, SBP),
     CastToSIntType(SrcVal, Type::getInt8Ty(Context)),
     CastToSIntType(Size, IntPtr),
-    ConstantInt::get(Type::getInt32Ty(Context), Align),
-    ConstantInt::get(Type::getInt1Ty(Context), false)
+    ConstantInt::get(Type::getInt32Ty(Context), Align)
   };
-  const Type *ArgTypes[2] = {SBP, IntPtr};
+
   Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Intrinsic::memset,
-                                               ArgTypes, 2), Ops, Ops+5);
+                                               &IntPtr, 1), Ops, Ops+4);
   return Ops[0];
 }