aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Function.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-02 23:58:40 +0000
committerChris Lattner <sabre@nondot.org>2006-03-02 23:58:40 +0000
commitffa987d3eeb04b69f356799e544a9bb7b0095541 (patch)
tree3783f920459abc2121c514cb667e97939ed42fe8 /lib/VMCore/Function.cpp
parent14c284600c6fc8281f55a0241326ae7028a96257 (diff)
Split memcpy/memset/memmove intrinsics into i32/i64 versions, resolving
PR709, and paving the way for future progress. Significantly refactor autoupgrading code, to handle the more complex case (where we upgrade one argument in a function), and fix some bugs in it. Testcase here: llvm/test/Regression/Bytecode/memcpy.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26474 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Function.cpp')
-rw-r--r--lib/VMCore/Function.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp
index cb53b37db1..2412e09aed 100644
--- a/lib/VMCore/Function.cpp
+++ b/lib/VMCore/Function.cpp
@@ -252,9 +252,12 @@ unsigned Function::getIntrinsicID() const {
if (Name == "llvm.longjmp") return Intrinsic::longjmp;
break;
case 'm':
- if (Name == "llvm.memcpy") return Intrinsic::memcpy;
- if (Name == "llvm.memmove") return Intrinsic::memmove;
- if (Name == "llvm.memset") return Intrinsic::memset;
+ if (Name == "llvm.memcpy.i32") return Intrinsic::memcpy_i32;
+ if (Name == "llvm.memcpy.i64") return Intrinsic::memcpy_i64;
+ if (Name == "llvm.memmove.i32") return Intrinsic::memmove_i32;
+ if (Name == "llvm.memmove.i64") return Intrinsic::memmove_i64;
+ if (Name == "llvm.memset.i32") return Intrinsic::memset_i32;
+ if (Name == "llvm.memset.i64") return Intrinsic::memset_i64;
break;
case 'p':
if (Name == "llvm.prefetch") return Intrinsic::prefetch;