aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2006-02-15 21:13:37 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2006-02-15 21:13:37 +0000
commit2f9859486a6cfc03a685c7dc8a805d1a8fb6b9d3 (patch)
treea42854e8de15531814cbbb14ad25d30473c5f8c7
parent5946fef1db0a4c61464a0cb07fb40fcd28d700ef (diff)
fix a bunch of alpha regressions. see bug 709
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26218 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/IPO/SimplifyLibCalls.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Transforms/IPO/SimplifyLibCalls.cpp b/lib/Transforms/IPO/SimplifyLibCalls.cpp
index 855041db2f..3c72e9f001 100644
--- a/lib/Transforms/IPO/SimplifyLibCalls.cpp
+++ b/lib/Transforms/IPO/SimplifyLibCalls.cpp
@@ -284,7 +284,7 @@ public:
if (!memcpy_func) {
const Type *SBP = PointerType::get(Type::SByteTy);
memcpy_func = M->getOrInsertFunction("llvm.memcpy", Type::VoidTy,SBP, SBP,
- Type::UIntTy, Type::UIntTy, NULL);
+ TD->getIntPtrType(), Type::UIntTy, NULL);
}
return memcpy_func;
}
@@ -483,7 +483,7 @@ public:
std::vector<Value*> vals;
vals.push_back(gep); // destination
vals.push_back(ci->getOperand(2)); // source
- vals.push_back(ConstantUInt::get(Type::UIntTy,len)); // length
+ vals.push_back(ConstantUInt::get(SLC.getIntPtrType(),len)); // length
vals.push_back(ConstantUInt::get(Type::UIntTy,1)); // alignment
new CallInst(SLC.get_memcpy(), vals, "", ci);
@@ -812,7 +812,7 @@ public:
std::vector<Value*> vals;
vals.push_back(dest); // destination
vals.push_back(src); // source
- vals.push_back(ConstantUInt::get(Type::UIntTy,len)); // length
+ vals.push_back(ConstantUInt::get(SLC.getIntPtrType(),len)); // length
vals.push_back(ConstantUInt::get(Type::UIntTy,1)); // alignment
new CallInst(SLC.get_memcpy(), vals, "", ci);
@@ -1444,7 +1444,7 @@ public:
std::vector<Value*> args;
args.push_back(ci->getOperand(1));
args.push_back(ci->getOperand(2));
- args.push_back(ConstantUInt::get(Type::UIntTy,len));
+ args.push_back(ConstantUInt::get(SLC.getIntPtrType(),len));
args.push_back(ConstantUInt::get(Type::UIntTy,1));
new CallInst(memcpy_func,args,"",ci);
ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,len));
@@ -1477,8 +1477,8 @@ public:
Value *Len1 = BinaryOperator::createAdd(Len,
ConstantInt::get(Len->getType(), 1),
Len->getName()+"1", ci);
- if (Len1->getType() != Type::UIntTy)
- Len1 = new CastInst(Len1, Type::UIntTy, Len1->getName(), ci);
+ if (Len1->getType() != SLC.getIntPtrType())
+ Len1 = new CastInst(Len1, SLC.getIntPtrType(), Len1->getName(), ci);
std::vector<Value*> args;
args.push_back(CastToCStr(ci->getOperand(1), *ci));
args.push_back(CastToCStr(ci->getOperand(3), *ci));