[llvm] r276410 - [FastISel] Ignore @llvm.assume.
Ahmed Bougacha via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 22 05:54:54 PDT 2016
Author: ab
Date: Fri Jul 22 07:54:53 2016
New Revision: 276410
URL: http://llvm.org/viewvc/llvm-project?rev=276410&view=rev
Log:
[FastISel] Ignore @llvm.assume.
Added:
llvm/trunk/test/CodeGen/AArch64/fast-isel-assume.ll
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=276410&r1=276409&r2=276410&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Fri Jul 22 07:54:53 2016
@@ -1104,6 +1104,8 @@ bool FastISel::selectIntrinsicCall(const
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);
Added: llvm/trunk/test/CodeGen/AArch64/fast-isel-assume.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/fast-isel-assume.ll?rev=276410&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/AArch64/fast-isel-assume.ll (added)
+++ llvm/trunk/test/CodeGen/AArch64/fast-isel-assume.ll Fri Jul 22 07:54:53 2016
@@ -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)
More information about the llvm-commits
mailing list