1 ; RUN: opt -S -passes=loop-unroll %s | FileCheck %s
2 target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
3 target triple = "x86_64-pc-windows-msvc18.0.0"
5 define void @test1() personality ptr @__CxxFrameHandler3 {
9 for.body: ; preds = %entry, %for.inc
10 %phi = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
11 invoke void @callee(i32 %phi)
12 to label %for.inc unwind label %ehcleanup
14 for.inc: ; preds = %for.body
15 %inc = add nuw nsw i32 %phi, 1
16 %cmp = icmp slt i32 %inc, 3
17 br i1 %cmp, label %for.body, label %for.cond.cleanup
19 for.cond.cleanup: ; preds = %for.inc
23 ehcleanup: ; preds = %for.body
24 %cp = cleanuppad within none []
25 call void @dtor() [ "funclet"(token %cp) ]
26 cleanupret from %cp unwind to caller
29 ; CHECK-LABEL: define void @test1(
30 ; CHECK: invoke void @callee(i32 0
32 ; CHECK: invoke void @callee(i32 1
34 ; CHECK: invoke void @callee(i32 2
36 declare void @callee(i32)
38 declare i32 @__CxxFrameHandler3(...)