1 ; RUN: opt < %s -loop-rotate -S | FileCheck %s
2 ; RUN: opt < %s -loop-rotate -enable-mssa-loop-dependency=true -verify-memoryssa -S | FileCheck %s
4 target triple = "x86_64-pc-windows-msvc"
6 declare void @always_throws()
8 define i32 @test() personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) {
10 invoke void @always_throws()
11 to label %continue unwind label %catch.dispatch
17 %t0 = catchswitch within none [label %catch] unwind to caller
20 %t1 = catchpad within %t0 [i8* null, i32 64, i8* null]
21 catchret from %t1 to label %for.cond
24 %sum = phi i32 [ %add, %for.body ], [ 0, %catch ]
25 %i = phi i32 [ %inc, %for.body ], [ 0, %catch ]
26 %cmp = icmp slt i32 %i, 1
27 br i1 %cmp, label %for.body, label %return
30 %add = add nsw i32 1, %sum
31 %inc = add nsw i32 %i, 1
39 ; CHECK-NEXT: catchpad
40 ; CHECK-NEXT: catchret
42 declare i32 @__CxxFrameHandler3(...)