[llvm-commits] CVS: llvm/test/Regression/Transforms/PruneEH/simplenoreturntest.ll
Chris Lattner
lattner at cs.uiuc.edu
Tue Apr 26 21:51:17 PDT 2005
Changes in directory llvm/test/Regression/Transforms/PruneEH:
simplenoreturntest.ll added (r1.1)
---
Log message:
Test the noreturn function optimization
---
Diffs of the changes: (+16 -0)
simplenoreturntest.ll | 16 ++++++++++++++++
1 files changed, 16 insertions(+)
Index: llvm/test/Regression/Transforms/PruneEH/simplenoreturntest.ll
diff -c /dev/null llvm/test/Regression/Transforms/PruneEH/simplenoreturntest.ll:1.1
*** /dev/null Tue Apr 26 23:51:11 2005
--- llvm/test/Regression/Transforms/PruneEH/simplenoreturntest.ll Tue Apr 26 23:51:01 2005
***************
*** 0 ****
--- 1,16 ----
+ ; RUN: llvm-as < %s | opt -prune-eh | llvm-dis | not grep 'ret int'
+
+ void %noreturn() {
+ unwind
+ }
+
+ int %caller() {
+ ; noreturn never returns, so the ret is unreachable.
+ call void %noreturn()
+ ret int 17
+ }
+
+ int %caller2() {
+ %T = call int %caller()
+ ret int %T ;; this is also unreachable!
+ }
More information about the llvm-commits
mailing list