[fast-isel] Tell fast-isel to do nothing with the new donothing intrinsic.
authorChad Rosier <mcrosier@apple.com>
Fri, 6 Jul 2012 17:33:39 +0000 (17:33 +0000)
committerChad Rosier <mcrosier@apple.com>
Fri, 6 Jul 2012 17:33:39 +0000 (17:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159837 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/FastISel.cpp
test/CodeGen/X86/fast-isel.ll

index 07dc36577f92aae3213362b29904af5933b1d506..20848b403a12393f881675578861dc5e8ddfbb6a 100644 (file)
@@ -573,7 +573,10 @@ bool FastISel::SelectCall(const User *I) {
     // At -O0 we don't care about the lifetime intrinsics.
   case Intrinsic::lifetime_start:
   case Intrinsic::lifetime_end:
+    // The donothing intrinsic does, well, nothing.
+  case Intrinsic::donothing:
     return true;
+
   case Intrinsic::dbg_declare: {
     const DbgDeclareInst *DI = cast<DbgDeclareInst>(Call);
     if (!DIVariable(DI->getVariable()).Verify() ||
index 9d9a520c6a21f99a0cf81280e4a53d026e55976d..132df2b0ab43d87820be06d391527762418f4858 100644 (file)
@@ -117,3 +117,11 @@ define i64* @life() nounwind {
   ret i64* %a3
 }
 
+declare void @llvm.donothing() readnone
+
+; CHECK: donada
+define void @donada() nounwind {
+entry:
+  call void @llvm.donothing()
+  ret void
+}