diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-07-06 17:33:39 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-07-06 17:33:39 +0000 |
commit | fd065bbed1d731b49b1b4a5c4c050ce461be80b4 (patch) | |
tree | 104147996d811d66fc321f99ebd7204729f172b1 | |
parent | c5171d5de6c740751687a8d80aa03115fbcad6b7 (diff) | |
download | llvm-fd065bbed1d731b49b1b4a5c4c050ce461be80b4.tar.gz llvm-fd065bbed1d731b49b1b4a5c4c050ce461be80b4.tar.bz2 llvm-fd065bbed1d731b49b1b4a5c4c050ce461be80b4.tar.xz |
[fast-isel] Tell fast-isel to do nothing with the new donothing intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159837 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/SelectionDAG/FastISel.cpp | 3 | ||||
-rw-r--r-- | test/CodeGen/X86/fast-isel.ll | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index 07dc36577f..20848b403a 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -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() || diff --git a/test/CodeGen/X86/fast-isel.ll b/test/CodeGen/X86/fast-isel.ll index 9d9a520c6a..132df2b0ab 100644 --- a/test/CodeGen/X86/fast-isel.ll +++ b/test/CodeGen/X86/fast-isel.ll @@ -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 +} |