[llvm-commits] CVS: llvm/lib/VMCore/Function.cpp Verifier.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Jul 28 16:22:01 PDT 2003
Changes in directory llvm/lib/VMCore:
Function.cpp updated: 1.39 -> 1.40
Verifier.cpp updated: 1.51 -> 1.52
---
Log message:
Add support for Alpha intrinsics, contributed by Rahul Joshi
---
Diffs of the changes:
Index: llvm/lib/VMCore/Function.cpp
diff -u llvm/lib/VMCore/Function.cpp:1.39 llvm/lib/VMCore/Function.cpp:1.40
--- llvm/lib/VMCore/Function.cpp:1.39 Sat May 17 17:26:33 2003
+++ llvm/lib/VMCore/Function.cpp Mon Jul 28 16:20:57 2003
@@ -164,6 +164,12 @@
return 0; // All intrinsics start with 'llvm.'
switch (getName()[5]) {
+ case 'a':
+ if (getName() == "llvm.alpha.ctlz") return LLVMIntrinsic::alpha_ctlz;
+ if (getName() == "llvm.alpha.cttz") return LLVMIntrinsic::alpha_cttz;
+ if (getName() == "llvm.alpha.ctpop") return LLVMIntrinsic::alpha_ctpop;
+ if (getName() == "llvm.alpha.umulh") return LLVMIntrinsic::alpha_umulh;
+ break;
case 'l':
if (getName() == "llvm.longjmp") return LLVMIntrinsic::longjmp;
break;
Index: llvm/lib/VMCore/Verifier.cpp
diff -u llvm/lib/VMCore/Verifier.cpp:1.51 llvm/lib/VMCore/Verifier.cpp:1.52
--- llvm/lib/VMCore/Verifier.cpp:1.51 Thu Jun 5 16:01:26 2003
+++ llvm/lib/VMCore/Verifier.cpp Mon Jul 28 16:20:57 2003
@@ -521,6 +521,12 @@
case LLVMIntrinsic::va_copy: NumArgs = 2; break;
case LLVMIntrinsic::setjmp: NumArgs = 1; break;
case LLVMIntrinsic::longjmp: NumArgs = 2; break;
+
+ case LLVMIntrinsic::alpha_ctlz: NumArgs = 1; break;
+ case LLVMIntrinsic::alpha_cttz: NumArgs = 1; break;
+ case LLVMIntrinsic::alpha_ctpop: NumArgs = 1; break;
+ case LLVMIntrinsic::alpha_umulh: NumArgs = 2; break;
+
case LLVMIntrinsic::not_intrinsic:
assert(0 && "Invalid intrinsic!"); NumArgs = 0; break;
}
More information about the llvm-commits
mailing list