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 3 4target triple = "x86_64-pc-windows-msvc" 5 6declare void @always_throws() 7 8define i32 @test() personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { 9entry: 10 invoke void @always_throws() 11 to label %continue unwind label %catch.dispatch 12 13continue: 14 unreachable 15 16catch.dispatch: 17 %t0 = catchswitch within none [label %catch] unwind to caller 18 19catch: 20 %t1 = catchpad within %t0 [i8* null, i32 64, i8* null] 21 catchret from %t1 to label %for.cond 22 23for.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 28 29for.body: 30 %add = add nsw i32 1, %sum 31 %inc = add nsw i32 %i, 1 32 br label %for.cond 33 34return: 35 ret i32 0 36} 37 38; CHECK: catch: 39; CHECK-NEXT: catchpad 40; CHECK-NEXT: catchret 41 42declare i32 @__CxxFrameHandler3(...) 43