1 ; RUN: opt < %s -passes=loop-rotate -verify-memoryssa -S | FileCheck %s
3 target triple = "x86_64-pc-windows-msvc"
5 declare void @always_throws()
7 define i32 @test() personality ptr @__CxxFrameHandler3 {
9 invoke void @always_throws()
10 to label %continue unwind label %catch.dispatch
16 %t0 = catchswitch within none [label %catch] unwind to caller
19 %t1 = catchpad within %t0 [ptr null, i32 64, ptr null]
20 catchret from %t1 to label %for.cond
23 %sum = phi i32 [ %add, %for.body ], [ 0, %catch ]
24 %i = phi i32 [ %inc, %for.body ], [ 0, %catch ]
25 %cmp = icmp slt i32 %i, 1
26 br i1 %cmp, label %for.body, label %return
29 %add = add nsw i32 1, %sum
30 %inc = add nsw i32 %i, 1
38 ; CHECK-NEXT: catchpad
39 ; CHECK-NEXT: catchret
41 declare i32 @__CxxFrameHandler3(...)