42 lines · plain
1; RUN: opt < %s -passes=loop-rotate -verify-memoryssa -S | FileCheck %s2 3target triple = "x86_64-pc-windows-msvc"4 5declare void @always_throws()6 7define i32 @test() personality ptr @__CxxFrameHandler3 {8entry:9 invoke void @always_throws()10 to label %continue unwind label %catch.dispatch11 12continue:13 unreachable14 15catch.dispatch:16 %t0 = catchswitch within none [label %catch] unwind to caller17 18catch:19 %t1 = catchpad within %t0 [ptr null, i32 64, ptr null]20 catchret from %t1 to label %for.cond21 22for.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, 126 br i1 %cmp, label %for.body, label %return27 28for.body:29 %add = add nsw i32 1, %sum30 %inc = add nsw i32 %i, 131 br label %for.cond32 33return:34 ret i32 035}36 37; CHECK: catch:38; CHECK-NEXT: catchpad39; CHECK-NEXT: catchret40 41declare i32 @__CxxFrameHandler3(...)42