While hoisting common code from if/else, hoist debug info intrinsics if they match.
[oota-llvm.git] / test / Transforms / SimplifyCFG / 2005-10-02-InvokeSimplify.ll
index c3b4194e1e72eec4940d2c2a7823ae43766e277c..778aa3b1f7b439ece1b7a9c393ce84da3a0160d9 100644 (file)
@@ -1,13 +1,15 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -disable-output
+; RUN: opt < %s -simplifycfg -disable-output
 
-bool %foo() {
-       %X = invoke bool %foo() to label %N unwind label %F
-F:
-       ret bool false
-N:
-       br bool %X, label %A, label %B
-A:
-       ret bool true
-B:
-       ret bool true
+define i1 @foo() {
+       %X = invoke i1 @foo( )
+                       to label %N unwind label %F             ; <i1> [#uses=1]
+F:             ; preds = %0
+       ret i1 false
+N:             ; preds = %0
+       br i1 %X, label %A, label %B
+A:             ; preds = %N
+       ret i1 true
+B:             ; preds = %N
+       ret i1 true
 }
+