summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2016-07-22 12:54:53 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2016-07-22 12:54:53 +0000
commit29333c9de6c7ab6ad1ca09d19d011927704db0c5 (patch)
tree396437fe21be6ff8e1b848ac52a039dd2a53913b
parente59ee43cf17a7b9dfc5ff4556328d19a2779c2e7 (diff)
downloadbcm5719-llvm-29333c9de6c7ab6ad1ca09d19d011927704db0c5.tar.gz
bcm5719-llvm-29333c9de6c7ab6ad1ca09d19d011927704db0c5.zip
[FastISel] Ignore @llvm.assume.
llvm-svn: 276410
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FastISel.cpp2
-rw-r--r--llvm/test/CodeGen/AArch64/fast-isel-assume.ll14
2 files changed, 16 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index b10da002fcf..4092c344bad 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -1104,6 +1104,8 @@ bool FastISel::selectIntrinsicCall(const IntrinsicInst *II) {
case Intrinsic::lifetime_end:
// The donothing intrinsic does, well, nothing.
case Intrinsic::donothing:
+ // Neither does the assume intrinsic; it's also OK not to codegen its operand.
+ case Intrinsic::assume:
return true;
case Intrinsic::dbg_declare: {
const DbgDeclareInst *DI = cast<DbgDeclareInst>(II);
diff --git a/llvm/test/CodeGen/AArch64/fast-isel-assume.ll b/llvm/test/CodeGen/AArch64/fast-isel-assume.ll
new file mode 100644
index 00000000000..d39a907407d
--- /dev/null
+++ b/llvm/test/CodeGen/AArch64/fast-isel-assume.ll
@@ -0,0 +1,14 @@
+; RUN: llc -mtriple=aarch64-- -fast-isel -fast-isel-abort=4 -verify-machineinstrs < %s | FileCheck %s
+
+; Check that we ignore the assume intrinsic.
+
+; CHECK-LABEL: test:
+; CHECK: // BB#0:
+; CHECK-NEXT: ret
+define void @test(i32 %a) {
+ %tmp0 = icmp slt i32 %a, 0
+ call void @llvm.assume(i1 %tmp0)
+ ret void
+}
+
+declare void @llvm.assume(i1)
OpenPOWER on IntegriCloud