diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VMCore/AutoUpgrade.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/VMCore/AutoUpgrade.cpp b/lib/VMCore/AutoUpgrade.cpp index e2f61378b7..63ffdf664b 100644 --- a/lib/VMCore/AutoUpgrade.cpp +++ b/lib/VMCore/AutoUpgrade.cpp @@ -183,9 +183,7 @@ void llvm::UpgradeIntrinsicCall(CallInst *CI, Function *NewFn) { assert(F && "CallInst has no function associated with it."); if (!NewFn) { - switch(F->getIntrinsicID()) { - default: assert(0 && "Unknown function for CallInst upgrade."); - case Intrinsic::x86_sse2_movl_dq: { + if (strcmp(F->getNameStart(), "llvm.x86.sse2.movl.dq") == 0) { std::vector<Constant*> Idxs; Constant *Zero = ConstantInt::get(Type::Int32Ty, 0); Idxs.push_back(Zero); @@ -211,8 +209,8 @@ void llvm::UpgradeIntrinsicCall(CallInst *CI, Function *NewFn) { // Clean up the old call now that it has been completely upgraded. CI->eraseFromParent(); - break; - } + } else { + assert(0 && "Unknown function for CallInst upgrade."); } return; } |