1 ; RUN: opt -S -loop-sink < %s | FileCheck %s
3 target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-pc-windows-msvc19.13.26128"
6 %struct.FontInfoData = type { i32 (...)** }
7 %struct.S = type { i8 }
10 ; Make sure not to assert by trying to sink into catch.dispatch.
12 define void @pr38462(%struct.FontInfoData* %this) personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) !prof !1 {
15 %call6 = call i32 @f()
16 %tobool7 = icmp eq i32 %call6, 0
17 br i1 %tobool7, label %for.body.lr.ph, label %for.cond.cleanup
20 %0 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0
23 for.cond.cleanup.loopexit:
24 br label %for.cond.cleanup
30 %call2 = invoke i32 @f() to label %__try.cont unwind label %catch.dispatch
33 %1 = catchswitch within none [label %__except] unwind to caller
36 %2 = catchpad within %1 [i8* null]
37 catchret from %2 to label %__except3
40 call void @llvm.lifetime.start.p0i8(i64 1, i8* nonnull %0)
41 %call.i = call zeroext i1 @g(%struct.S* nonnull %s)
42 br i1 %call.i, label %if.then.i, label %exit
45 %call2.i = call i32 @f()
49 call void @llvm.lifetime.end.p0i8(i64 1, i8* nonnull %0)
54 %tobool = icmp eq i32 %call, 0
55 br i1 %tobool, label %for.body, label %for.cond.cleanup.loopexit
58 declare i32 @__C_specific_handler(...)
60 declare zeroext i1 @g(%struct.S*)
61 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
62 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
64 !1 = !{!"function_entry_count", i64 1}