2 ; RUN: opt -S -mtriple=systemz-unknown -mcpu=z13 -O3 -verify-memoryssa < %s | FileCheck %s
4 target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64"
5 target triple = "s390x-ibm-linux"
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
11 ; Function Attrs: nounwind
13 define dso_local void @main() #0 {
19 ; Function Attrs: nounwind
20 define dso_local void @func_1() #0 {
26 ; Function Attrs: nounwind
27 define dso_local void @func_2() #0 {
29 %tmp = alloca i32, align 4
30 store i32 0, ptr @g_80, align 4, !tbaa !1
33 bb1: ; 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
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
47 store i32 82, ptr %tmp, align 4
51 store i32 0, ptr %tmp, align 4
54 bb12: ; 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
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
65 bb18: ; preds = %bb12, %bb1
66 call void @llvm.trap()
70 ; Function Attrs: cold noreturn nounwind
71 declare void @llvm.trap() #1
73 attributes #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" }
74 attributes #1 = { cold noreturn nounwind }
78 !0 = !{!"clang version 8.0.0 (http://llvm.org/git/clang.git a674a04e68bcf09f9a0423f3f589589596bc01a6) (http://llvm.org/git/llvm.git 1fe1ffe00e034128d1c5504254fdd4742f48bb9a)"}
80 !2 = !{!"int", !3, i64 0}
81 !3 = !{!"omnipotent char", !4, i64 0}
82 !4 = !{!"Simple C/C++ TBAA"}