1; REQUIRES: asserts 2; RUN: opt -S -passes='default<O3>' %s 3%struct0 = type { i64, i64, i32, i64, i32 } 4%union0 = type { i32 } 5 6@g_6 = external dso_local global i32, align 1 7@g_60 = external dso_local global i16, align 1 8@g_79 = external dso_local global { i16, i16 }, align 1 9@g_315 = external dso_local global %struct0, align 1 10@g_359 = external dso_local global %struct0, align 1 11 12define dso_local i16 @main(i16 %argc, ptr %argv) #0 { 13entry: 14 %call2 = call i16 @func_1() 15 unreachable 16} 17 18define internal i16 @func_1() #0 { 19entry: 20 %call = call i16 @func_21(ptr undef, i32 undef, ptr undef) 21 ret i16 undef 22} 23 24define internal i16 @func_21(ptr %p_22, i32 %p_23, ptr %p_24) #0 { 25entry: 26 call void @func_34(ptr align 1 undef, i32 undef, i32 undef, ptr @g_6, ptr byval(%union0) align 1 undef) 27 unreachable 28} 29 30define internal void @func_34(ptr %agg.result, i32 %p_35, i32 %p_36, ptr %p_37, ptr %p_38) #0 { 31entry: 32 %p_37.addr = alloca ptr, align 1 33 %cleanup.dest.slot = alloca i32, align 1 34 store ptr %p_37, ptr %p_37.addr, align 1 35 br label %lbl_898 36 37lbl_898: ; preds = %cleanup3097, %entry 38 br label %lbl_1111 39 40lbl_1111: ; preds = %cleanup3097, %lbl_898 41 %0 = load i32, ptr getelementptr inbounds (%struct0, ptr @g_359, i32 0, i32 4), align 1 42 %tobool1833 = icmp ne i32 %0, 0 43 br i1 %tobool1833, label %land.rhs1834, label %land.end1851 44 45land.rhs1834: ; preds = %lbl_1111 46 store i16 0, ptr @g_60, align 1 47 br label %land.end1851 48 49land.end1851: ; preds = %land.rhs1834, %lbl_1111 50 %1 = load ptr, ptr %p_37.addr, align 1 51 %2 = load i32, ptr %1, align 1 52 %tobool2351 = icmp ne i32 %2, 0 53 br i1 %tobool2351, label %if.then2352, label %if.else3029 54 55if.then2352: ; preds = %land.end1851 56 %3 = load i16, ptr @g_79, align 1, !tbaa !1 57 %tobool3011 = icmp ne i16 %3, 0 58 call void @llvm.assume(i1 %tobool3011) 59 store i32 11, ptr %cleanup.dest.slot, align 1 60 br label %cleanup3097 61 62if.else3029: ; preds = %land.end1851 63 store i32 3, ptr getelementptr inbounds (%struct0, ptr @g_315, i32 0, i32 4), align 1 64 store i32 132, ptr %cleanup.dest.slot, align 1 65 br label %cleanup3097 66 67cleanup3097: ; preds = %if.else3029, %if.then2352 68 %cleanup.dest3113 = load i32, ptr %cleanup.dest.slot, align 1 69 switch i32 %cleanup.dest3113, label %cleanup3402 [ 70 i32 132, label %lbl_1111 71 i32 11, label %lbl_898 72 ] 73 74cleanup3402: ; preds = %cleanup3097 75 ret void 76} 77 78; Function Attrs: nofree nosync nounwind willreturn 79declare void @llvm.assume(i1 noundef) #1 80 81attributes #0 = { "use-soft-float"="false" } 82attributes #1 = { nofree nosync nounwind willreturn } 83 84!llvm.ident = !{!0} 85 86!0 = !{!"clang version 13.0.0"} 87!1 = !{!2, !2, i64 0} 88!2 = !{!"omnipotent char", !3, i64 0} 89!3 = !{!"Simple C/C++ TBAA"} 90