Browse code

rolled back changes from bb#8352 - fixes ppc unit tests

Kevin Lin authored on 2014/06/02 23:52:01
Showing 1 changed files
... ...
@@ -1626,7 +1626,7 @@ public:
1626 1626
 			    Value *Dst = convertOperand(func, inst, inst->u.three[0]);
1627 1627
 			    Dst = Builder.CreatePointerCast(Dst, PointerType::getUnqual(Type::getInt8Ty(Context)));
1628 1628
 			    Value *Val = convertOperand(func, Type::getInt8Ty(Context), inst->u.three[1]);
1629
-			    Value *Len = convertOperand(func, Type::getInt64Ty(Context), inst->u.three[2]);
1629
+			    Value *Len = convertOperand(func, Type::getInt32Ty(Context), inst->u.three[2]);
1630 1630
 #ifdef LLVM30
1631 1631
 			    CallInst *c = Builder.CreateCall5(CF->FMemset, Dst, Val, Len,
1632 1632
 								ConstantInt::get(Type::getInt32Ty(Context), 1),
... ...
@@ -1647,7 +1647,7 @@ public:
1647 1647
 			    Dst = Builder.CreatePointerCast(Dst, PointerType::getUnqual(Type::getInt8Ty(Context)));
1648 1648
 			    Value *Src = convertOperand(func, inst, inst->u.three[1]);
1649 1649
 			    Src = Builder.CreatePointerCast(Src, PointerType::getUnqual(Type::getInt8Ty(Context)));
1650
-			    Value *Len = convertOperand(func, Type::getInt64Ty(Context), inst->u.three[2]);
1650
+			    Value *Len = convertOperand(func, Type::getInt32Ty(Context), inst->u.three[2]);
1651 1651
 #ifdef LLVM30
1652 1652
 			    CallInst *c = Builder.CreateCall5(CF->FMemcpy, Dst, Src, Len,
1653 1653
 								ConstantInt::get(Type::getInt32Ty(Context), 1),
... ...
@@ -1668,7 +1668,7 @@ public:
1668 1668
 			    Dst = Builder.CreatePointerCast(Dst, PointerType::getUnqual(Type::getInt8Ty(Context)));
1669 1669
 			    Value *Src = convertOperand(func, inst, inst->u.three[1]);
1670 1670
 			    Src = Builder.CreatePointerCast(Src, PointerType::getUnqual(Type::getInt8Ty(Context)));
1671
-			    Value *Len = convertOperand(func, Type::getInt64Ty(Context), inst->u.three[2]);
1671
+			    Value *Len = convertOperand(func, Type::getInt32Ty(Context), inst->u.three[2]);
1672 1672
 #ifdef LLVM30
1673 1673
 			    CallInst *c = Builder.CreateCall5(CF->FMemmove, Dst, Src, Len,
1674 1674
 								ConstantInt::get(Type::getInt32Ty(Context), 1),
... ...
@@ -1902,7 +1902,7 @@ static void addFunctionProtos(struct CommonFunctions *CF, ExecutionEngine *EE, M
1902 1902
     std::vector<constType*> args;
1903 1903
     args.push_back(PointerType::getUnqual(Type::getInt8Ty(Context)));
1904 1904
     args.push_back(Type::getInt8Ty(Context));
1905
-    args.push_back(Type::getInt64Ty(Context));
1905
+    args.push_back(Type::getInt32Ty(Context));
1906 1906
     args.push_back(Type::getInt32Ty(Context));
1907 1907
 #ifdef LLVM30
1908 1908
     args.push_back(Type::getInt1Ty(Context));
... ...
@@ -1911,9 +1911,9 @@ static void addFunctionProtos(struct CommonFunctions *CF, ExecutionEngine *EE, M
1911 1911
 					       args, false);
1912 1912
     CF->FMemset = Function::Create(FuncTy_3, GlobalValue::ExternalLinkage,
1913 1913
 #ifdef LLVM30
1914
-					 "llvm.memset.p0i8.i64",
1914
+					 "llvm.memset.p0i8.i32",
1915 1915
 #else
1916
-					 "llvm.memset.i64",
1916
+					 "llvm.memset.i32",
1917 1917
 #endif
1918 1918
 					 M);
1919 1919
     CF->FMemset->setDoesNotThrow();
... ...
@@ -1922,7 +1922,7 @@ static void addFunctionProtos(struct CommonFunctions *CF, ExecutionEngine *EE, M
1922 1922
     args.clear();
1923 1923
     args.push_back(PointerType::getUnqual(Type::getInt8Ty(Context)));
1924 1924
     args.push_back(PointerType::getUnqual(Type::getInt8Ty(Context)));
1925
-    args.push_back(Type::getInt64Ty(Context));
1925
+    args.push_back(Type::getInt32Ty(Context));
1926 1926
     args.push_back(Type::getInt32Ty(Context));
1927 1927
 #ifdef LLVM30
1928 1928
     args.push_back(Type::getInt1Ty(Context));
... ...
@@ -1931,9 +1931,9 @@ static void addFunctionProtos(struct CommonFunctions *CF, ExecutionEngine *EE, M
1931 1931
 					       args, false);
1932 1932
     CF->FMemmove = Function::Create(FuncTy_4, GlobalValue::ExternalLinkage,
1933 1933
 #ifdef LLVM30
1934
-					  "llvm.memmove.p0i8.i64",
1934
+					  "llvm.memmove.p0i8.i32",
1935 1935
 #else
1936
-					  "llvm.memmove.i64",
1936
+					  "llvm.memmove.i32",
1937 1937
 #endif
1938 1938
 					  M);
1939 1939
     CF->FMemmove->setDoesNotThrow();
... ...
@@ -1941,9 +1941,9 @@ static void addFunctionProtos(struct CommonFunctions *CF, ExecutionEngine *EE, M
1941 1941
 
1942 1942
     CF->FMemcpy = Function::Create(FuncTy_4, GlobalValue::ExternalLinkage,
1943 1943
 #ifdef LLVM30
1944
-					 "llvm.memcpy.p0i8.p0i8.i64",
1944
+					 "llvm.memcpy.p0i8.p0i8.i32",
1945 1945
 #else
1946
-					 "llvm.memcpy.i64",
1946
+					 "llvm.memcpy.i32",
1947 1947
 #endif
1948 1948
 					 M);
1949 1949
     CF->FMemcpy->setDoesNotThrow();