1; REQUIRES: asserts 2; RUN: opt -S -mtriple=systemz-unknown -mcpu=z13 -O3 -verify-memoryssa < %s | FileCheck %s 3 4target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64" 5target triple = "s390x-ibm-linux" 6 7@g_80 = external dso_local global i32, align 4 8@g_1683 = external dso_local global i32, align 4 9@0 = internal global [7 x i8] c"\00\EE\00\00\EE\00\00", align 2 10 11; Function Attrs: nounwind 12; CHECK-LABEL: @main 13define dso_local void @main() #0 { 14bb: 15 call void @func_1() 16 unreachable 17} 18 19; Function Attrs: nounwind 20define dso_local void @func_1() #0 { 21bb: 22 call void @func_2() 23 unreachable 24} 25 26; Function Attrs: nounwind 27define dso_local void @func_2() #0 { 28bb: 29 %tmp = alloca i32, align 4 30 store i32 0, ptr @g_80, align 4, !tbaa !1 31 br label %bb1 32 33bb1: ; preds = %bb15, %bb 34 %tmp2 = load i32, ptr @g_80, align 4, !tbaa !1 35 %tmp3 = icmp sle i32 %tmp2, 6 36 br i1 %tmp3, label %bb4, label %bb18 37 38bb4: ; preds = %bb1 39 %tmp5 = load i32, ptr @g_1683, align 4, !tbaa !1 40 %tmp6 = sext i32 %tmp5 to i64 41 %tmp7 = getelementptr inbounds [7 x i8], ptr @0, i64 0, i64 %tmp6 42 %tmp8 = load i8, ptr %tmp7, align 1, !tbaa !5 43 %tmp9 = icmp ne i8 %tmp8, 0 44 br i1 %tmp9, label %bb10, label %bb11 45 46bb10: ; preds = %bb4 47 store i32 82, ptr %tmp, align 4 48 br label %bb12 49 50bb11: ; preds = %bb4 51 store i32 0, ptr %tmp, align 4 52 br label %bb12 53 54bb12: ; preds = %bb11, %bb10 55 %tmp13 = load i32, ptr %tmp, align 4 56 %tmp14 = icmp ult i32 %tmp13, 1 57 br i1 %tmp14, label %bb15, label %bb18 58 59bb15: ; preds = %bb12 60 %tmp16 = load i32, ptr @g_80, align 4, !tbaa !1 61 %tmp17 = add nsw i32 %tmp16, 1 62 store i32 %tmp17, ptr @g_80, align 4, !tbaa !1 63 br label %bb1 64 65bb18: ; preds = %bb12, %bb1 66 call void @llvm.trap() 67 unreachable 68} 69 70; Function Attrs: cold noreturn nounwind 71declare void @llvm.trap() #1 72 73attributes #0 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "frame-pointer"="none" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="z13" "target-features"="+transactional-execution,+vector" "unsafe-fp-math"="false" "use-soft-float"="false" } 74attributes #1 = { cold noreturn nounwind } 75 76!llvm.ident = !{!0} 77 78!0 = !{!"clang version 8.0.0 (http://llvm.org/git/clang.git a674a04e68bcf09f9a0423f3f589589596bc01a6) (http://llvm.org/git/llvm.git 1fe1ffe00e034128d1c5504254fdd4742f48bb9a)"} 79!1 = !{!2, !2, i64 0} 80!2 = !{!"int", !3, i64 0} 81!3 = !{!"omnipotent char", !4, i64 0} 82!4 = !{!"Simple C/C++ TBAA"} 83!5 = !{!3, !3, i64 0} 84