[llvm-commits] CVS: llvm/test/Regression/Transforms/LCSSA/2006-06-12-MultipleExitsSameBlock.ll
Owen Anderson
resistor at mac.com
Mon Jun 12 00:05:59 PDT 2006
Changes in directory llvm/test/Regression/Transforms/LCSSA:
2006-06-12-MultipleExitsSameBlock.ll added (r1.1)
---
Log message:
Make sure that LCSSA works properly when it encounters an exit block that has
more than one predecessor inside the loop.
---
Diffs of the changes: (+28 -0)
2006-06-12-MultipleExitsSameBlock.ll | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+)
Index: llvm/test/Regression/Transforms/LCSSA/2006-06-12-MultipleExitsSameBlock.ll
diff -c /dev/null llvm/test/Regression/Transforms/LCSSA/2006-06-12-MultipleExitsSameBlock.ll:1.1
*** /dev/null Mon Jun 12 02:05:57 2006
--- llvm/test/Regression/Transforms/LCSSA/2006-06-12-MultipleExitsSameBlock.ll Mon Jun 12 02:05:47 2006
***************
*** 0 ****
--- 1,28 ----
+ ; RUN: llvm-as < %s | opt -lcssa | llvm-dis | grep "%X.1.lcssa" &&
+ ; RUN: llvm-as < %s | opt -lcssa | llvm-dis | not grep "%X.1.lcssa1"
+
+ declare bool %c1()
+ declare bool %c2()
+
+ int %foo() {
+ entry:
+ br label %loop_begin
+
+ loop_begin:
+ br bool true, label %loop_body.1, label %loop_exit2
+
+ loop_body.1:
+ %X.1 = add int 0, 1
+ %rel.1 = call bool %c1()
+ br bool %rel.1, label %loop_exit, label %loop_body.2
+
+ loop_body.2:
+ %rel.2 = call bool %c2()
+ br bool %rel.2, label %loop_exit, label %loop_begin
+
+ loop_exit:
+ ret int %X.1
+
+ loop_exit2:
+ ret int 1
+ }
More information about the llvm-commits
mailing list