[llvm-commits] CVS: llvm/test/Regression/Transforms/LowerInvoke/basictest.ll
Chris Lattner
lattner at cs.uiuc.edu
Tue Sep 27 11:34:42 PDT 2005
Changes in directory llvm/test/Regression/Transforms/LowerInvoke:
basictest.ll added (r1.1)
---
Log message:
Add a simple testcase for lowerinvoke
---
Diffs of the changes: (+28 -0)
basictest.ll | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+)
Index: llvm/test/Regression/Transforms/LowerInvoke/basictest.ll
diff -c /dev/null llvm/test/Regression/Transforms/LowerInvoke/basictest.ll:1.1
*** /dev/null Tue Sep 27 13:34:41 2005
--- llvm/test/Regression/Transforms/LowerInvoke/basictest.ll Tue Sep 27 13:34:31 2005
***************
*** 0 ****
--- 1,28 ----
+ ; RUN: llvm-as < %s | opt -lowerinvoke -disable-output &&
+ ; RUN: llvm-as < %s | opt -lowerinvoke -disable-output -enable-correct-eh-support
+
+ implementation
+
+ int %foo() {
+ invoke int %foo() to label %Ok unwind label %Crap
+ Ok:
+ invoke int %foo() to label %Ok2 unwind label %Crap
+ Ok2:
+ ret int 2
+ Crap:
+ ret int 1
+ }
+
+ int %bar(int %blah) {
+ br label %doit
+ doit:
+ ;; Value live across an unwind edge.
+ %B2 = add int %blah, 1
+ invoke int %foo() to label %Ok unwind label %Crap
+ Ok:
+ invoke int %foo() to label %Ok2 unwind label %Crap
+ Ok2:
+ ret int 2
+ Crap:
+ ret int %B2
+ }
More information about the llvm-commits
mailing list