Add support for Alpha intrinsics, contributed by Rahul Joshi

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7373 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-07-28 21:20:57 +00:00
parent f4836c754a
commit 2418b117ba
2 changed files with 12 additions and 0 deletions

View File

@ -164,6 +164,12 @@ unsigned Function::getIntrinsicID() const {
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;

View File

@ -521,6 +521,12 @@ void Verifier::visitIntrinsicFunctionCall(LLVMIntrinsic::ID ID, CallInst &CI) {
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;
}