summaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM/fast-isel.ll
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-04-29 20:02:39 +0000
committerEric Christopher <echristo@apple.com>2011-04-29 20:02:39 +0000
commitbcf26aee86b1ab15b3e1442483eaa7be9fa00a82 (patch)
treebe1c009b822081604425f9609408be094e17b8c6 /test/CodeGen/ARM/fast-isel.ll
parent8ddf6f295238b546656f85fc14bccc1a322359de (diff)
downloadllvm-bcf26aee86b1ab15b3e1442483eaa7be9fa00a82.tar.gz
llvm-bcf26aee86b1ab15b3e1442483eaa7be9fa00a82.tar.bz2
llvm-bcf26aee86b1ab15b3e1442483eaa7be9fa00a82.tar.xz
Add trunc->branch support, this won't help with clang's i8->i1 truncations
for bools, but is a start. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130534 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/fast-isel.ll')
-rw-r--r--test/CodeGen/ARM/fast-isel.ll17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/CodeGen/ARM/fast-isel.ll b/test/CodeGen/ARM/fast-isel.ll
index dd806ec6f1..c8637d1fe5 100644
--- a/test/CodeGen/ARM/fast-isel.ll
+++ b/test/CodeGen/ARM/fast-isel.ll
@@ -13,4 +13,19 @@ entry:
%tmp1 = load i32* %b.addr
%add = add nsw i32 %tmp, %tmp1
ret i32 %add
-} \ No newline at end of file
+}
+
+define void @test1(i32 %tmp) nounwind {
+entry:
+%tobool = trunc i32 %tmp to i1
+br i1 %tobool, label %if.then, label %if.end
+
+if.then: ; preds = %entry
+call void @test1(i32 0)
+br label %if.end
+
+if.end: ; preds = %if.then, %entry
+ret void
+; CHECK: test1:
+; CHECK: tst r0, #1
+}