summaryrefslogtreecommitdiff
path: root/test/CodeGen/CBackend/2003-06-28-InvokeSupport.ll
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-06-02 17:52:33 +0000
committerEd Schouten <ed@FreeBSD.org>2009-06-02 17:52:33 +0000
commit009b1c42aa6266385f2c37e227516b24077e6dd7 (patch)
tree64ba909838c23261cace781ece27d106134ea451 /test/CodeGen/CBackend/2003-06-28-InvokeSupport.ll
Diffstat (limited to 'test/CodeGen/CBackend/2003-06-28-InvokeSupport.ll')
-rw-r--r--test/CodeGen/CBackend/2003-06-28-InvokeSupport.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/CBackend/2003-06-28-InvokeSupport.ll b/test/CodeGen/CBackend/2003-06-28-InvokeSupport.ll
new file mode 100644
index 0000000000000..9fe98e22063a2
--- /dev/null
+++ b/test/CodeGen/CBackend/2003-06-28-InvokeSupport.ll
@@ -0,0 +1,17 @@
+; RUN: llvm-as < %s | llc -march=c
+
+declare i32 @callee(i32, i32)
+
+define i32 @test(i32 %X) {
+; <label>:0
+ %A = invoke i32 @callee( i32 %X, i32 5 )
+ to label %Ok unwind label %Threw ; <i32> [#uses=1]
+
+Ok: ; preds = %Threw, %0
+ %B = phi i32 [ %A, %0 ], [ -1, %Threw ] ; <i32> [#uses=1]
+ ret i32 %B
+
+Threw: ; preds = %0
+ br label %Ok
+}
+