1 ; RUN: opt -S -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(i8* %arg) unnamed_addr personality i8* bitcast (i32 (...)* @wobble to i8*) {
9 %tmp = invoke noalias dereferenceable(40) i8* @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 [i8* null, i32 64, i8* null]
19 invoke void @spam(i8* null) [ "funclet"(token %tmp4) ]
20 to label %bb5 unwind label %bb16
26 %tmp7 = icmp eq i8* %arg, null
30 bb9: ; preds = %bb8, %bb6
31 %tmp10 = inttoptr i64 -6148914691236517376 to i16*
32 %tmp11 = invoke noalias dereferenceable(40) i8* @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 i16* [ inttoptr (i64 -6148914691236517376 to i16*), %bb1 ], [ inttoptr (i64 -6148914691236517376 to i16*), %bb3 ], [ %tmp10, %bb14 ]
47 %tmp18 = cleanuppad within none []
51 cleanupret from %tmp18 unwind to caller
54 declare i8* @wibble.2(i64)
56 declare dso_local void @spam(i8*) local_unnamed_addr
58 declare i32 @wobble(...)