1 ; RUN: opt -S -passes=consthoist < %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-msvc"
6 define internal fastcc void @baz(ptr %arg) unnamed_addr personality ptr @wobble {
9 %tmp = invoke noalias dereferenceable(40) ptr @wibble.2(i64 40)
10 to label %bb6 unwind label %bb1
14 ; CHECK-NEXT: %tmp2 = catchswitch within none [label %bb3] unwind label %bb16
15 %tmp2 = catchswitch within none [label %bb3] unwind label %bb16
18 %tmp4 = catchpad within %tmp2 [ptr null, i32 64, ptr null]
19 invoke void @spam(ptr null) [ "funclet"(token %tmp4) ]
20 to label %bb5 unwind label %bb16
26 %tmp7 = icmp eq ptr %arg, null
30 bb9: ; preds = %bb8, %bb6
31 %tmp10 = inttoptr i64 -6148914691236517376 to ptr
32 %tmp11 = invoke noalias dereferenceable(40) ptr @wibble.2(i64 40)
33 to label %bb15 unwind label %bb12
36 %tmp13 = cleanuppad within none []
40 cleanupret from %tmp13 unwind label %bb16
45 bb16: ; preds = %bb14, %bb3, %bb1
46 %tmp17 = phi ptr [ inttoptr (i64 -6148914691236517376 to ptr), %bb1 ], [ inttoptr (i64 -6148914691236517376 to ptr), %bb3 ], [ %tmp10, %bb14 ]
47 %tmp18 = cleanuppad within none []
51 cleanupret from %tmp18 unwind to caller
54 declare ptr @wibble.2(i64)
56 declare dso_local void @spam(ptr) local_unnamed_addr
58 declare i32 @wobble(...)