[IR] Reformulate LLVM's EH funclet IR
[oota-llvm.git] / test / CodeGen / X86 / seh-exception-code.ll
index e481a8e308c3c3284e71b003e321d0a474b5af5a..20e1544e0b593c7123604ef805fcdf68f3ce5815 100644 (file)
@@ -14,11 +14,11 @@ entry:
           to label %__try.cont unwind label %catch.dispatch
 
 catch.dispatch:                                   ; preds = %entry
-  %pad = catchpad [i8* null]
-          to label %__except unwind label %catchendblock
+  %cs = catchswitch within none [label %__except] unwind to caller
 
 __except:                                         ; preds = %catch.dispatch
-  catchret %pad to label %__except.1
+  %pad = catchpad within %cs [i8* null]
+  catchret from %pad to label %__except.1
 
 __except.1:                                       ; preds = %__except
   %code = call i32 @llvm.eh.exceptioncode(token %pad)
@@ -27,15 +27,12 @@ __except.1:                                       ; preds = %__except
 
 __try.cont:                                       ; preds = %entry, %__except.1
   ret void
-
-catchendblock:                                    ; preds = %catch.dispatch
-  catchendpad unwind to caller
 }
 
 ; CHECK-LABEL: ehcode:
 ; CHECK: xorl %ecx, %ecx
 ; CHECK: callq f
 
-; CHECK: # %catch.dispatch
+; CHECK: # %__except
 ; CHECK: movl %eax, %ecx
 ; CHECK-NEXT: callq f