summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
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
commit8d46b477879a12253c55595acfb439d0a928f486 (patch)
treea64f800ddd62b9a82ff06d35a2148e34f7039209 /llvm/test/CodeGen
parentf1c95f8bcb2565a3efe11d989cfa55bbea7d315f (diff)
downloadbcm5719-llvm-8d46b477879a12253c55595acfb439d0a928f486.tar.gz
bcm5719-llvm-8d46b477879a12253c55595acfb439d0a928f486.zip
Add trunc->branch support, this won't help with clang's i8->i1 truncations
for bools, but is a start. llvm-svn: 130534
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/ARM/fast-isel.ll17
1 files changed, 16 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/ARM/fast-isel.ll b/llvm/test/CodeGen/ARM/fast-isel.ll
index dd806ec6f1a..c8637d1fe5e 100644
--- a/llvm/test/CodeGen/ARM/fast-isel.ll
+++ b/llvm/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
+}
OpenPOWER on IntegriCloud