[llvm-commits] CVS: llvm/test/Regression/Transforms/SimplifyCFG/UnreachableEliminate.ll
Chris Lattner
lattner at cs.uiuc.edu
Sun Oct 17 21:06:55 PDT 2004
Changes in directory llvm/test/Regression/Transforms/SimplifyCFG:
UnreachableEliminate.ll added (r1.1)
---
Log message:
New testcase
---
Diffs of the changes: (+29 -0)
Index: llvm/test/Regression/Transforms/SimplifyCFG/UnreachableEliminate.ll
diff -c /dev/null llvm/test/Regression/Transforms/SimplifyCFG/UnreachableEliminate.ll:1.1
*** /dev/null Sun Oct 17 23:06:51 2004
--- llvm/test/Regression/Transforms/SimplifyCFG/UnreachableEliminate.ll Sun Oct 17 23:06:41 2004
***************
*** 0 ****
--- 1,29 ----
+ ; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep unreachable
+
+ void %test1(bool %C, bool* %BP) {
+ br bool %C, label %T, label %F
+ T:
+ store bool %C, bool* %BP ;; dead
+ unreachable
+ F:
+ ret void
+ }
+
+ void %test2() {
+ invoke void %test2() to label %N unwind label %U
+ U:
+ unreachable
+ N:
+ ret void
+ }
+
+ int %test3(int %v) {
+ switch int %v, label %default [ int 1, label %U
+ int 2, label %T]
+ default:
+ ret int 1
+ U:
+ unreachable
+ T:
+ ret int 2
+ }
More information about the llvm-commits
mailing list