66 lines · plain
1; RUN: opt -S -verify-memoryssa -passes=loop-sink < %s | FileCheck %s2; RUN: opt -S -verify-memoryssa -aa-pipeline=basic-aa -passes=loop-sink < %s | FileCheck %s3 4target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"5target triple = "x86_64-pc-windows-msvc19.13.26128"6 7%struct.FontInfoData = type { ptr }8%struct.S = type { i8 }9 10; CHECK: @pr3846211; Make sure not to assert by trying to sink into catch.dispatch.12 13define void @pr38462(ptr %this) personality ptr @__C_specific_handler !prof !1 {14entry:15 %s = alloca %struct.S16 %call6 = call i32 @f()17 %tobool7 = icmp eq i32 %call6, 018 br i1 %tobool7, label %for.body.lr.ph, label %for.cond.cleanup19 20for.body.lr.ph:21 br label %for.body22 23for.cond.cleanup.loopexit:24 br label %for.cond.cleanup25 26for.cond.cleanup:27 ret void28 29for.body:30 %call2 = invoke i32 @f() to label %__try.cont unwind label %catch.dispatch31 32catch.dispatch:33 %0 = catchswitch within none [label %__except] unwind to caller34 35__except:36 %1 = catchpad within %0 [ptr null]37 catchret from %1 to label %__except338 39__except3:40 call void @llvm.lifetime.start.p0(ptr nonnull %s)41 %call.i = call zeroext i1 @g(ptr nonnull %s)42 br i1 %call.i, label %if.then.i, label %exit43 44if.then.i:45 %call2.i = call i32 @f()46 br label %exit47 48exit:49 call void @llvm.lifetime.end.p0(ptr nonnull %s)50 br label %__try.cont51 52__try.cont:53 %call = call i32 @f()54 %tobool = icmp eq i32 %call, 055 br i1 %tobool, label %for.body, label %for.cond.cleanup.loopexit56}57 58declare i32 @__C_specific_handler(...)59declare i32 @f()60declare zeroext i1 @g(ptr)61declare void @llvm.lifetime.start.p0(ptr nocapture)62declare void @llvm.lifetime.end.p0(ptr nocapture)63 64!1 = !{!"function_entry_count", i64 1}65 66