1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
2; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=53 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
3; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=53 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
4; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
5; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
6;
7%struct.S = type { i32, i32, i32, float, float, float }
8
9@globalBytes = global [1024 x i8] zeroinitializer, align 16
10@Gint1 = global i32 zeroinitializer, align 4
11@Gint2 = global i32 zeroinitializer, align 4
12@Gstatic_int1 = internal global i32 zeroinitializer, align 4
13@Gstatic_int2 = internal global i32 zeroinitializer, align 4
14@Gstatic_int3 = internal global i32 zeroinitializer, align 4
15@Gstatic_undef_int1 = internal global i32 undef, align 4
16@Gstatic_undef_int2 = internal global i32 undef, align 4
17@GI1 = internal global i32 undef, align 4
18@GI2 = internal global i32 undef, align 4
19@Gs1 = internal global %struct.S undef, align 4
20@Gs2 = internal global %struct.S zeroinitializer, align 4
21@GBytes = internal global [1024 x i8] zeroinitializer, align 16
22@Flag0 = global i32 0, align 4
23@Flag1 = internal global i32 undef, align 4
24@Flag2 = internal global i32 undef, align 4
25@Flag3 = internal global i32 zeroinitializer, align 4
26
27;.
28; CHECK: @[[GLOBALBYTES:[a-zA-Z0-9_$"\\.-]+]] = global [1024 x i8] zeroinitializer, align 16
29; CHECK: @[[GINT1:[a-zA-Z0-9_$"\\.-]+]] = global i32 0, align 4
30; CHECK: @[[GINT2:[a-zA-Z0-9_$"\\.-]+]] = global i32 0, align 4
31; CHECK: @[[GSTATIC_INT1:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 0, align 4
32; CHECK: @[[GSTATIC_INT2:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 0, align 4
33; CHECK: @[[GSTATIC_INT3:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 0, align 4
34; CHECK: @[[GSTATIC_UNDEF_INT1:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef, align 4
35; CHECK: @[[GSTATIC_UNDEF_INT2:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef, align 4
36; CHECK: @[[GI1:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef, align 4
37; CHECK: @[[GI2:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef, align 4
38; CHECK: @[[GS1:[a-zA-Z0-9_$"\\.-]+]] = internal global [[STRUCT_S:%.*]] undef, align 4
39; CHECK: @[[GS2:[a-zA-Z0-9_$"\\.-]+]] = internal global [[STRUCT_S:%.*]] zeroinitializer, align 4
40; CHECK: @[[GBYTES:[a-zA-Z0-9_$"\\.-]+]] = internal global [1024 x i8] zeroinitializer, align 16
41; CHECK: @[[FLAG0:[a-zA-Z0-9_$"\\.-]+]] = global i32 0, align 4
42; CHECK: @[[FLAG1:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef, align 4
43; CHECK: @[[FLAG2:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef, align 4
44; CHECK: @[[FLAG3:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 0, align 4
45;.
46define void @write_arg(i32* %p, i32 %v) {
47; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
48; IS__TUNIT____-LABEL: define {{[^@]+}}@write_arg
49; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P:%.*]], i32 [[V:%.*]]) #[[ATTR0:[0-9]+]] {
50; IS__TUNIT____-NEXT:  entry:
51; IS__TUNIT____-NEXT:    store i32 [[V]], i32* [[P]], align 4, !tbaa [[TBAA3:![0-9]+]]
52; IS__TUNIT____-NEXT:    ret void
53;
54; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
55; IS__CGSCC____-LABEL: define {{[^@]+}}@write_arg
56; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P:%.*]], i32 [[V:%.*]]) #[[ATTR0:[0-9]+]] {
57; IS__CGSCC____-NEXT:  entry:
58; IS__CGSCC____-NEXT:    store i32 [[V]], i32* [[P]], align 4, !tbaa [[TBAA3:![0-9]+]]
59; IS__CGSCC____-NEXT:    ret void
60;
61entry:
62  store i32 %v, i32* %p, align 4, !tbaa !3
63  ret void
64}
65
66define void @write_random(i32* %p) {
67; CHECK-LABEL: define {{[^@]+}}@write_random
68; CHECK-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) {
69; CHECK-NEXT:  entry:
70; CHECK-NEXT:    [[CALL:%.*]] = call i32 (...) @random()
71; CHECK-NEXT:    store i32 [[CALL]], i32* [[P]], align 4, !tbaa [[TBAA3:![0-9]+]]
72; CHECK-NEXT:    ret void
73;
74entry:
75  %call = call i32 (...) @random()
76  store i32 %call, i32* %p, align 4, !tbaa !3
77  ret void
78}
79
80declare i32 @random(...)
81
82;    struct S local_alloca_simplifiable_1(void) {
83;      struct S s;
84;      s.f1 = 1.1;
85;      s.f2 = 2.2;
86;      s.f3 = 3.3;
87;      write_arg(&s.i1, 1);
88;      write_arg(&s.i2, 2);
89;      write_arg(&s.i3, 3);
90;      struct S r;
91;      r.f1 = s.f1;
92;      r.f2 = s.f2 * 2;
93;      r.f3 = s.f3 + s.f1;
94;      r.i1 = s.i1;
95;      r.i2 = s.i2 * 2;
96;      r.i3 = s.i3 + s.i1;
97;      return r;
98;    }
99define void @local_alloca_simplifiable_1(%struct.S* noalias sret(%struct.S) align 4 %agg.result) {
100; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
101; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1
102; IS__TUNIT_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] {
103; IS__TUNIT_OPM-NEXT:  entry:
104; IS__TUNIT_OPM-NEXT:    [[S:%.*]] = alloca [[STRUCT_S]], align 4
105; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = bitcast %struct.S* [[S]] to i8*
106; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR8:[0-9]+]]
107; IS__TUNIT_OPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
108; IS__TUNIT_OPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
109; IS__TUNIT_OPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
110; IS__TUNIT_OPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
111; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR5:[0-9]+]]
112; IS__TUNIT_OPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
113; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR5]]
114; IS__TUNIT_OPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
115; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR5]]
116; IS__TUNIT_OPM-NEXT:    [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
117; IS__TUNIT_OPM-NEXT:    store float 0x3FF19999A0000000, float* [[F12]], align 4, !tbaa [[TBAA7:![0-9]+]]
118; IS__TUNIT_OPM-NEXT:    [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00
119; IS__TUNIT_OPM-NEXT:    [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
120; IS__TUNIT_OPM-NEXT:    store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10:![0-9]+]]
121; IS__TUNIT_OPM-NEXT:    [[ADD:%.*]] = fadd float 0x400A666660000000, 0x3FF19999A0000000
122; IS__TUNIT_OPM-NEXT:    [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
123; IS__TUNIT_OPM-NEXT:    store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11:![0-9]+]]
124; IS__TUNIT_OPM-NEXT:    [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
125; IS__TUNIT_OPM-NEXT:    store i32 1, i32* [[I19]], align 4, !tbaa [[TBAA12:![0-9]+]]
126; IS__TUNIT_OPM-NEXT:    [[MUL11:%.*]] = shl nsw i32 2, 1
127; IS__TUNIT_OPM-NEXT:    [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
128; IS__TUNIT_OPM-NEXT:    store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13:![0-9]+]]
129; IS__TUNIT_OPM-NEXT:    [[ADD15:%.*]] = add nsw i32 3, 1
130; IS__TUNIT_OPM-NEXT:    [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
131; IS__TUNIT_OPM-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14:![0-9]+]]
132; IS__TUNIT_OPM-NEXT:    [[I12:%.*]] = bitcast %struct.S* [[S]] to i8*
133; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR8]]
134; IS__TUNIT_OPM-NEXT:    ret void
135;
136; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
137; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1
138; IS__TUNIT_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] {
139; IS__TUNIT_NPM-NEXT:  entry:
140; IS__TUNIT_NPM-NEXT:    [[S:%.*]] = alloca [[STRUCT_S]], align 4
141; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = bitcast %struct.S* [[S]] to i8*
142; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR6:[0-9]+]]
143; IS__TUNIT_NPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
144; IS__TUNIT_NPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
145; IS__TUNIT_NPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
146; IS__TUNIT_NPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
147; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR4:[0-9]+]]
148; IS__TUNIT_NPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
149; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR4]]
150; IS__TUNIT_NPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
151; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR4]]
152; IS__TUNIT_NPM-NEXT:    [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
153; IS__TUNIT_NPM-NEXT:    store float 0x3FF19999A0000000, float* [[F12]], align 4, !tbaa [[TBAA7:![0-9]+]]
154; IS__TUNIT_NPM-NEXT:    [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00
155; IS__TUNIT_NPM-NEXT:    [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
156; IS__TUNIT_NPM-NEXT:    store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10:![0-9]+]]
157; IS__TUNIT_NPM-NEXT:    [[ADD:%.*]] = fadd float 0x400A666660000000, 0x3FF19999A0000000
158; IS__TUNIT_NPM-NEXT:    [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
159; IS__TUNIT_NPM-NEXT:    store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11:![0-9]+]]
160; IS__TUNIT_NPM-NEXT:    [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
161; IS__TUNIT_NPM-NEXT:    store i32 1, i32* [[I19]], align 4, !tbaa [[TBAA12:![0-9]+]]
162; IS__TUNIT_NPM-NEXT:    [[MUL11:%.*]] = shl nsw i32 2, 1
163; IS__TUNIT_NPM-NEXT:    [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
164; IS__TUNIT_NPM-NEXT:    store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13:![0-9]+]]
165; IS__TUNIT_NPM-NEXT:    [[ADD15:%.*]] = add nsw i32 3, 1
166; IS__TUNIT_NPM-NEXT:    [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
167; IS__TUNIT_NPM-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14:![0-9]+]]
168; IS__TUNIT_NPM-NEXT:    [[I12:%.*]] = bitcast %struct.S* [[S]] to i8*
169; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR6]]
170; IS__TUNIT_NPM-NEXT:    ret void
171;
172; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn
173; IS__CGSCC____-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1
174; IS__CGSCC____-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] {
175; IS__CGSCC____-NEXT:  entry:
176; IS__CGSCC____-NEXT:    [[S:%.*]] = alloca [[STRUCT_S]], align 4
177; IS__CGSCC____-NEXT:    [[I:%.*]] = bitcast %struct.S* [[S]] to i8*
178; IS__CGSCC____-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR8:[0-9]+]]
179; IS__CGSCC____-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
180; IS__CGSCC____-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
181; IS__CGSCC____-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
182; IS__CGSCC____-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
183; IS__CGSCC____-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR9:[0-9]+]]
184; IS__CGSCC____-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
185; IS__CGSCC____-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR9]]
186; IS__CGSCC____-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
187; IS__CGSCC____-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR9]]
188; IS__CGSCC____-NEXT:    [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
189; IS__CGSCC____-NEXT:    store float 0x3FF19999A0000000, float* [[F12]], align 4, !tbaa [[TBAA7:![0-9]+]]
190; IS__CGSCC____-NEXT:    [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00
191; IS__CGSCC____-NEXT:    [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
192; IS__CGSCC____-NEXT:    store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10:![0-9]+]]
193; IS__CGSCC____-NEXT:    [[ADD:%.*]] = fadd float 0x400A666660000000, 0x3FF19999A0000000
194; IS__CGSCC____-NEXT:    [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
195; IS__CGSCC____-NEXT:    store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11:![0-9]+]]
196; IS__CGSCC____-NEXT:    [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
197; IS__CGSCC____-NEXT:    store i32 1, i32* [[I19]], align 4, !tbaa [[TBAA12:![0-9]+]]
198; IS__CGSCC____-NEXT:    [[MUL11:%.*]] = shl nsw i32 2, 1
199; IS__CGSCC____-NEXT:    [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
200; IS__CGSCC____-NEXT:    store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13:![0-9]+]]
201; IS__CGSCC____-NEXT:    [[ADD15:%.*]] = add nsw i32 3, 1
202; IS__CGSCC____-NEXT:    [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
203; IS__CGSCC____-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14:![0-9]+]]
204; IS__CGSCC____-NEXT:    [[I12:%.*]] = bitcast %struct.S* [[S]] to i8*
205; IS__CGSCC____-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR8]]
206; IS__CGSCC____-NEXT:    ret void
207;
208entry:
209  %s = alloca %struct.S, align 4
210  %i = bitcast %struct.S* %s to i8*
211  call void @llvm.lifetime.start.p0i8(i64 24, i8* nonnull %i)
212  %f1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 3
213  store float 0x3FF19999A0000000, float* %f1, align 4, !tbaa !7
214  %f2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 4
215  store float 0x40019999A0000000, float* %f2, align 4, !tbaa !10
216  %f3 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 5
217  store float 0x400A666660000000, float* %f3, align 4, !tbaa !11
218  %i1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0
219  call void @write_arg(i32* nonnull %i1, i32 1)
220  %i2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1
221  call void @write_arg(i32* nonnull %i2, i32 2)
222  %i3 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 2
223  call void @write_arg(i32* nonnull %i3, i32 3)
224  %f11 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 3
225  %i4 = load float, float* %f11, align 4, !tbaa !7
226  %f12 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 3
227  store float %i4, float* %f12, align 4, !tbaa !7
228  %f23 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 4
229  %i5 = load float, float* %f23, align 4, !tbaa !10
230  %mul = fmul float %i5, 2.000000e+00
231  %f24 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 4
232  store float %mul, float* %f24, align 4, !tbaa !10
233  %f35 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 5
234  %i6 = load float, float* %f35, align 4, !tbaa !11
235  %f16 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 3
236  %i7 = load float, float* %f16, align 4, !tbaa !7
237  %add = fadd float %i6, %i7
238  %f37 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 5
239  store float %add, float* %f37, align 4, !tbaa !11
240  %i18 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0
241  %i8 = load i32, i32* %i18, align 4, !tbaa !12
242  %i19 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 0
243  store i32 %i8, i32* %i19, align 4, !tbaa !12
244  %i210 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1
245  %i9 = load i32, i32* %i210, align 4, !tbaa !13
246  %mul11 = shl nsw i32 %i9, 1
247  %i212 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 1
248  store i32 %mul11, i32* %i212, align 4, !tbaa !13
249  %i313 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 2
250  %i10 = load i32, i32* %i313, align 4, !tbaa !14
251  %i114 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0
252  %i11 = load i32, i32* %i114, align 4, !tbaa !12
253  %add15 = add nsw i32 %i10, %i11
254  %i316 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 2
255  store i32 %add15, i32* %i316, align 4, !tbaa !14
256  %i12 = bitcast %struct.S* %s to i8*
257  call void @llvm.lifetime.end.p0i8(i64 24, i8* nonnull %i12)
258  ret void
259}
260
261declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture)
262
263declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture)
264
265;    void local_alloca_simplifiable_2(void) {
266;      char Bytes[1024];
267;      for (int i = 0; i < 100; ++i)
268;        Bytes[i * 10] = 0;
269;      for (int i = 0; i < 10; ++i)
270;        ((float *)Bytes)[i * 10 + 1] = 0;
271;      for (int i = 0; i < 20; ++i)
272;        ((long long int *)Bytes)[i * 10 + 2] = 0;
273;      Bytes[1023] = 0;
274;      write_arg((int *)&Bytes[500], 0);
275;      struct S R;
276;      for (int i = 0; i < 1024; ++i)
277;        globalBytes[i] = Bytes[i];
278;    }
279;
280define void @local_alloca_simplifiable_2() {
281; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind
282; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_2
283; IS__TUNIT_OPM-SAME: () #[[ATTR2:[0-9]+]] {
284; IS__TUNIT_OPM-NEXT:  entry:
285; IS__TUNIT_OPM-NEXT:    [[BYTES:%.*]] = alloca [1024 x i8], align 16
286; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
287; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]])
288; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND:%.*]]
289; IS__TUNIT_OPM:       for.cond:
290; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
291; IS__TUNIT_OPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
292; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
293; IS__TUNIT_OPM:       for.cond.cleanup:
294; IS__TUNIT_OPM-NEXT:    br label [[FOR_END:%.*]]
295; IS__TUNIT_OPM:       for.body:
296; IS__TUNIT_OPM-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
297; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[I15]]
298; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC]]
299; IS__TUNIT_OPM:       for.inc:
300; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
301; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP15:![0-9]+]]
302; IS__TUNIT_OPM:       for.end:
303; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2:%.*]]
304; IS__TUNIT_OPM:       for.cond2:
305; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
306; IS__TUNIT_OPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
307; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
308; IS__TUNIT_OPM:       for.cond.cleanup4:
309; IS__TUNIT_OPM-NEXT:    br label [[FOR_END11:%.*]]
310; IS__TUNIT_OPM:       for.body5:
311; IS__TUNIT_OPM-NEXT:    [[I16:%.*]] = bitcast [1024 x i8]* [[BYTES]] to float*
312; IS__TUNIT_OPM-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
313; IS__TUNIT_OPM-NEXT:    [[I18:%.*]] = or i64 [[I17]], 1
314; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I16]], i64 [[I18]]
315; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC9]]
316; IS__TUNIT_OPM:       for.inc9:
317; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
318; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP17:![0-9]+]]
319; IS__TUNIT_OPM:       for.end11:
320; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND13:%.*]]
321; IS__TUNIT_OPM:       for.cond13:
322; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC22:%.*]] ], [ 0, [[FOR_END11]] ]
323; IS__TUNIT_OPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
324; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
325; IS__TUNIT_OPM:       for.cond.cleanup15:
326; IS__TUNIT_OPM-NEXT:    br label [[FOR_END24:%.*]]
327; IS__TUNIT_OPM:       for.body16:
328; IS__TUNIT_OPM-NEXT:    [[I19:%.*]] = bitcast [1024 x i8]* [[BYTES]] to i64*
329; IS__TUNIT_OPM-NEXT:    [[I20:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
330; IS__TUNIT_OPM-NEXT:    [[I21:%.*]] = add nuw nsw i64 [[I20]], 2
331; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX21:%.*]] = getelementptr inbounds i64, i64* [[I19]], i64 [[I21]]
332; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC22]]
333; IS__TUNIT_OPM:       for.inc22:
334; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
335; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP18:![0-9]+]]
336; IS__TUNIT_OPM:       for.end24:
337; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 1023
338; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500
339; IS__TUNIT_OPM-NEXT:    [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32*
340; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(524) [[I22]], i32 noundef 0) #[[ATTR6:[0-9]+]]
341; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND28:%.*]]
342; IS__TUNIT_OPM:       for.cond28:
343; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ]
344; IS__TUNIT_OPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
345; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY31:%.*]], label [[FOR_COND_CLEANUP30:%.*]]
346; IS__TUNIT_OPM:       for.cond.cleanup30:
347; IS__TUNIT_OPM-NEXT:    br label [[FOR_END38:%.*]]
348; IS__TUNIT_OPM:       for.body31:
349; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
350; IS__TUNIT_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX35]], align 1, !tbaa [[TBAA19:![0-9]+]]
351; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC36]]
352; IS__TUNIT_OPM:       for.inc36:
353; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
354; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND28]], !llvm.loop [[LOOP20:![0-9]+]]
355; IS__TUNIT_OPM:       for.end38:
356; IS__TUNIT_OPM-NEXT:    [[I24:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
357; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I24]])
358; IS__TUNIT_OPM-NEXT:    ret void
359;
360; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
361; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_2
362; IS__TUNIT_NPM-SAME: () #[[ATTR2:[0-9]+]] {
363; IS__TUNIT_NPM-NEXT:  entry:
364; IS__TUNIT_NPM-NEXT:    [[BYTES:%.*]] = alloca [1024 x i8], align 16
365; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
366; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]]) #[[ATTR6]]
367; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND:%.*]]
368; IS__TUNIT_NPM:       for.cond:
369; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
370; IS__TUNIT_NPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
371; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
372; IS__TUNIT_NPM:       for.cond.cleanup:
373; IS__TUNIT_NPM-NEXT:    br label [[FOR_END:%.*]]
374; IS__TUNIT_NPM:       for.body:
375; IS__TUNIT_NPM-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
376; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[I15]]
377; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC]]
378; IS__TUNIT_NPM:       for.inc:
379; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
380; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP15:![0-9]+]]
381; IS__TUNIT_NPM:       for.end:
382; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2:%.*]]
383; IS__TUNIT_NPM:       for.cond2:
384; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
385; IS__TUNIT_NPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
386; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
387; IS__TUNIT_NPM:       for.cond.cleanup4:
388; IS__TUNIT_NPM-NEXT:    br label [[FOR_END11:%.*]]
389; IS__TUNIT_NPM:       for.body5:
390; IS__TUNIT_NPM-NEXT:    [[I16:%.*]] = bitcast [1024 x i8]* [[BYTES]] to float*
391; IS__TUNIT_NPM-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
392; IS__TUNIT_NPM-NEXT:    [[I18:%.*]] = or i64 [[I17]], 1
393; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I16]], i64 [[I18]]
394; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC9]]
395; IS__TUNIT_NPM:       for.inc9:
396; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
397; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP17:![0-9]+]]
398; IS__TUNIT_NPM:       for.end11:
399; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND13:%.*]]
400; IS__TUNIT_NPM:       for.cond13:
401; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC22:%.*]] ], [ 0, [[FOR_END11]] ]
402; IS__TUNIT_NPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
403; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
404; IS__TUNIT_NPM:       for.cond.cleanup15:
405; IS__TUNIT_NPM-NEXT:    br label [[FOR_END24:%.*]]
406; IS__TUNIT_NPM:       for.body16:
407; IS__TUNIT_NPM-NEXT:    [[I19:%.*]] = bitcast [1024 x i8]* [[BYTES]] to i64*
408; IS__TUNIT_NPM-NEXT:    [[I20:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
409; IS__TUNIT_NPM-NEXT:    [[I21:%.*]] = add nuw nsw i64 [[I20]], 2
410; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX21:%.*]] = getelementptr inbounds i64, i64* [[I19]], i64 [[I21]]
411; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC22]]
412; IS__TUNIT_NPM:       for.inc22:
413; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
414; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP18:![0-9]+]]
415; IS__TUNIT_NPM:       for.end24:
416; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 1023
417; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500
418; IS__TUNIT_NPM-NEXT:    [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32*
419; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(524) [[I22]], i32 noundef 0) #[[ATTR4]]
420; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND28:%.*]]
421; IS__TUNIT_NPM:       for.cond28:
422; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ]
423; IS__TUNIT_NPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
424; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY31:%.*]], label [[FOR_COND_CLEANUP30:%.*]]
425; IS__TUNIT_NPM:       for.cond.cleanup30:
426; IS__TUNIT_NPM-NEXT:    br label [[FOR_END38:%.*]]
427; IS__TUNIT_NPM:       for.body31:
428; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
429; IS__TUNIT_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX35]], align 1, !tbaa [[TBAA19:![0-9]+]]
430; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC36]]
431; IS__TUNIT_NPM:       for.inc36:
432; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
433; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND28]], !llvm.loop [[LOOP20:![0-9]+]]
434; IS__TUNIT_NPM:       for.end38:
435; IS__TUNIT_NPM-NEXT:    [[I24:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
436; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I24]]) #[[ATTR6]]
437; IS__TUNIT_NPM-NEXT:    ret void
438;
439; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_2() {
440; IS__CGSCC_OPM-NEXT:  entry:
441; IS__CGSCC_OPM-NEXT:    [[BYTES:%.*]] = alloca [1024 x i8], align 16
442; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
443; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]])
444; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND:%.*]]
445; IS__CGSCC_OPM:       for.cond:
446; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
447; IS__CGSCC_OPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
448; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
449; IS__CGSCC_OPM:       for.cond.cleanup:
450; IS__CGSCC_OPM-NEXT:    br label [[FOR_END:%.*]]
451; IS__CGSCC_OPM:       for.body:
452; IS__CGSCC_OPM-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
453; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[I15]]
454; IS__CGSCC_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15:![0-9]+]]
455; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC]]
456; IS__CGSCC_OPM:       for.inc:
457; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
458; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP16:![0-9]+]]
459; IS__CGSCC_OPM:       for.end:
460; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND2:%.*]]
461; IS__CGSCC_OPM:       for.cond2:
462; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
463; IS__CGSCC_OPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
464; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
465; IS__CGSCC_OPM:       for.cond.cleanup4:
466; IS__CGSCC_OPM-NEXT:    br label [[FOR_END11:%.*]]
467; IS__CGSCC_OPM:       for.body5:
468; IS__CGSCC_OPM-NEXT:    [[I16:%.*]] = bitcast [1024 x i8]* [[BYTES]] to float*
469; IS__CGSCC_OPM-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
470; IS__CGSCC_OPM-NEXT:    [[I18:%.*]] = or i64 [[I17]], 1
471; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I16]], i64 [[I18]]
472; IS__CGSCC_OPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18:![0-9]+]]
473; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC9]]
474; IS__CGSCC_OPM:       for.inc9:
475; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
476; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP19:![0-9]+]]
477; IS__CGSCC_OPM:       for.end11:
478; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND13:%.*]]
479; IS__CGSCC_OPM:       for.cond13:
480; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC22:%.*]] ], [ 0, [[FOR_END11]] ]
481; IS__CGSCC_OPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
482; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
483; IS__CGSCC_OPM:       for.cond.cleanup15:
484; IS__CGSCC_OPM-NEXT:    br label [[FOR_END24:%.*]]
485; IS__CGSCC_OPM:       for.body16:
486; IS__CGSCC_OPM-NEXT:    [[I19:%.*]] = bitcast [1024 x i8]* [[BYTES]] to i64*
487; IS__CGSCC_OPM-NEXT:    [[I20:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
488; IS__CGSCC_OPM-NEXT:    [[I21:%.*]] = add nuw nsw i64 [[I20]], 2
489; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX21:%.*]] = getelementptr inbounds i64, i64* [[I19]], i64 [[I21]]
490; IS__CGSCC_OPM-NEXT:    store i64 0, i64* [[ARRAYIDX21]], align 16, !tbaa [[TBAA20:![0-9]+]]
491; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC22]]
492; IS__CGSCC_OPM:       for.inc22:
493; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
494; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP22:![0-9]+]]
495; IS__CGSCC_OPM:       for.end24:
496; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 1023
497; IS__CGSCC_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX25]], align 1, !tbaa [[TBAA15]]
498; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500
499; IS__CGSCC_OPM-NEXT:    [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32*
500; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I22]], i32 noundef 0) #[[ATTR10:[0-9]+]]
501; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND28:%.*]]
502; IS__CGSCC_OPM:       for.cond28:
503; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ]
504; IS__CGSCC_OPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
505; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY31:%.*]], label [[FOR_COND_CLEANUP30:%.*]]
506; IS__CGSCC_OPM:       for.cond.cleanup30:
507; IS__CGSCC_OPM-NEXT:    br label [[FOR_END38:%.*]]
508; IS__CGSCC_OPM:       for.body31:
509; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX33:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[INDVARS_IV12]]
510; IS__CGSCC_OPM-NEXT:    [[I23:%.*]] = load i8, i8* [[ARRAYIDX33]], align 1, !tbaa [[TBAA15]]
511; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
512; IS__CGSCC_OPM-NEXT:    store i8 [[I23]], i8* [[ARRAYIDX35]], align 1, !tbaa [[TBAA15]]
513; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC36]]
514; IS__CGSCC_OPM:       for.inc36:
515; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
516; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND28]], !llvm.loop [[LOOP23:![0-9]+]]
517; IS__CGSCC_OPM:       for.end38:
518; IS__CGSCC_OPM-NEXT:    [[I24:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
519; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nofree noundef nonnull [[I24]])
520; IS__CGSCC_OPM-NEXT:    ret void
521;
522; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_2() {
523; IS__CGSCC_NPM-NEXT:  entry:
524; IS__CGSCC_NPM-NEXT:    [[BYTES:%.*]] = alloca [1024 x i8], align 16
525; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
526; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]]) #[[ATTR8]]
527; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND:%.*]]
528; IS__CGSCC_NPM:       for.cond:
529; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
530; IS__CGSCC_NPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
531; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
532; IS__CGSCC_NPM:       for.cond.cleanup:
533; IS__CGSCC_NPM-NEXT:    br label [[FOR_END:%.*]]
534; IS__CGSCC_NPM:       for.body:
535; IS__CGSCC_NPM-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
536; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[I15]]
537; IS__CGSCC_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15:![0-9]+]]
538; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC]]
539; IS__CGSCC_NPM:       for.inc:
540; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
541; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP16:![0-9]+]]
542; IS__CGSCC_NPM:       for.end:
543; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND2:%.*]]
544; IS__CGSCC_NPM:       for.cond2:
545; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
546; IS__CGSCC_NPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
547; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
548; IS__CGSCC_NPM:       for.cond.cleanup4:
549; IS__CGSCC_NPM-NEXT:    br label [[FOR_END11:%.*]]
550; IS__CGSCC_NPM:       for.body5:
551; IS__CGSCC_NPM-NEXT:    [[I16:%.*]] = bitcast [1024 x i8]* [[BYTES]] to float*
552; IS__CGSCC_NPM-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
553; IS__CGSCC_NPM-NEXT:    [[I18:%.*]] = or i64 [[I17]], 1
554; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I16]], i64 [[I18]]
555; IS__CGSCC_NPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18:![0-9]+]]
556; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC9]]
557; IS__CGSCC_NPM:       for.inc9:
558; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
559; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP19:![0-9]+]]
560; IS__CGSCC_NPM:       for.end11:
561; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND13:%.*]]
562; IS__CGSCC_NPM:       for.cond13:
563; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC22:%.*]] ], [ 0, [[FOR_END11]] ]
564; IS__CGSCC_NPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
565; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
566; IS__CGSCC_NPM:       for.cond.cleanup15:
567; IS__CGSCC_NPM-NEXT:    br label [[FOR_END24:%.*]]
568; IS__CGSCC_NPM:       for.body16:
569; IS__CGSCC_NPM-NEXT:    [[I19:%.*]] = bitcast [1024 x i8]* [[BYTES]] to i64*
570; IS__CGSCC_NPM-NEXT:    [[I20:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
571; IS__CGSCC_NPM-NEXT:    [[I21:%.*]] = add nuw nsw i64 [[I20]], 2
572; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX21:%.*]] = getelementptr inbounds i64, i64* [[I19]], i64 [[I21]]
573; IS__CGSCC_NPM-NEXT:    store i64 0, i64* [[ARRAYIDX21]], align 16, !tbaa [[TBAA20:![0-9]+]]
574; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC22]]
575; IS__CGSCC_NPM:       for.inc22:
576; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
577; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP22:![0-9]+]]
578; IS__CGSCC_NPM:       for.end24:
579; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 1023
580; IS__CGSCC_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX25]], align 1, !tbaa [[TBAA15]]
581; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500
582; IS__CGSCC_NPM-NEXT:    [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32*
583; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I22]], i32 noundef 0) #[[ATTR10:[0-9]+]]
584; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND28:%.*]]
585; IS__CGSCC_NPM:       for.cond28:
586; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ]
587; IS__CGSCC_NPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
588; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY31:%.*]], label [[FOR_COND_CLEANUP30:%.*]]
589; IS__CGSCC_NPM:       for.cond.cleanup30:
590; IS__CGSCC_NPM-NEXT:    br label [[FOR_END38:%.*]]
591; IS__CGSCC_NPM:       for.body31:
592; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX33:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[INDVARS_IV12]]
593; IS__CGSCC_NPM-NEXT:    [[I23:%.*]] = load i8, i8* [[ARRAYIDX33]], align 1, !tbaa [[TBAA15]]
594; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
595; IS__CGSCC_NPM-NEXT:    store i8 [[I23]], i8* [[ARRAYIDX35]], align 1, !tbaa [[TBAA15]]
596; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC36]]
597; IS__CGSCC_NPM:       for.inc36:
598; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
599; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND28]], !llvm.loop [[LOOP23:![0-9]+]]
600; IS__CGSCC_NPM:       for.end38:
601; IS__CGSCC_NPM-NEXT:    [[I24:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
602; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nofree noundef nonnull [[I24]])
603; IS__CGSCC_NPM-NEXT:    ret void
604;
605entry:
606  %Bytes = alloca [1024 x i8], align 16
607  %i = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 0
608  call void @llvm.lifetime.start.p0i8(i64 1024, i8* nonnull %i)
609  br label %for.cond
610
611for.cond:                                         ; preds = %for.inc, %entry
612  %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
613  %exitcond = icmp ne i64 %indvars.iv, 100
614  br i1 %exitcond, label %for.body, label %for.cond.cleanup
615
616for.cond.cleanup:                                 ; preds = %for.cond
617  br label %for.end
618
619for.body:                                         ; preds = %for.cond
620  %i15 = mul nuw nsw i64 %indvars.iv, 10
621  %arrayidx = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 %i15
622  store i8 0, i8* %arrayidx, align 2, !tbaa !15
623  br label %for.inc
624
625for.inc:                                          ; preds = %for.body
626  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
627  br label %for.cond, !llvm.loop !16
628
629for.end:                                          ; preds = %for.cond.cleanup
630  br label %for.cond2
631
632for.cond2:                                        ; preds = %for.inc9, %for.end
633  %indvars.iv2 = phi i64 [ %indvars.iv.next3, %for.inc9 ], [ 0, %for.end ]
634  %exitcond6 = icmp ne i64 %indvars.iv2, 10
635  br i1 %exitcond6, label %for.body5, label %for.cond.cleanup4
636
637for.cond.cleanup4:                                ; preds = %for.cond2
638  br label %for.end11
639
640for.body5:                                        ; preds = %for.cond2
641  %i16 = bitcast [1024 x i8]* %Bytes to float*
642  %i17 = mul nuw nsw i64 %indvars.iv2, 10
643  %i18 = or i64 %i17, 1
644  %arrayidx8 = getelementptr inbounds float, float* %i16, i64 %i18
645  store float 0.000000e+00, float* %arrayidx8, align 4, !tbaa !18
646  br label %for.inc9
647
648for.inc9:                                         ; preds = %for.body5
649  %indvars.iv.next3 = add nuw nsw i64 %indvars.iv2, 1
650  br label %for.cond2, !llvm.loop !19
651
652for.end11:                                        ; preds = %for.cond.cleanup4
653  br label %for.cond13
654
655for.cond13:                                       ; preds = %for.inc22, %for.end11
656  %indvars.iv7 = phi i64 [ %indvars.iv.next8, %for.inc22 ], [ 0, %for.end11 ]
657  %exitcond11 = icmp ne i64 %indvars.iv7, 20
658  br i1 %exitcond11, label %for.body16, label %for.cond.cleanup15
659
660for.cond.cleanup15:                               ; preds = %for.cond13
661  br label %for.end24
662
663for.body16:                                       ; preds = %for.cond13
664  %i19 = bitcast [1024 x i8]* %Bytes to i64*
665  %i20 = mul nuw nsw i64 %indvars.iv7, 10
666  %i21 = add nuw nsw i64 %i20, 2
667  %arrayidx21 = getelementptr inbounds i64, i64* %i19, i64 %i21
668  store i64 0, i64* %arrayidx21, align 16, !tbaa !20
669  br label %for.inc22
670
671for.inc22:                                        ; preds = %for.body16
672  %indvars.iv.next8 = add nuw nsw i64 %indvars.iv7, 1
673  br label %for.cond13, !llvm.loop !22
674
675for.end24:                                        ; preds = %for.cond.cleanup15
676  %arrayidx25 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 1023
677  store i8 0, i8* %arrayidx25, align 1, !tbaa !15
678  %arrayidx26 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 500
679  %i22 = bitcast i8* %arrayidx26 to i32*
680  call void @write_arg(i32* nonnull %i22, i32 0)
681  br label %for.cond28
682
683for.cond28:                                       ; preds = %for.inc36, %for.end24
684  %indvars.iv12 = phi i64 [ %indvars.iv.next13, %for.inc36 ], [ 0, %for.end24 ]
685  %exitcond14 = icmp ne i64 %indvars.iv12, 1024
686  br i1 %exitcond14, label %for.body31, label %for.cond.cleanup30
687
688for.cond.cleanup30:                               ; preds = %for.cond28
689  br label %for.end38
690
691for.body31:                                       ; preds = %for.cond28
692  %arrayidx33 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 %indvars.iv12
693  %i23 = load i8, i8* %arrayidx33, align 1, !tbaa !15
694  %arrayidx35 = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 %indvars.iv12
695  store i8 %i23, i8* %arrayidx35, align 1, !tbaa !15
696  br label %for.inc36
697
698for.inc36:                                        ; preds = %for.body31
699  %indvars.iv.next13 = add nuw nsw i64 %indvars.iv12, 1
700  br label %for.cond28, !llvm.loop !23
701
702for.end38:                                        ; preds = %for.cond.cleanup30
703  %i24 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 0
704  call void @llvm.lifetime.end.p0i8(i64 1024, i8* nonnull %i24)
705  ret void
706}
707
708;    int local_alloca_simplifiable_3() {
709;      int A = 1;
710;      // split
711;      A = 2;
712;      return A;
713;    }
714;
715define i32 @local_alloca_simplifiable_3() {
716; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
717; IS__TUNIT____-LABEL: define {{[^@]+}}@local_alloca_simplifiable_3
718; IS__TUNIT____-SAME: () #[[ATTR3:[0-9]+]] {
719; IS__TUNIT____-NEXT:    [[A:%.*]] = alloca i32, align 4
720; IS__TUNIT____-NEXT:    store i32 1, i32* [[A]], align 4
721; IS__TUNIT____-NEXT:    br label [[SPLIT:%.*]]
722; IS__TUNIT____:       split:
723; IS__TUNIT____-NEXT:    store i32 2, i32* [[A]], align 4
724; IS__TUNIT____-NEXT:    [[L:%.*]] = load i32, i32* [[A]], align 4
725; IS__TUNIT____-NEXT:    ret i32 [[L]]
726;
727; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
728; IS__CGSCC____-LABEL: define {{[^@]+}}@local_alloca_simplifiable_3
729; IS__CGSCC____-SAME: () #[[ATTR2:[0-9]+]] {
730; IS__CGSCC____-NEXT:    [[A:%.*]] = alloca i32, align 4
731; IS__CGSCC____-NEXT:    store i32 1, i32* [[A]], align 4
732; IS__CGSCC____-NEXT:    br label [[SPLIT:%.*]]
733; IS__CGSCC____:       split:
734; IS__CGSCC____-NEXT:    store i32 2, i32* [[A]], align 4
735; IS__CGSCC____-NEXT:    [[L:%.*]] = load i32, i32* [[A]], align 4
736; IS__CGSCC____-NEXT:    ret i32 [[L]]
737;
738  %A = alloca i32, align 4
739  store i32 1, i32* %A
740  br label %split
741split:
742  store i32 2, i32* %A
743  %l = load i32, i32* %A, align 4
744  ret i32 %l
745}
746;    int local_alloca_simplifiable_4() {
747;      int A;
748;      return A;
749;    }
750;
751define i32 @local_alloca_simplifiable_4() {
752; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
753; IS__TUNIT____-LABEL: define {{[^@]+}}@local_alloca_simplifiable_4
754; IS__TUNIT____-SAME: () #[[ATTR3]] {
755; IS__TUNIT____-NEXT:    ret i32 undef
756;
757; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
758; IS__CGSCC____-LABEL: define {{[^@]+}}@local_alloca_simplifiable_4
759; IS__CGSCC____-SAME: () #[[ATTR2]] {
760; IS__CGSCC____-NEXT:    ret i32 undef
761;
762  %A = alloca i32, align 4
763  %l = load i32, i32* %A, align 4
764  ret i32 %l
765}
766
767;    static int GI1 __attribute__((loader_uninitialized));
768;    int multi_obj_simplifiable_1(int cnd) {
769;      int L = GI1 = 5;
770;      int *p = cnd ? &GI1 : &L;
771;      return *p;
772;    }
773define i32 @multi_obj_simplifiable_1(i32 %cnd) {
774; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn
775; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1
776; IS__TUNIT_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR4:[0-9]+]] {
777; IS__TUNIT_OPM-NEXT:  entry:
778; IS__TUNIT_OPM-NEXT:    [[L:%.*]] = alloca i32, align 4
779; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = bitcast i32* [[L]] to i8*
780; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR8]]
781; IS__TUNIT_OPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
782; IS__TUNIT_OPM-NEXT:    br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
783; IS__TUNIT_OPM:       cond.true:
784; IS__TUNIT_OPM-NEXT:    br label [[COND_END:%.*]]
785; IS__TUNIT_OPM:       cond.false:
786; IS__TUNIT_OPM-NEXT:    br label [[COND_END]]
787; IS__TUNIT_OPM:       cond.end:
788; IS__TUNIT_OPM-NEXT:    [[I2:%.*]] = bitcast i32* [[L]] to i8*
789; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR8]]
790; IS__TUNIT_OPM-NEXT:    ret i32 5
791;
792; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
793; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1
794; IS__TUNIT_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR2]] {
795; IS__TUNIT_NPM-NEXT:  entry:
796; IS__TUNIT_NPM-NEXT:    [[L:%.*]] = alloca i32, align 4
797; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = bitcast i32* [[L]] to i8*
798; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR6]]
799; IS__TUNIT_NPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
800; IS__TUNIT_NPM-NEXT:    br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
801; IS__TUNIT_NPM:       cond.true:
802; IS__TUNIT_NPM-NEXT:    br label [[COND_END:%.*]]
803; IS__TUNIT_NPM:       cond.false:
804; IS__TUNIT_NPM-NEXT:    br label [[COND_END]]
805; IS__TUNIT_NPM:       cond.end:
806; IS__TUNIT_NPM-NEXT:    [[I2:%.*]] = bitcast i32* [[L]] to i8*
807; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR6]]
808; IS__TUNIT_NPM-NEXT:    ret i32 5
809;
810; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
811; IS__CGSCC____-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1
812; IS__CGSCC____-SAME: (i32 [[CND:%.*]]) #[[ATTR3:[0-9]+]] {
813; IS__CGSCC____-NEXT:  entry:
814; IS__CGSCC____-NEXT:    [[L:%.*]] = alloca i32, align 4
815; IS__CGSCC____-NEXT:    [[I:%.*]] = bitcast i32* [[L]] to i8*
816; IS__CGSCC____-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR8]]
817; IS__CGSCC____-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
818; IS__CGSCC____-NEXT:    br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
819; IS__CGSCC____:       cond.true:
820; IS__CGSCC____-NEXT:    br label [[COND_END:%.*]]
821; IS__CGSCC____:       cond.false:
822; IS__CGSCC____-NEXT:    br label [[COND_END]]
823; IS__CGSCC____:       cond.end:
824; IS__CGSCC____-NEXT:    [[I2:%.*]] = bitcast i32* [[L]] to i8*
825; IS__CGSCC____-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR8]]
826; IS__CGSCC____-NEXT:    ret i32 5
827;
828entry:
829  %L = alloca i32, align 4
830  %i = bitcast i32* %L to i8*
831  call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %i)
832  store i32 5, i32* @GI1, align 4, !tbaa !3
833  store i32 5, i32* %L, align 4, !tbaa !3
834  %tobool.not = icmp eq i32 %cnd, 0
835  br i1 %tobool.not, label %cond.false, label %cond.true
836
837cond.true:                                        ; preds = %entry
838  br label %cond.end
839
840cond.false:                                       ; preds = %entry
841  br label %cond.end
842
843cond.end:                                         ; preds = %cond.false, %cond.true
844  %cond = phi i32* [ @GI1, %cond.true ], [ %L, %cond.false ]
845  %i1 = load i32, i32* %cond, align 4, !tbaa !3
846  %i2 = bitcast i32* %L to i8*
847  call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %i2)
848  ret i32 %i1
849}
850
851;    static int GI2 __attribute__((loader_uninitialized));
852;    int multi_obj_simplifiable_2(int cnd) {
853;      int L;
854;      int *p = cnd ? &GI2 : &L;
855;      *p = 5;
856;      return *p;
857;    }
858;
859define i32 @multi_obj_simplifiable_2(i32 %cnd) {
860; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn
861; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2
862; IS__TUNIT_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR4]] {
863; IS__TUNIT_OPM-NEXT:  entry:
864; IS__TUNIT_OPM-NEXT:    [[L:%.*]] = alloca i32, align 4
865; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = bitcast i32* [[L]] to i8*
866; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR8]]
867; IS__TUNIT_OPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
868; IS__TUNIT_OPM-NEXT:    br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
869; IS__TUNIT_OPM:       cond.true:
870; IS__TUNIT_OPM-NEXT:    br label [[COND_END:%.*]]
871; IS__TUNIT_OPM:       cond.false:
872; IS__TUNIT_OPM-NEXT:    br label [[COND_END]]
873; IS__TUNIT_OPM:       cond.end:
874; IS__TUNIT_OPM-NEXT:    [[I1:%.*]] = bitcast i32* [[L]] to i8*
875; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR8]]
876; IS__TUNIT_OPM-NEXT:    ret i32 5
877;
878; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
879; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2
880; IS__TUNIT_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR2]] {
881; IS__TUNIT_NPM-NEXT:  entry:
882; IS__TUNIT_NPM-NEXT:    [[L:%.*]] = alloca i32, align 4
883; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = bitcast i32* [[L]] to i8*
884; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR6]]
885; IS__TUNIT_NPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
886; IS__TUNIT_NPM-NEXT:    br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
887; IS__TUNIT_NPM:       cond.true:
888; IS__TUNIT_NPM-NEXT:    br label [[COND_END:%.*]]
889; IS__TUNIT_NPM:       cond.false:
890; IS__TUNIT_NPM-NEXT:    br label [[COND_END]]
891; IS__TUNIT_NPM:       cond.end:
892; IS__TUNIT_NPM-NEXT:    [[I1:%.*]] = bitcast i32* [[L]] to i8*
893; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR6]]
894; IS__TUNIT_NPM-NEXT:    ret i32 5
895;
896; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
897; IS__CGSCC____-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2
898; IS__CGSCC____-SAME: (i32 [[CND:%.*]]) #[[ATTR3]] {
899; IS__CGSCC____-NEXT:  entry:
900; IS__CGSCC____-NEXT:    [[L:%.*]] = alloca i32, align 4
901; IS__CGSCC____-NEXT:    [[I:%.*]] = bitcast i32* [[L]] to i8*
902; IS__CGSCC____-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR8]]
903; IS__CGSCC____-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
904; IS__CGSCC____-NEXT:    br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
905; IS__CGSCC____:       cond.true:
906; IS__CGSCC____-NEXT:    br label [[COND_END:%.*]]
907; IS__CGSCC____:       cond.false:
908; IS__CGSCC____-NEXT:    br label [[COND_END]]
909; IS__CGSCC____:       cond.end:
910; IS__CGSCC____-NEXT:    [[I1:%.*]] = bitcast i32* [[L]] to i8*
911; IS__CGSCC____-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR8]]
912; IS__CGSCC____-NEXT:    ret i32 5
913;
914entry:
915  %L = alloca i32, align 4
916  %i = bitcast i32* %L to i8*
917  call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %i)
918  %tobool.not = icmp eq i32 %cnd, 0
919  br i1 %tobool.not, label %cond.false, label %cond.true
920
921cond.true:                                        ; preds = %entry
922  br label %cond.end
923
924cond.false:                                       ; preds = %entry
925  br label %cond.end
926
927cond.end:                                         ; preds = %cond.false, %cond.true
928  %cond = phi i32* [ @GI2, %cond.true ], [ %L, %cond.false ]
929  store i32 5, i32* %cond, align 4, !tbaa !3
930  %i1 = bitcast i32* %L to i8*
931  %l = load i32, i32* %cond, align 4, !tbaa !3
932  call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %i1)
933  ret i32 %l
934}
935
936;    static struct S Gs __attribute__((loader_uninitialized));
937;    struct S static_global_simplifiable_1(void) {
938;      Gs.f1 = 1.1;
939;      Gs.f2 = 2.2;
940;      Gs.f3 = 3.3;
941;      write_arg(&Gs.i1, 1);
942;      write_arg(&Gs.i2, 2);
943;      write_arg(&Gs.i3, 3);
944;      struct S r;
945;      r.f1 = Gs.f1;
946;      r.f2 = Gs.f2 * 2;
947;      r.f3 = Gs.f3 + Gs.f1;
948;      r.i1 = Gs.i1;
949;      r.i2 = Gs.i2 * 2;
950;      r.i3 = Gs.i3 + Gs.i1;
951;      return r;
952;    }
953;
954define void @static_global_simplifiable_1(%struct.S* noalias sret(%struct.S) align 4 %agg.result) {
955; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn writeonly
956; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@static_global_simplifiable_1
957; IS__TUNIT_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR5]] {
958; IS__TUNIT_OPM-NEXT:  entry:
959; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), i32 noundef 1) #[[ATTR5]]
960; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(20) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), i32 noundef 2) #[[ATTR5]]
961; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(16) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), i32 noundef 3) #[[ATTR5]]
962; IS__TUNIT_OPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
963; IS__TUNIT_OPM-NEXT:    store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
964; IS__TUNIT_OPM-NEXT:    [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00
965; IS__TUNIT_OPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
966; IS__TUNIT_OPM-NEXT:    store float [[MUL]], float* [[F2]], align 4, !tbaa [[TBAA10]]
967; IS__TUNIT_OPM-NEXT:    [[ADD:%.*]] = fadd float 0x400A666660000000, 0x3FF19999A0000000
968; IS__TUNIT_OPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
969; IS__TUNIT_OPM-NEXT:    store float [[ADD]], float* [[F3]], align 4, !tbaa [[TBAA11]]
970; IS__TUNIT_OPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
971; IS__TUNIT_OPM-NEXT:    store i32 1, i32* [[I1]], align 4, !tbaa [[TBAA12]]
972; IS__TUNIT_OPM-NEXT:    [[MUL1:%.*]] = shl nsw i32 2, 1
973; IS__TUNIT_OPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
974; IS__TUNIT_OPM-NEXT:    store i32 [[MUL1]], i32* [[I2]], align 4, !tbaa [[TBAA13]]
975; IS__TUNIT_OPM-NEXT:    [[ADD2:%.*]] = add nsw i32 3, 1
976; IS__TUNIT_OPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
977; IS__TUNIT_OPM-NEXT:    store i32 [[ADD2]], i32* [[I3]], align 4, !tbaa [[TBAA14]]
978; IS__TUNIT_OPM-NEXT:    ret void
979;
980; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly
981; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_1
982; IS__TUNIT_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR4]] {
983; IS__TUNIT_NPM-NEXT:  entry:
984; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), i32 noundef 1) #[[ATTR4]]
985; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(20) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), i32 noundef 2) #[[ATTR4]]
986; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(16) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), i32 noundef 3) #[[ATTR4]]
987; IS__TUNIT_NPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
988; IS__TUNIT_NPM-NEXT:    store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
989; IS__TUNIT_NPM-NEXT:    [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00
990; IS__TUNIT_NPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
991; IS__TUNIT_NPM-NEXT:    store float [[MUL]], float* [[F2]], align 4, !tbaa [[TBAA10]]
992; IS__TUNIT_NPM-NEXT:    [[ADD:%.*]] = fadd float 0x400A666660000000, 0x3FF19999A0000000
993; IS__TUNIT_NPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
994; IS__TUNIT_NPM-NEXT:    store float [[ADD]], float* [[F3]], align 4, !tbaa [[TBAA11]]
995; IS__TUNIT_NPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
996; IS__TUNIT_NPM-NEXT:    store i32 1, i32* [[I1]], align 4, !tbaa [[TBAA12]]
997; IS__TUNIT_NPM-NEXT:    [[MUL1:%.*]] = shl nsw i32 2, 1
998; IS__TUNIT_NPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
999; IS__TUNIT_NPM-NEXT:    store i32 [[MUL1]], i32* [[I2]], align 4, !tbaa [[TBAA13]]
1000; IS__TUNIT_NPM-NEXT:    [[ADD2:%.*]] = add nsw i32 3, 1
1001; IS__TUNIT_NPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
1002; IS__TUNIT_NPM-NEXT:    store i32 [[ADD2]], i32* [[I3]], align 4, !tbaa [[TBAA14]]
1003; IS__TUNIT_NPM-NEXT:    ret void
1004;
1005; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
1006; IS__CGSCC____-LABEL: define {{[^@]+}}@static_global_simplifiable_1
1007; IS__CGSCC____-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR4:[0-9]+]] {
1008; IS__CGSCC____-NEXT:  entry:
1009; IS__CGSCC____-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), i32 noundef 1) #[[ATTR9]]
1010; IS__CGSCC____-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), i32 noundef 2) #[[ATTR9]]
1011; IS__CGSCC____-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), i32 noundef 3) #[[ATTR9]]
1012; IS__CGSCC____-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
1013; IS__CGSCC____-NEXT:    store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
1014; IS__CGSCC____-NEXT:    [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00
1015; IS__CGSCC____-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
1016; IS__CGSCC____-NEXT:    store float [[MUL]], float* [[F2]], align 4, !tbaa [[TBAA10]]
1017; IS__CGSCC____-NEXT:    [[ADD:%.*]] = fadd float 0x400A666660000000, 0x3FF19999A0000000
1018; IS__CGSCC____-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
1019; IS__CGSCC____-NEXT:    store float [[ADD]], float* [[F3]], align 4, !tbaa [[TBAA11]]
1020; IS__CGSCC____-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
1021; IS__CGSCC____-NEXT:    store i32 1, i32* [[I1]], align 4, !tbaa [[TBAA12]]
1022; IS__CGSCC____-NEXT:    [[MUL1:%.*]] = shl nsw i32 2, 1
1023; IS__CGSCC____-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
1024; IS__CGSCC____-NEXT:    store i32 [[MUL1]], i32* [[I2]], align 4, !tbaa [[TBAA13]]
1025; IS__CGSCC____-NEXT:    [[ADD2:%.*]] = add nsw i32 3, 1
1026; IS__CGSCC____-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
1027; IS__CGSCC____-NEXT:    store i32 [[ADD2]], i32* [[I3]], align 4, !tbaa [[TBAA14]]
1028; IS__CGSCC____-NEXT:    ret void
1029;
1030entry:
1031  store float 0x3FF19999A0000000, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa !7
1032  store float 0x40019999A0000000, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 4), align 4, !tbaa !10
1033  store float 0x400A666660000000, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 5), align 4, !tbaa !11
1034  call void @write_arg(i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 0), i32 1)
1035  call void @write_arg(i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 1), i32 2)
1036  call void @write_arg(i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 2), i32 3)
1037  %i = load float, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa !7
1038  %f1 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 3
1039  store float %i, float* %f1, align 4, !tbaa !7
1040  %i4 = load float, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 4), align 4, !tbaa !10
1041  %mul = fmul float %i4, 2.000000e+00
1042  %f2 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 4
1043  store float %mul, float* %f2, align 4, !tbaa !10
1044  %i5 = load float, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 5), align 4, !tbaa !11
1045  %i6 = load float, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa !7
1046  %add = fadd float %i5, %i6
1047  %f3 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 5
1048  store float %add, float* %f3, align 4, !tbaa !11
1049  %i7 = load i32, i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 0), align 4, !tbaa !12
1050  %i1 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 0
1051  store i32 %i7, i32* %i1, align 4, !tbaa !12
1052  %i8 = load i32, i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 1), align 4, !tbaa !13
1053  %mul1 = shl nsw i32 %i8, 1
1054  %i2 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 1
1055  store i32 %mul1, i32* %i2, align 4, !tbaa !13
1056  %i9 = load i32, i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 2), align 4, !tbaa !14
1057  %i10 = load i32, i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 0), align 4, !tbaa !12
1058  %add2 = add nsw i32 %i9, %i10
1059  %i3 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 2
1060  store i32 %add2, i32* %i3, align 4, !tbaa !14
1061  ret void
1062}
1063
1064;    static char GBytes[1024];
1065;    void static_global_simplifiable_2(void) {
1066;      for (int i = 0; i < 100; ++i)
1067;        GBytes[i * 10] = 0;
1068;      for (int i = 0; i < 10; ++i)
1069;        ((float *)GBytes)[i * 10 + 1] = 0;
1070;      for (int i = 0; i < 20; ++i)
1071;        ((long long int *)GBytes)[i * 10 + 2] = 0;
1072;      GBytes[1023] = 0;
1073;      write_arg((int *)&GBytes[500], 0);
1074;      struct S R;
1075;      for (int i = 0; i < 1024; ++i)
1076;        globalBytes[i] = GBytes[i];
1077;    }
1078;
1079define void @static_global_simplifiable_2() {
1080; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind writeonly
1081; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@static_global_simplifiable_2
1082; IS__TUNIT_OPM-SAME: () #[[ATTR6]] {
1083; IS__TUNIT_OPM-NEXT:  entry:
1084; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND:%.*]]
1085; IS__TUNIT_OPM:       for.cond:
1086; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
1087; IS__TUNIT_OPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
1088; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
1089; IS__TUNIT_OPM:       for.cond.cleanup:
1090; IS__TUNIT_OPM-NEXT:    br label [[FOR_END:%.*]]
1091; IS__TUNIT_OPM:       for.body:
1092; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
1093; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[I]]
1094; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC]]
1095; IS__TUNIT_OPM:       for.inc:
1096; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
1097; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP21:![0-9]+]]
1098; IS__TUNIT_OPM:       for.end:
1099; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2:%.*]]
1100; IS__TUNIT_OPM:       for.cond2:
1101; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
1102; IS__TUNIT_OPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
1103; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
1104; IS__TUNIT_OPM:       for.cond.cleanup4:
1105; IS__TUNIT_OPM-NEXT:    br label [[FOR_END11:%.*]]
1106; IS__TUNIT_OPM:       for.body5:
1107; IS__TUNIT_OPM-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
1108; IS__TUNIT_OPM-NEXT:    [[I16:%.*]] = or i64 [[I15]], 1
1109; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 [[I16]]
1110; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC9]]
1111; IS__TUNIT_OPM:       for.inc9:
1112; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
1113; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP22:![0-9]+]]
1114; IS__TUNIT_OPM:       for.end11:
1115; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND13:%.*]]
1116; IS__TUNIT_OPM:       for.cond13:
1117; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
1118; IS__TUNIT_OPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
1119; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
1120; IS__TUNIT_OPM:       for.cond.cleanup15:
1121; IS__TUNIT_OPM-NEXT:    br label [[FOR_END23:%.*]]
1122; IS__TUNIT_OPM:       for.body16:
1123; IS__TUNIT_OPM-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
1124; IS__TUNIT_OPM-NEXT:    [[I18:%.*]] = add nuw nsw i64 [[I17]], 2
1125; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 [[I18]]
1126; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC21]]
1127; IS__TUNIT_OPM:       for.inc21:
1128; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
1129; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP23:![0-9]+]]
1130; IS__TUNIT_OPM:       for.end23:
1131; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(524) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR6]]
1132; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND25:%.*]]
1133; IS__TUNIT_OPM:       for.cond25:
1134; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ]
1135; IS__TUNIT_OPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
1136; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY28:%.*]], label [[FOR_COND_CLEANUP27:%.*]]
1137; IS__TUNIT_OPM:       for.cond.cleanup27:
1138; IS__TUNIT_OPM-NEXT:    br label [[FOR_END35:%.*]]
1139; IS__TUNIT_OPM:       for.body28:
1140; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
1141; IS__TUNIT_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA19]]
1142; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC33]]
1143; IS__TUNIT_OPM:       for.inc33:
1144; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
1145; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND25]], !llvm.loop [[LOOP24:![0-9]+]]
1146; IS__TUNIT_OPM:       for.end35:
1147; IS__TUNIT_OPM-NEXT:    ret void
1148;
1149; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly
1150; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_2
1151; IS__TUNIT_NPM-SAME: () #[[ATTR4]] {
1152; IS__TUNIT_NPM-NEXT:  entry:
1153; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND:%.*]]
1154; IS__TUNIT_NPM:       for.cond:
1155; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
1156; IS__TUNIT_NPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
1157; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
1158; IS__TUNIT_NPM:       for.cond.cleanup:
1159; IS__TUNIT_NPM-NEXT:    br label [[FOR_END:%.*]]
1160; IS__TUNIT_NPM:       for.body:
1161; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
1162; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[I]]
1163; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC]]
1164; IS__TUNIT_NPM:       for.inc:
1165; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
1166; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP21:![0-9]+]]
1167; IS__TUNIT_NPM:       for.end:
1168; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2:%.*]]
1169; IS__TUNIT_NPM:       for.cond2:
1170; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
1171; IS__TUNIT_NPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
1172; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
1173; IS__TUNIT_NPM:       for.cond.cleanup4:
1174; IS__TUNIT_NPM-NEXT:    br label [[FOR_END11:%.*]]
1175; IS__TUNIT_NPM:       for.body5:
1176; IS__TUNIT_NPM-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
1177; IS__TUNIT_NPM-NEXT:    [[I16:%.*]] = or i64 [[I15]], 1
1178; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 [[I16]]
1179; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC9]]
1180; IS__TUNIT_NPM:       for.inc9:
1181; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
1182; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP22:![0-9]+]]
1183; IS__TUNIT_NPM:       for.end11:
1184; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND13:%.*]]
1185; IS__TUNIT_NPM:       for.cond13:
1186; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
1187; IS__TUNIT_NPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
1188; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
1189; IS__TUNIT_NPM:       for.cond.cleanup15:
1190; IS__TUNIT_NPM-NEXT:    br label [[FOR_END23:%.*]]
1191; IS__TUNIT_NPM:       for.body16:
1192; IS__TUNIT_NPM-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
1193; IS__TUNIT_NPM-NEXT:    [[I18:%.*]] = add nuw nsw i64 [[I17]], 2
1194; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 [[I18]]
1195; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC21]]
1196; IS__TUNIT_NPM:       for.inc21:
1197; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
1198; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP23:![0-9]+]]
1199; IS__TUNIT_NPM:       for.end23:
1200; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(524) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR4]]
1201; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND25:%.*]]
1202; IS__TUNIT_NPM:       for.cond25:
1203; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ]
1204; IS__TUNIT_NPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
1205; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY28:%.*]], label [[FOR_COND_CLEANUP27:%.*]]
1206; IS__TUNIT_NPM:       for.cond.cleanup27:
1207; IS__TUNIT_NPM-NEXT:    br label [[FOR_END35:%.*]]
1208; IS__TUNIT_NPM:       for.body28:
1209; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
1210; IS__TUNIT_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA19]]
1211; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC33]]
1212; IS__TUNIT_NPM:       for.inc33:
1213; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
1214; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND25]], !llvm.loop [[LOOP24:![0-9]+]]
1215; IS__TUNIT_NPM:       for.end35:
1216; IS__TUNIT_NPM-NEXT:    ret void
1217;
1218; IS__CGSCC____-LABEL: define {{[^@]+}}@static_global_simplifiable_2() {
1219; IS__CGSCC____-NEXT:  entry:
1220; IS__CGSCC____-NEXT:    br label [[FOR_COND:%.*]]
1221; IS__CGSCC____:       for.cond:
1222; IS__CGSCC____-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
1223; IS__CGSCC____-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
1224; IS__CGSCC____-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
1225; IS__CGSCC____:       for.cond.cleanup:
1226; IS__CGSCC____-NEXT:    br label [[FOR_END:%.*]]
1227; IS__CGSCC____:       for.body:
1228; IS__CGSCC____-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
1229; IS__CGSCC____-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[I]]
1230; IS__CGSCC____-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15:![0-9]+]]
1231; IS__CGSCC____-NEXT:    br label [[FOR_INC]]
1232; IS__CGSCC____:       for.inc:
1233; IS__CGSCC____-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
1234; IS__CGSCC____-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP24:![0-9]+]]
1235; IS__CGSCC____:       for.end:
1236; IS__CGSCC____-NEXT:    br label [[FOR_COND2:%.*]]
1237; IS__CGSCC____:       for.cond2:
1238; IS__CGSCC____-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
1239; IS__CGSCC____-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
1240; IS__CGSCC____-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
1241; IS__CGSCC____:       for.cond.cleanup4:
1242; IS__CGSCC____-NEXT:    br label [[FOR_END11:%.*]]
1243; IS__CGSCC____:       for.body5:
1244; IS__CGSCC____-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
1245; IS__CGSCC____-NEXT:    [[I16:%.*]] = or i64 [[I15]], 1
1246; IS__CGSCC____-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 [[I16]]
1247; IS__CGSCC____-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18:![0-9]+]]
1248; IS__CGSCC____-NEXT:    br label [[FOR_INC9]]
1249; IS__CGSCC____:       for.inc9:
1250; IS__CGSCC____-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
1251; IS__CGSCC____-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP25:![0-9]+]]
1252; IS__CGSCC____:       for.end11:
1253; IS__CGSCC____-NEXT:    br label [[FOR_COND13:%.*]]
1254; IS__CGSCC____:       for.cond13:
1255; IS__CGSCC____-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
1256; IS__CGSCC____-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
1257; IS__CGSCC____-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
1258; IS__CGSCC____:       for.cond.cleanup15:
1259; IS__CGSCC____-NEXT:    br label [[FOR_END23:%.*]]
1260; IS__CGSCC____:       for.body16:
1261; IS__CGSCC____-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
1262; IS__CGSCC____-NEXT:    [[I18:%.*]] = add nuw nsw i64 [[I17]], 2
1263; IS__CGSCC____-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 [[I18]]
1264; IS__CGSCC____-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 16, !tbaa [[TBAA20:![0-9]+]]
1265; IS__CGSCC____-NEXT:    br label [[FOR_INC21]]
1266; IS__CGSCC____:       for.inc21:
1267; IS__CGSCC____-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
1268; IS__CGSCC____-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP26:![0-9]+]]
1269; IS__CGSCC____:       for.end23:
1270; IS__CGSCC____-NEXT:    store i8 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 1023), align 1, !tbaa [[TBAA15]]
1271; IS__CGSCC____-NEXT:    call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR10:[0-9]+]]
1272; IS__CGSCC____-NEXT:    br label [[FOR_COND25:%.*]]
1273; IS__CGSCC____:       for.cond25:
1274; IS__CGSCC____-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ]
1275; IS__CGSCC____-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
1276; IS__CGSCC____-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY28:%.*]], label [[FOR_COND_CLEANUP27:%.*]]
1277; IS__CGSCC____:       for.cond.cleanup27:
1278; IS__CGSCC____-NEXT:    br label [[FOR_END35:%.*]]
1279; IS__CGSCC____:       for.body28:
1280; IS__CGSCC____-NEXT:    [[ARRAYIDX30:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[INDVARS_IV12]]
1281; IS__CGSCC____-NEXT:    [[I19:%.*]] = load i8, i8* [[ARRAYIDX30]], align 1, !tbaa [[TBAA15]]
1282; IS__CGSCC____-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
1283; IS__CGSCC____-NEXT:    store i8 [[I19]], i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]]
1284; IS__CGSCC____-NEXT:    br label [[FOR_INC33]]
1285; IS__CGSCC____:       for.inc33:
1286; IS__CGSCC____-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
1287; IS__CGSCC____-NEXT:    br label [[FOR_COND25]], !llvm.loop [[LOOP27:![0-9]+]]
1288; IS__CGSCC____:       for.end35:
1289; IS__CGSCC____-NEXT:    ret void
1290;
1291entry:
1292  br label %for.cond
1293
1294for.cond:                                         ; preds = %for.inc, %entry
1295  %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
1296  %exitcond = icmp ne i64 %indvars.iv, 100
1297  br i1 %exitcond, label %for.body, label %for.cond.cleanup
1298
1299for.cond.cleanup:                                 ; preds = %for.cond
1300  br label %for.end
1301
1302for.body:                                         ; preds = %for.cond
1303  %i = mul nuw nsw i64 %indvars.iv, 10
1304  %arrayidx = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 %i
1305  store i8 0, i8* %arrayidx, align 2, !tbaa !15
1306  br label %for.inc
1307
1308for.inc:                                          ; preds = %for.body
1309  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
1310  br label %for.cond, !llvm.loop !24
1311
1312for.end:                                          ; preds = %for.cond.cleanup
1313  br label %for.cond2
1314
1315for.cond2:                                        ; preds = %for.inc9, %for.end
1316  %indvars.iv2 = phi i64 [ %indvars.iv.next3, %for.inc9 ], [ 0, %for.end ]
1317  %exitcond6 = icmp ne i64 %indvars.iv2, 10
1318  br i1 %exitcond6, label %for.body5, label %for.cond.cleanup4
1319
1320for.cond.cleanup4:                                ; preds = %for.cond2
1321  br label %for.end11
1322
1323for.body5:                                        ; preds = %for.cond2
1324  %i15 = mul nuw nsw i64 %indvars.iv2, 10
1325  %i16 = or i64 %i15, 1
1326  %arrayidx8 = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 %i16
1327  store float 0.000000e+00, float* %arrayidx8, align 4, !tbaa !18
1328  br label %for.inc9
1329
1330for.inc9:                                         ; preds = %for.body5
1331  %indvars.iv.next3 = add nuw nsw i64 %indvars.iv2, 1
1332  br label %for.cond2, !llvm.loop !25
1333
1334for.end11:                                        ; preds = %for.cond.cleanup4
1335  br label %for.cond13
1336
1337for.cond13:                                       ; preds = %for.inc21, %for.end11
1338  %indvars.iv7 = phi i64 [ %indvars.iv.next8, %for.inc21 ], [ 0, %for.end11 ]
1339  %exitcond11 = icmp ne i64 %indvars.iv7, 20
1340  br i1 %exitcond11, label %for.body16, label %for.cond.cleanup15
1341
1342for.cond.cleanup15:                               ; preds = %for.cond13
1343  br label %for.end23
1344
1345for.body16:                                       ; preds = %for.cond13
1346  %i17 = mul nuw nsw i64 %indvars.iv7, 10
1347  %i18 = add nuw nsw i64 %i17, 2
1348  %arrayidx20 = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 %i18
1349  store i64 0, i64* %arrayidx20, align 16, !tbaa !20
1350  br label %for.inc21
1351
1352for.inc21:                                        ; preds = %for.body16
1353  %indvars.iv.next8 = add nuw nsw i64 %indvars.iv7, 1
1354  br label %for.cond13, !llvm.loop !26
1355
1356for.end23:                                        ; preds = %for.cond.cleanup15
1357  store i8 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 1023), align 1, !tbaa !15
1358  call void @write_arg(i32* bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 0)
1359  br label %for.cond25
1360
1361for.cond25:                                       ; preds = %for.inc33, %for.end23
1362  %indvars.iv12 = phi i64 [ %indvars.iv.next13, %for.inc33 ], [ 0, %for.end23 ]
1363  %exitcond14 = icmp ne i64 %indvars.iv12, 1024
1364  br i1 %exitcond14, label %for.body28, label %for.cond.cleanup27
1365
1366for.cond.cleanup27:                               ; preds = %for.cond25
1367  br label %for.end35
1368
1369for.body28:                                       ; preds = %for.cond25
1370  %arrayidx30 = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 %indvars.iv12
1371  %i19 = load i8, i8* %arrayidx30, align 1, !tbaa !15
1372  %arrayidx32 = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 %indvars.iv12
1373  store i8 %i19, i8* %arrayidx32, align 1, !tbaa !15
1374  br label %for.inc33
1375
1376for.inc33:                                        ; preds = %for.body28
1377  %indvars.iv.next13 = add nuw nsw i64 %indvars.iv12, 1
1378  br label %for.cond25, !llvm.loop !27
1379
1380for.end35:                                        ; preds = %for.cond.cleanup27
1381  ret void
1382}
1383
1384;    static int Flag3;
1385;    int static_global_simplifiable_3() {
1386;      Flag3 = 1;
1387;      return Flag3;
1388;    }
1389define i32 @static_global_simplifiable_3() {
1390; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn
1391; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@static_global_simplifiable_3
1392; IS__TUNIT_OPM-SAME: () #[[ATTR4]] {
1393; IS__TUNIT_OPM-NEXT:    store i32 1, i32* @Flag3, align 4, !tbaa [[TBAA3]]
1394; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = load i32, i32* @Flag3, align 4, !tbaa [[TBAA3]]
1395; IS__TUNIT_OPM-NEXT:    ret i32 [[I]]
1396;
1397; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
1398; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_3
1399; IS__TUNIT_NPM-SAME: () #[[ATTR2]] {
1400; IS__TUNIT_NPM-NEXT:    store i32 1, i32* @Flag3, align 4, !tbaa [[TBAA3]]
1401; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = load i32, i32* @Flag3, align 4, !tbaa [[TBAA3]]
1402; IS__TUNIT_NPM-NEXT:    ret i32 [[I]]
1403;
1404; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn
1405; IS__CGSCC____-LABEL: define {{[^@]+}}@static_global_simplifiable_3
1406; IS__CGSCC____-SAME: () #[[ATTR5:[0-9]+]] {
1407; IS__CGSCC____-NEXT:    store i32 1, i32* @Flag3, align 4, !tbaa [[TBAA3]]
1408; IS__CGSCC____-NEXT:    [[I:%.*]] = load i32, i32* @Flag3, align 4, !tbaa [[TBAA3]]
1409; IS__CGSCC____-NEXT:    ret i32 [[I]]
1410;
1411  store i32 1, i32* @Flag3, align 4, !tbaa !3
1412  %i = load i32, i32* @Flag3, align 4, !tbaa !3
1413  ret i32 %i
1414}
1415
1416;    struct S noalias_arg_simplifiable_1(struct S s) {
1417;      s.f1 = 1.1;
1418;      s.f2 = 2.2;
1419;      s.f3 = 3.3;
1420;      write_arg(&s.i1, 1);
1421;      write_arg(&s.i2, 2);
1422;      write_arg(&s.i3, 3);
1423;      struct S r;
1424;      r.f1 = s.f1;
1425;      r.f2 = s.f2 * 2;
1426;      r.f3 = s.f3 + s.f1;
1427;      r.i1 = s.i1;
1428;      r.i2 = s.i2 * 2;
1429;      r.i3 = s.i3 + s.i1;
1430;      return r;
1431;    }
1432;
1433define void @noalias_arg_simplifiable_1(%struct.S* noalias sret(%struct.S) align 4 %agg.result, %struct.S* byval(%struct.S) align 8 %s) {
1434; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
1435; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1
1436; IS__TUNIT_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]], %struct.S* noalias nocapture nofree nonnull byval([[STRUCT_S]]) align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR1]] {
1437; IS__TUNIT_OPM-NEXT:  entry:
1438; IS__TUNIT_OPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1439; IS__TUNIT_OPM-NEXT:    store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
1440; IS__TUNIT_OPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
1441; IS__TUNIT_OPM-NEXT:    store float 0x40019999A0000000, float* [[F2]], align 8, !tbaa [[TBAA10]]
1442; IS__TUNIT_OPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
1443; IS__TUNIT_OPM-NEXT:    store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]]
1444; IS__TUNIT_OPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1445; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR5]]
1446; IS__TUNIT_OPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
1447; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR5]]
1448; IS__TUNIT_OPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
1449; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR5]]
1450; IS__TUNIT_OPM-NEXT:    [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1451; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]]
1452; IS__TUNIT_OPM-NEXT:    [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
1453; IS__TUNIT_OPM-NEXT:    store float [[I]], float* [[F12]], align 4, !tbaa [[TBAA7]]
1454; IS__TUNIT_OPM-NEXT:    [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
1455; IS__TUNIT_OPM-NEXT:    [[I4:%.*]] = load float, float* [[F23]], align 8, !tbaa [[TBAA10]]
1456; IS__TUNIT_OPM-NEXT:    [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00
1457; IS__TUNIT_OPM-NEXT:    [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
1458; IS__TUNIT_OPM-NEXT:    store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]]
1459; IS__TUNIT_OPM-NEXT:    [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
1460; IS__TUNIT_OPM-NEXT:    [[I5:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]]
1461; IS__TUNIT_OPM-NEXT:    [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1462; IS__TUNIT_OPM-NEXT:    [[I6:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]]
1463; IS__TUNIT_OPM-NEXT:    [[ADD:%.*]] = fadd float [[I5]], [[I6]]
1464; IS__TUNIT_OPM-NEXT:    [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
1465; IS__TUNIT_OPM-NEXT:    store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]]
1466; IS__TUNIT_OPM-NEXT:    [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1467; IS__TUNIT_OPM-NEXT:    [[I7:%.*]] = load i32, i32* [[I18]], align 8, !tbaa [[TBAA12]]
1468; IS__TUNIT_OPM-NEXT:    [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
1469; IS__TUNIT_OPM-NEXT:    store i32 [[I7]], i32* [[I19]], align 4, !tbaa [[TBAA12]]
1470; IS__TUNIT_OPM-NEXT:    [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
1471; IS__TUNIT_OPM-NEXT:    [[I8:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13]]
1472; IS__TUNIT_OPM-NEXT:    [[MUL11:%.*]] = shl nsw i32 [[I8]], 1
1473; IS__TUNIT_OPM-NEXT:    [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
1474; IS__TUNIT_OPM-NEXT:    store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]]
1475; IS__TUNIT_OPM-NEXT:    [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
1476; IS__TUNIT_OPM-NEXT:    [[I9:%.*]] = load i32, i32* [[I313]], align 8, !tbaa [[TBAA14]]
1477; IS__TUNIT_OPM-NEXT:    [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1478; IS__TUNIT_OPM-NEXT:    [[I10:%.*]] = load i32, i32* [[I114]], align 8, !tbaa [[TBAA12]]
1479; IS__TUNIT_OPM-NEXT:    [[ADD15:%.*]] = add nsw i32 [[I9]], [[I10]]
1480; IS__TUNIT_OPM-NEXT:    [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
1481; IS__TUNIT_OPM-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]]
1482; IS__TUNIT_OPM-NEXT:    ret void
1483;
1484; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
1485; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1
1486; IS__TUNIT_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]], %struct.S* noalias nocapture nofree nonnull byval([[STRUCT_S]]) align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR1]] {
1487; IS__TUNIT_NPM-NEXT:  entry:
1488; IS__TUNIT_NPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1489; IS__TUNIT_NPM-NEXT:    store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
1490; IS__TUNIT_NPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
1491; IS__TUNIT_NPM-NEXT:    store float 0x40019999A0000000, float* [[F2]], align 8, !tbaa [[TBAA10]]
1492; IS__TUNIT_NPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
1493; IS__TUNIT_NPM-NEXT:    store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]]
1494; IS__TUNIT_NPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1495; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR4]]
1496; IS__TUNIT_NPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
1497; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR4]]
1498; IS__TUNIT_NPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
1499; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR4]]
1500; IS__TUNIT_NPM-NEXT:    [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1501; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]]
1502; IS__TUNIT_NPM-NEXT:    [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
1503; IS__TUNIT_NPM-NEXT:    store float [[I]], float* [[F12]], align 4, !tbaa [[TBAA7]]
1504; IS__TUNIT_NPM-NEXT:    [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
1505; IS__TUNIT_NPM-NEXT:    [[I4:%.*]] = load float, float* [[F23]], align 8, !tbaa [[TBAA10]]
1506; IS__TUNIT_NPM-NEXT:    [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00
1507; IS__TUNIT_NPM-NEXT:    [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
1508; IS__TUNIT_NPM-NEXT:    store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]]
1509; IS__TUNIT_NPM-NEXT:    [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
1510; IS__TUNIT_NPM-NEXT:    [[I5:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]]
1511; IS__TUNIT_NPM-NEXT:    [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1512; IS__TUNIT_NPM-NEXT:    [[I6:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]]
1513; IS__TUNIT_NPM-NEXT:    [[ADD:%.*]] = fadd float [[I5]], [[I6]]
1514; IS__TUNIT_NPM-NEXT:    [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
1515; IS__TUNIT_NPM-NEXT:    store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]]
1516; IS__TUNIT_NPM-NEXT:    [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1517; IS__TUNIT_NPM-NEXT:    [[I7:%.*]] = load i32, i32* [[I18]], align 8, !tbaa [[TBAA12]]
1518; IS__TUNIT_NPM-NEXT:    [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
1519; IS__TUNIT_NPM-NEXT:    store i32 [[I7]], i32* [[I19]], align 4, !tbaa [[TBAA12]]
1520; IS__TUNIT_NPM-NEXT:    [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
1521; IS__TUNIT_NPM-NEXT:    [[I8:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13]]
1522; IS__TUNIT_NPM-NEXT:    [[MUL11:%.*]] = shl nsw i32 [[I8]], 1
1523; IS__TUNIT_NPM-NEXT:    [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
1524; IS__TUNIT_NPM-NEXT:    store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]]
1525; IS__TUNIT_NPM-NEXT:    [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
1526; IS__TUNIT_NPM-NEXT:    [[I9:%.*]] = load i32, i32* [[I313]], align 8, !tbaa [[TBAA14]]
1527; IS__TUNIT_NPM-NEXT:    [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1528; IS__TUNIT_NPM-NEXT:    [[I10:%.*]] = load i32, i32* [[I114]], align 8, !tbaa [[TBAA12]]
1529; IS__TUNIT_NPM-NEXT:    [[ADD15:%.*]] = add nsw i32 [[I9]], [[I10]]
1530; IS__TUNIT_NPM-NEXT:    [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
1531; IS__TUNIT_NPM-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]]
1532; IS__TUNIT_NPM-NEXT:    ret void
1533;
1534; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
1535; IS__CGSCC____-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1
1536; IS__CGSCC____-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]], %struct.S* noalias nocapture nofree nonnull byval([[STRUCT_S]]) align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR6:[0-9]+]] {
1537; IS__CGSCC____-NEXT:  entry:
1538; IS__CGSCC____-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1539; IS__CGSCC____-NEXT:    store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
1540; IS__CGSCC____-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
1541; IS__CGSCC____-NEXT:    store float 0x40019999A0000000, float* [[F2]], align 8, !tbaa [[TBAA10]]
1542; IS__CGSCC____-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
1543; IS__CGSCC____-NEXT:    store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]]
1544; IS__CGSCC____-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1545; IS__CGSCC____-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR9]]
1546; IS__CGSCC____-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
1547; IS__CGSCC____-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR9]]
1548; IS__CGSCC____-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
1549; IS__CGSCC____-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR9]]
1550; IS__CGSCC____-NEXT:    [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1551; IS__CGSCC____-NEXT:    [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]]
1552; IS__CGSCC____-NEXT:    [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
1553; IS__CGSCC____-NEXT:    store float [[I]], float* [[F12]], align 4, !tbaa [[TBAA7]]
1554; IS__CGSCC____-NEXT:    [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
1555; IS__CGSCC____-NEXT:    [[I4:%.*]] = load float, float* [[F23]], align 8, !tbaa [[TBAA10]]
1556; IS__CGSCC____-NEXT:    [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00
1557; IS__CGSCC____-NEXT:    [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
1558; IS__CGSCC____-NEXT:    store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]]
1559; IS__CGSCC____-NEXT:    [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
1560; IS__CGSCC____-NEXT:    [[I5:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]]
1561; IS__CGSCC____-NEXT:    [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1562; IS__CGSCC____-NEXT:    [[I6:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]]
1563; IS__CGSCC____-NEXT:    [[ADD:%.*]] = fadd float [[I5]], [[I6]]
1564; IS__CGSCC____-NEXT:    [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
1565; IS__CGSCC____-NEXT:    store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]]
1566; IS__CGSCC____-NEXT:    [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1567; IS__CGSCC____-NEXT:    [[I7:%.*]] = load i32, i32* [[I18]], align 8, !tbaa [[TBAA12]]
1568; IS__CGSCC____-NEXT:    [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
1569; IS__CGSCC____-NEXT:    store i32 [[I7]], i32* [[I19]], align 4, !tbaa [[TBAA12]]
1570; IS__CGSCC____-NEXT:    [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
1571; IS__CGSCC____-NEXT:    [[I8:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13]]
1572; IS__CGSCC____-NEXT:    [[MUL11:%.*]] = shl nsw i32 [[I8]], 1
1573; IS__CGSCC____-NEXT:    [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
1574; IS__CGSCC____-NEXT:    store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]]
1575; IS__CGSCC____-NEXT:    [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
1576; IS__CGSCC____-NEXT:    [[I9:%.*]] = load i32, i32* [[I313]], align 8, !tbaa [[TBAA14]]
1577; IS__CGSCC____-NEXT:    [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1578; IS__CGSCC____-NEXT:    [[I10:%.*]] = load i32, i32* [[I114]], align 8, !tbaa [[TBAA12]]
1579; IS__CGSCC____-NEXT:    [[ADD15:%.*]] = add nsw i32 [[I9]], [[I10]]
1580; IS__CGSCC____-NEXT:    [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
1581; IS__CGSCC____-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]]
1582; IS__CGSCC____-NEXT:    ret void
1583;
1584entry:
1585  %f1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 3
1586  store float 0x3FF19999A0000000, float* %f1, align 4, !tbaa !7
1587  %f2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 4
1588  store float 0x40019999A0000000, float* %f2, align 8, !tbaa !10
1589  %f3 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 5
1590  store float 0x400A666660000000, float* %f3, align 4, !tbaa !11
1591  %i1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0
1592  call void @write_arg(i32* nonnull %i1, i32 1)
1593  %i2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1
1594  call void @write_arg(i32* nonnull %i2, i32 2)
1595  %i3 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 2
1596  call void @write_arg(i32* nonnull %i3, i32 3)
1597  %f11 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 3
1598  %i = load float, float* %f11, align 4, !tbaa !7
1599  %f12 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 3
1600  store float %i, float* %f12, align 4, !tbaa !7
1601  %f23 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 4
1602  %i4 = load float, float* %f23, align 8, !tbaa !10
1603  %mul = fmul float %i4, 2.000000e+00
1604  %f24 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 4
1605  store float %mul, float* %f24, align 4, !tbaa !10
1606  %f35 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 5
1607  %i5 = load float, float* %f35, align 4, !tbaa !11
1608  %f16 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 3
1609  %i6 = load float, float* %f16, align 4, !tbaa !7
1610  %add = fadd float %i5, %i6
1611  %f37 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 5
1612  store float %add, float* %f37, align 4, !tbaa !11
1613  %i18 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0
1614  %i7 = load i32, i32* %i18, align 8, !tbaa !12
1615  %i19 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 0
1616  store i32 %i7, i32* %i19, align 4, !tbaa !12
1617  %i210 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1
1618  %i8 = load i32, i32* %i210, align 4, !tbaa !13
1619  %mul11 = shl nsw i32 %i8, 1
1620  %i212 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 1
1621  store i32 %mul11, i32* %i212, align 4, !tbaa !13
1622  %i313 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 2
1623  %i9 = load i32, i32* %i313, align 8, !tbaa !14
1624  %i114 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0
1625  %i10 = load i32, i32* %i114, align 8, !tbaa !12
1626  %add15 = add nsw i32 %i9, %i10
1627  %i316 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 2
1628  store i32 %add15, i32* %i316, align 4, !tbaa !14
1629  ret void
1630}
1631
1632;    void noalias_arg_simplifiable_2(char Bytes[1024]) {
1633;      for (int i = 0; i < 100; ++i)
1634;        Bytes[i * 10] = 0;
1635;      for (int i = 0; i < 10; ++i)
1636;        ((float *)Bytes)[i * 10 + 1] = 0;
1637;      for (int i = 0; i < 20; ++i)
1638;        ((long long int *)Bytes)[i * 10 + 2] = 0;
1639;      Bytes[1023] = 0;
1640;      write_arg((int *)&Bytes[500], 0);
1641;      struct S R;
1642;      for (int i = 0; i < 1024; ++i)
1643;        globalBytes[i] = Bytes[i];
1644;    }
1645;
1646define void @noalias_arg_simplifiable_2(i8* %Bytes) {
1647; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind
1648; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_2
1649; IS__TUNIT_OPM-SAME: (i8* nocapture nofree [[BYTES:%.*]]) #[[ATTR2]] {
1650; IS__TUNIT_OPM-NEXT:  entry:
1651; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND:%.*]]
1652; IS__TUNIT_OPM:       for.cond:
1653; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
1654; IS__TUNIT_OPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
1655; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
1656; IS__TUNIT_OPM:       for.cond.cleanup:
1657; IS__TUNIT_OPM-NEXT:    br label [[FOR_END:%.*]]
1658; IS__TUNIT_OPM:       for.body:
1659; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
1660; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[I]]
1661; IS__TUNIT_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA19]]
1662; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC]]
1663; IS__TUNIT_OPM:       for.inc:
1664; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
1665; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP25:![0-9]+]]
1666; IS__TUNIT_OPM:       for.end:
1667; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2:%.*]]
1668; IS__TUNIT_OPM:       for.cond2:
1669; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
1670; IS__TUNIT_OPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
1671; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
1672; IS__TUNIT_OPM:       for.cond.cleanup4:
1673; IS__TUNIT_OPM-NEXT:    br label [[FOR_END11:%.*]]
1674; IS__TUNIT_OPM:       for.body5:
1675; IS__TUNIT_OPM-NEXT:    [[I15:%.*]] = bitcast i8* [[BYTES]] to float*
1676; IS__TUNIT_OPM-NEXT:    [[I16:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
1677; IS__TUNIT_OPM-NEXT:    [[I17:%.*]] = or i64 [[I16]], 1
1678; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I15]], i64 [[I17]]
1679; IS__TUNIT_OPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA26:![0-9]+]]
1680; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC9]]
1681; IS__TUNIT_OPM:       for.inc9:
1682; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
1683; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP27:![0-9]+]]
1684; IS__TUNIT_OPM:       for.end11:
1685; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND13:%.*]]
1686; IS__TUNIT_OPM:       for.cond13:
1687; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
1688; IS__TUNIT_OPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
1689; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
1690; IS__TUNIT_OPM:       for.cond.cleanup15:
1691; IS__TUNIT_OPM-NEXT:    br label [[FOR_END23:%.*]]
1692; IS__TUNIT_OPM:       for.body16:
1693; IS__TUNIT_OPM-NEXT:    [[I18:%.*]] = bitcast i8* [[BYTES]] to i64*
1694; IS__TUNIT_OPM-NEXT:    [[I19:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
1695; IS__TUNIT_OPM-NEXT:    [[I20:%.*]] = add nuw nsw i64 [[I19]], 2
1696; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* [[I18]], i64 [[I20]]
1697; IS__TUNIT_OPM-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA28:![0-9]+]]
1698; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC21]]
1699; IS__TUNIT_OPM:       for.inc21:
1700; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
1701; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP30:![0-9]+]]
1702; IS__TUNIT_OPM:       for.end23:
1703; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 1023
1704; IS__TUNIT_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA19]]
1705; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500
1706; IS__TUNIT_OPM-NEXT:    [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32*
1707; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 [[I21]], i32 noundef 0) #[[ATTR6]]
1708; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND27:%.*]]
1709; IS__TUNIT_OPM:       for.cond27:
1710; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ]
1711; IS__TUNIT_OPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
1712; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY30:%.*]], label [[FOR_COND_CLEANUP29:%.*]]
1713; IS__TUNIT_OPM:       for.cond.cleanup29:
1714; IS__TUNIT_OPM-NEXT:    br label [[FOR_END37:%.*]]
1715; IS__TUNIT_OPM:       for.body30:
1716; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[INDVARS_IV12]]
1717; IS__TUNIT_OPM-NEXT:    [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA19]]
1718; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX34:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
1719; IS__TUNIT_OPM-NEXT:    store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA19]]
1720; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC35]]
1721; IS__TUNIT_OPM:       for.inc35:
1722; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
1723; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND27]], !llvm.loop [[LOOP31:![0-9]+]]
1724; IS__TUNIT_OPM:       for.end37:
1725; IS__TUNIT_OPM-NEXT:    ret void
1726;
1727; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
1728; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_2
1729; IS__TUNIT_NPM-SAME: (i8* nocapture nofree [[BYTES:%.*]]) #[[ATTR2]] {
1730; IS__TUNIT_NPM-NEXT:  entry:
1731; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND:%.*]]
1732; IS__TUNIT_NPM:       for.cond:
1733; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
1734; IS__TUNIT_NPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
1735; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
1736; IS__TUNIT_NPM:       for.cond.cleanup:
1737; IS__TUNIT_NPM-NEXT:    br label [[FOR_END:%.*]]
1738; IS__TUNIT_NPM:       for.body:
1739; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
1740; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[I]]
1741; IS__TUNIT_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA19]]
1742; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC]]
1743; IS__TUNIT_NPM:       for.inc:
1744; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
1745; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP25:![0-9]+]]
1746; IS__TUNIT_NPM:       for.end:
1747; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2:%.*]]
1748; IS__TUNIT_NPM:       for.cond2:
1749; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
1750; IS__TUNIT_NPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
1751; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
1752; IS__TUNIT_NPM:       for.cond.cleanup4:
1753; IS__TUNIT_NPM-NEXT:    br label [[FOR_END11:%.*]]
1754; IS__TUNIT_NPM:       for.body5:
1755; IS__TUNIT_NPM-NEXT:    [[I15:%.*]] = bitcast i8* [[BYTES]] to float*
1756; IS__TUNIT_NPM-NEXT:    [[I16:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
1757; IS__TUNIT_NPM-NEXT:    [[I17:%.*]] = or i64 [[I16]], 1
1758; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I15]], i64 [[I17]]
1759; IS__TUNIT_NPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA26:![0-9]+]]
1760; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC9]]
1761; IS__TUNIT_NPM:       for.inc9:
1762; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
1763; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP27:![0-9]+]]
1764; IS__TUNIT_NPM:       for.end11:
1765; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND13:%.*]]
1766; IS__TUNIT_NPM:       for.cond13:
1767; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
1768; IS__TUNIT_NPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
1769; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
1770; IS__TUNIT_NPM:       for.cond.cleanup15:
1771; IS__TUNIT_NPM-NEXT:    br label [[FOR_END23:%.*]]
1772; IS__TUNIT_NPM:       for.body16:
1773; IS__TUNIT_NPM-NEXT:    [[I18:%.*]] = bitcast i8* [[BYTES]] to i64*
1774; IS__TUNIT_NPM-NEXT:    [[I19:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
1775; IS__TUNIT_NPM-NEXT:    [[I20:%.*]] = add nuw nsw i64 [[I19]], 2
1776; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* [[I18]], i64 [[I20]]
1777; IS__TUNIT_NPM-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA28:![0-9]+]]
1778; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC21]]
1779; IS__TUNIT_NPM:       for.inc21:
1780; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
1781; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP30:![0-9]+]]
1782; IS__TUNIT_NPM:       for.end23:
1783; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 1023
1784; IS__TUNIT_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA19]]
1785; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500
1786; IS__TUNIT_NPM-NEXT:    [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32*
1787; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 [[I21]], i32 noundef 0) #[[ATTR4]]
1788; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND27:%.*]]
1789; IS__TUNIT_NPM:       for.cond27:
1790; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ]
1791; IS__TUNIT_NPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
1792; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY30:%.*]], label [[FOR_COND_CLEANUP29:%.*]]
1793; IS__TUNIT_NPM:       for.cond.cleanup29:
1794; IS__TUNIT_NPM-NEXT:    br label [[FOR_END37:%.*]]
1795; IS__TUNIT_NPM:       for.body30:
1796; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[INDVARS_IV12]]
1797; IS__TUNIT_NPM-NEXT:    [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA19]]
1798; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX34:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
1799; IS__TUNIT_NPM-NEXT:    store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA19]]
1800; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC35]]
1801; IS__TUNIT_NPM:       for.inc35:
1802; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
1803; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND27]], !llvm.loop [[LOOP31:![0-9]+]]
1804; IS__TUNIT_NPM:       for.end37:
1805; IS__TUNIT_NPM-NEXT:    ret void
1806;
1807; IS__CGSCC____-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_2
1808; IS__CGSCC____-SAME: (i8* [[BYTES:%.*]]) {
1809; IS__CGSCC____-NEXT:  entry:
1810; IS__CGSCC____-NEXT:    br label [[FOR_COND:%.*]]
1811; IS__CGSCC____:       for.cond:
1812; IS__CGSCC____-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
1813; IS__CGSCC____-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
1814; IS__CGSCC____-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
1815; IS__CGSCC____:       for.cond.cleanup:
1816; IS__CGSCC____-NEXT:    br label [[FOR_END:%.*]]
1817; IS__CGSCC____:       for.body:
1818; IS__CGSCC____-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
1819; IS__CGSCC____-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[I]]
1820; IS__CGSCC____-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA15]]
1821; IS__CGSCC____-NEXT:    br label [[FOR_INC]]
1822; IS__CGSCC____:       for.inc:
1823; IS__CGSCC____-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
1824; IS__CGSCC____-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP28:![0-9]+]]
1825; IS__CGSCC____:       for.end:
1826; IS__CGSCC____-NEXT:    br label [[FOR_COND2:%.*]]
1827; IS__CGSCC____:       for.cond2:
1828; IS__CGSCC____-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
1829; IS__CGSCC____-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
1830; IS__CGSCC____-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
1831; IS__CGSCC____:       for.cond.cleanup4:
1832; IS__CGSCC____-NEXT:    br label [[FOR_END11:%.*]]
1833; IS__CGSCC____:       for.body5:
1834; IS__CGSCC____-NEXT:    [[I15:%.*]] = bitcast i8* [[BYTES]] to float*
1835; IS__CGSCC____-NEXT:    [[I16:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
1836; IS__CGSCC____-NEXT:    [[I17:%.*]] = or i64 [[I16]], 1
1837; IS__CGSCC____-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I15]], i64 [[I17]]
1838; IS__CGSCC____-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]]
1839; IS__CGSCC____-NEXT:    br label [[FOR_INC9]]
1840; IS__CGSCC____:       for.inc9:
1841; IS__CGSCC____-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
1842; IS__CGSCC____-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP29:![0-9]+]]
1843; IS__CGSCC____:       for.end11:
1844; IS__CGSCC____-NEXT:    br label [[FOR_COND13:%.*]]
1845; IS__CGSCC____:       for.cond13:
1846; IS__CGSCC____-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
1847; IS__CGSCC____-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
1848; IS__CGSCC____-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
1849; IS__CGSCC____:       for.cond.cleanup15:
1850; IS__CGSCC____-NEXT:    br label [[FOR_END23:%.*]]
1851; IS__CGSCC____:       for.body16:
1852; IS__CGSCC____-NEXT:    [[I18:%.*]] = bitcast i8* [[BYTES]] to i64*
1853; IS__CGSCC____-NEXT:    [[I19:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
1854; IS__CGSCC____-NEXT:    [[I20:%.*]] = add nuw nsw i64 [[I19]], 2
1855; IS__CGSCC____-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* [[I18]], i64 [[I20]]
1856; IS__CGSCC____-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA20]]
1857; IS__CGSCC____-NEXT:    br label [[FOR_INC21]]
1858; IS__CGSCC____:       for.inc21:
1859; IS__CGSCC____-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
1860; IS__CGSCC____-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP30:![0-9]+]]
1861; IS__CGSCC____:       for.end23:
1862; IS__CGSCC____-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 1023
1863; IS__CGSCC____-NEXT:    store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA15]]
1864; IS__CGSCC____-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500
1865; IS__CGSCC____-NEXT:    [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32*
1866; IS__CGSCC____-NEXT:    call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I21]], i32 noundef 0) #[[ATTR10]]
1867; IS__CGSCC____-NEXT:    br label [[FOR_COND27:%.*]]
1868; IS__CGSCC____:       for.cond27:
1869; IS__CGSCC____-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ]
1870; IS__CGSCC____-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
1871; IS__CGSCC____-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY30:%.*]], label [[FOR_COND_CLEANUP29:%.*]]
1872; IS__CGSCC____:       for.cond.cleanup29:
1873; IS__CGSCC____-NEXT:    br label [[FOR_END37:%.*]]
1874; IS__CGSCC____:       for.body30:
1875; IS__CGSCC____-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[INDVARS_IV12]]
1876; IS__CGSCC____-NEXT:    [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]]
1877; IS__CGSCC____-NEXT:    [[ARRAYIDX34:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
1878; IS__CGSCC____-NEXT:    store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA15]]
1879; IS__CGSCC____-NEXT:    br label [[FOR_INC35]]
1880; IS__CGSCC____:       for.inc35:
1881; IS__CGSCC____-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
1882; IS__CGSCC____-NEXT:    br label [[FOR_COND27]], !llvm.loop [[LOOP31:![0-9]+]]
1883; IS__CGSCC____:       for.end37:
1884; IS__CGSCC____-NEXT:    ret void
1885;
1886entry:
1887  br label %for.cond
1888
1889for.cond:                                         ; preds = %for.inc, %entry
1890  %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
1891  %exitcond = icmp ne i64 %indvars.iv, 100
1892  br i1 %exitcond, label %for.body, label %for.cond.cleanup
1893
1894for.cond.cleanup:                                 ; preds = %for.cond
1895  br label %for.end
1896
1897for.body:                                         ; preds = %for.cond
1898  %i = mul nuw nsw i64 %indvars.iv, 10
1899  %arrayidx = getelementptr inbounds i8, i8* %Bytes, i64 %i
1900  store i8 0, i8* %arrayidx, align 1, !tbaa !15
1901  br label %for.inc
1902
1903for.inc:                                          ; preds = %for.body
1904  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
1905  br label %for.cond, !llvm.loop !28
1906
1907for.end:                                          ; preds = %for.cond.cleanup
1908  br label %for.cond2
1909
1910for.cond2:                                        ; preds = %for.inc9, %for.end
1911  %indvars.iv2 = phi i64 [ %indvars.iv.next3, %for.inc9 ], [ 0, %for.end ]
1912  %exitcond6 = icmp ne i64 %indvars.iv2, 10
1913  br i1 %exitcond6, label %for.body5, label %for.cond.cleanup4
1914
1915for.cond.cleanup4:                                ; preds = %for.cond2
1916  br label %for.end11
1917
1918for.body5:                                        ; preds = %for.cond2
1919  %i15 = bitcast i8* %Bytes to float*
1920  %i16 = mul nuw nsw i64 %indvars.iv2, 10
1921  %i17 = or i64 %i16, 1
1922  %arrayidx8 = getelementptr inbounds float, float* %i15, i64 %i17
1923  store float 0.000000e+00, float* %arrayidx8, align 4, !tbaa !18
1924  br label %for.inc9
1925
1926for.inc9:                                         ; preds = %for.body5
1927  %indvars.iv.next3 = add nuw nsw i64 %indvars.iv2, 1
1928  br label %for.cond2, !llvm.loop !29
1929
1930for.end11:                                        ; preds = %for.cond.cleanup4
1931  br label %for.cond13
1932
1933for.cond13:                                       ; preds = %for.inc21, %for.end11
1934  %indvars.iv7 = phi i64 [ %indvars.iv.next8, %for.inc21 ], [ 0, %for.end11 ]
1935  %exitcond11 = icmp ne i64 %indvars.iv7, 20
1936  br i1 %exitcond11, label %for.body16, label %for.cond.cleanup15
1937
1938for.cond.cleanup15:                               ; preds = %for.cond13
1939  br label %for.end23
1940
1941for.body16:                                       ; preds = %for.cond13
1942  %i18 = bitcast i8* %Bytes to i64*
1943  %i19 = mul nuw nsw i64 %indvars.iv7, 10
1944  %i20 = add nuw nsw i64 %i19, 2
1945  %arrayidx20 = getelementptr inbounds i64, i64* %i18, i64 %i20
1946  store i64 0, i64* %arrayidx20, align 8, !tbaa !20
1947  br label %for.inc21
1948
1949for.inc21:                                        ; preds = %for.body16
1950  %indvars.iv.next8 = add nuw nsw i64 %indvars.iv7, 1
1951  br label %for.cond13, !llvm.loop !30
1952
1953for.end23:                                        ; preds = %for.cond.cleanup15
1954  %arrayidx24 = getelementptr inbounds i8, i8* %Bytes, i64 1023
1955  store i8 0, i8* %arrayidx24, align 1, !tbaa !15
1956  %arrayidx25 = getelementptr inbounds i8, i8* %Bytes, i64 500
1957  %i21 = bitcast i8* %arrayidx25 to i32*
1958  call void @write_arg(i32* nonnull %i21, i32 0)
1959  br label %for.cond27
1960
1961for.cond27:                                       ; preds = %for.inc35, %for.end23
1962  %indvars.iv12 = phi i64 [ %indvars.iv.next13, %for.inc35 ], [ 0, %for.end23 ]
1963  %exitcond14 = icmp ne i64 %indvars.iv12, 1024
1964  br i1 %exitcond14, label %for.body30, label %for.cond.cleanup29
1965
1966for.cond.cleanup29:                               ; preds = %for.cond27
1967  br label %for.end37
1968
1969for.body30:                                       ; preds = %for.cond27
1970  %arrayidx32 = getelementptr inbounds i8, i8* %Bytes, i64 %indvars.iv12
1971  %i22 = load i8, i8* %arrayidx32, align 1, !tbaa !15
1972  %arrayidx34 = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 %indvars.iv12
1973  store i8 %i22, i8* %arrayidx34, align 1, !tbaa !15
1974  br label %for.inc35
1975
1976for.inc35:                                        ; preds = %for.body30
1977  %indvars.iv.next13 = add nuw nsw i64 %indvars.iv12, 1
1978  br label %for.cond27, !llvm.loop !31
1979
1980for.end37:                                        ; preds = %for.cond.cleanup29
1981  ret void
1982}
1983
1984;    int local_alloca_not_simplifiable_1() {
1985;      int X, Y, Z;
1986;      X = Y = 1;
1987;      escape(&X);
1988;      write_random(&Y);
1989;      Z = X ? 1 : 2;
1990;      return X + Y + Z;
1991;    }
1992;
1993define i32 @local_alloca_not_simplifiable_1() {
1994; NOT_TUNIT_NPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() {
1995; NOT_TUNIT_NPM-NEXT:  entry:
1996; NOT_TUNIT_NPM-NEXT:    [[X:%.*]] = alloca i32, align 4
1997; NOT_TUNIT_NPM-NEXT:    [[Y:%.*]] = alloca i32, align 4
1998; NOT_TUNIT_NPM-NEXT:    [[I:%.*]] = bitcast i32* [[X]] to i8*
1999; NOT_TUNIT_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR8:[0-9]+]]
2000; NOT_TUNIT_NPM-NEXT:    [[I1:%.*]] = bitcast i32* [[Y]] to i8*
2001; NOT_TUNIT_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR8]]
2002; NOT_TUNIT_NPM-NEXT:    store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]]
2003; NOT_TUNIT_NPM-NEXT:    store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]]
2004; NOT_TUNIT_NPM-NEXT:    [[I2:%.*]] = bitcast i32* [[X]] to i8*
2005; NOT_TUNIT_NPM-NEXT:    call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]])
2006; NOT_TUNIT_NPM-NEXT:    call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]])
2007; NOT_TUNIT_NPM-NEXT:    [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]]
2008; NOT_TUNIT_NPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0
2009; NOT_TUNIT_NPM-NEXT:    [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1
2010; NOT_TUNIT_NPM-NEXT:    [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]]
2011; NOT_TUNIT_NPM-NEXT:    [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]]
2012; NOT_TUNIT_NPM-NEXT:    [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]]
2013; NOT_TUNIT_NPM-NEXT:    [[I5:%.*]] = bitcast i32* [[Y]] to i8*
2014; NOT_TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]])
2015; NOT_TUNIT_NPM-NEXT:    [[I6:%.*]] = bitcast i32* [[X]] to i8*
2016; NOT_TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]])
2017; NOT_TUNIT_NPM-NEXT:    ret i32 [[ADD1]]
2018;
2019; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() {
2020; IS__TUNIT_NPM-NEXT:  entry:
2021; IS__TUNIT_NPM-NEXT:    [[X:%.*]] = alloca i32, align 4
2022; IS__TUNIT_NPM-NEXT:    [[Y:%.*]] = alloca i32, align 4
2023; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = bitcast i32* [[X]] to i8*
2024; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR6]]
2025; IS__TUNIT_NPM-NEXT:    [[I1:%.*]] = bitcast i32* [[Y]] to i8*
2026; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR6]]
2027; IS__TUNIT_NPM-NEXT:    store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]]
2028; IS__TUNIT_NPM-NEXT:    store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]]
2029; IS__TUNIT_NPM-NEXT:    [[I2:%.*]] = bitcast i32* [[X]] to i8*
2030; IS__TUNIT_NPM-NEXT:    call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]])
2031; IS__TUNIT_NPM-NEXT:    call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]])
2032; IS__TUNIT_NPM-NEXT:    [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]]
2033; IS__TUNIT_NPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0
2034; IS__TUNIT_NPM-NEXT:    [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1
2035; IS__TUNIT_NPM-NEXT:    [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]]
2036; IS__TUNIT_NPM-NEXT:    [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]]
2037; IS__TUNIT_NPM-NEXT:    [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]]
2038; IS__TUNIT_NPM-NEXT:    [[I5:%.*]] = bitcast i32* [[Y]] to i8*
2039; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]])
2040; IS__TUNIT_NPM-NEXT:    [[I6:%.*]] = bitcast i32* [[X]] to i8*
2041; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]])
2042; IS__TUNIT_NPM-NEXT:    ret i32 [[ADD1]]
2043;
2044entry:
2045  %X = alloca i32, align 4
2046  %Y = alloca i32, align 4
2047  %i = bitcast i32* %X to i8*
2048  call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %i)
2049  %i1 = bitcast i32* %Y to i8*
2050  call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %i1)
2051  store i32 1, i32* %Y, align 4, !tbaa !3
2052  store i32 1, i32* %X, align 4, !tbaa !3
2053  %i2 = bitcast i32* %X to i8*
2054  call void @escape(i8* nonnull %i2)
2055  call void @write_random(i32* nonnull %Y)
2056  %i3 = load i32, i32* %X, align 4, !tbaa !3
2057  %tobool.not = icmp eq i32 %i3, 0
2058  %cond = select i1 %tobool.not, i32 2, i32 1
2059  %i4 = load i32, i32* %Y, align 4, !tbaa !3
2060  %add = add nsw i32 %i3, %i4
2061  %add1 = add nsw i32 %add, %cond
2062  %i5 = bitcast i32* %Y to i8*
2063  call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %i5)
2064  %i6 = bitcast i32* %X to i8*
2065  call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %i6)
2066  ret i32 %add1
2067}
2068
2069; We could simplify these if we separate accessed bins wrt. alignment (here mod 4).
2070define i32 @unknown_access_mixed_simplifiable(i32 %arg1, i32 %arg2) {
2071; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
2072; IS__TUNIT____-LABEL: define {{[^@]+}}@unknown_access_mixed_simplifiable
2073; IS__TUNIT____-SAME: (i32 [[ARG1:%.*]], i32 [[ARG2:%.*]]) #[[ATTR3]] {
2074; IS__TUNIT____-NEXT:  entry:
2075; IS__TUNIT____-NEXT:    [[S:%.*]] = alloca [[STRUCT_S:%.*]], align 4
2076; IS__TUNIT____-NEXT:    [[BC:%.*]] = bitcast %struct.S* [[S]] to i32*
2077; IS__TUNIT____-NEXT:    [[GEP1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
2078; IS__TUNIT____-NEXT:    [[GEP2:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG1]]
2079; IS__TUNIT____-NEXT:    [[GEP3:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG2]]
2080; IS__TUNIT____-NEXT:    store i32 7, i32* [[GEP1]], align 4
2081; IS__TUNIT____-NEXT:    store i32 7, i32* [[GEP2]], align 4
2082; IS__TUNIT____-NEXT:    store i32 7, i32* [[GEP3]], align 4
2083; IS__TUNIT____-NEXT:    [[L1:%.*]] = load i32, i32* [[GEP1]], align 4
2084; IS__TUNIT____-NEXT:    [[L2:%.*]] = load i32, i32* [[GEP2]], align 4
2085; IS__TUNIT____-NEXT:    [[L3:%.*]] = load i32, i32* [[GEP3]], align 4
2086; IS__TUNIT____-NEXT:    [[ADD1:%.*]] = add i32 [[L1]], [[L2]]
2087; IS__TUNIT____-NEXT:    [[ADD2:%.*]] = add i32 [[ADD1]], [[L3]]
2088; IS__TUNIT____-NEXT:    ret i32 [[ADD2]]
2089;
2090; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
2091; IS__CGSCC____-LABEL: define {{[^@]+}}@unknown_access_mixed_simplifiable
2092; IS__CGSCC____-SAME: (i32 [[ARG1:%.*]], i32 [[ARG2:%.*]]) #[[ATTR2]] {
2093; IS__CGSCC____-NEXT:  entry:
2094; IS__CGSCC____-NEXT:    [[S:%.*]] = alloca [[STRUCT_S:%.*]], align 4
2095; IS__CGSCC____-NEXT:    [[BC:%.*]] = bitcast %struct.S* [[S]] to i32*
2096; IS__CGSCC____-NEXT:    [[GEP1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
2097; IS__CGSCC____-NEXT:    [[GEP2:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG1]]
2098; IS__CGSCC____-NEXT:    [[GEP3:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG2]]
2099; IS__CGSCC____-NEXT:    store i32 7, i32* [[GEP1]], align 4
2100; IS__CGSCC____-NEXT:    store i32 7, i32* [[GEP2]], align 4
2101; IS__CGSCC____-NEXT:    store i32 7, i32* [[GEP3]], align 4
2102; IS__CGSCC____-NEXT:    [[L1:%.*]] = load i32, i32* [[GEP1]], align 4
2103; IS__CGSCC____-NEXT:    [[L2:%.*]] = load i32, i32* [[GEP2]], align 4
2104; IS__CGSCC____-NEXT:    [[L3:%.*]] = load i32, i32* [[GEP3]], align 4
2105; IS__CGSCC____-NEXT:    [[ADD1:%.*]] = add i32 [[L1]], [[L2]]
2106; IS__CGSCC____-NEXT:    [[ADD2:%.*]] = add i32 [[ADD1]], [[L3]]
2107; IS__CGSCC____-NEXT:    ret i32 [[ADD2]]
2108;
2109entry:
2110  %s = alloca %struct.S, align 4
2111  %bc = bitcast %struct.S* %s to i32*
2112  %gep1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 2
2113  %gep2 = getelementptr inbounds i32, i32* %bc, i32 %arg1
2114  %gep3 = getelementptr inbounds i32, i32* %bc, i32 %arg2
2115  store i32 7, i32* %gep1
2116  store i32 7, i32* %gep2
2117  store i32 7, i32* %gep3
2118  %l1 = load i32, i32* %gep1
2119  %l2 = load i32, i32* %gep2
2120  %l3 = load i32, i32* %gep3
2121  %add1 = add i32 %l1, %l2
2122  %add2 = add i32 %add1, %l3
2123  ret i32 %add2
2124}
2125
2126; The access to bc4b could go anywhere, nothing is simplifiable.
2127define i32 @unknown_access_mixed_not_simplifiable(i32 %arg1, i32 %arg2, i32 %arg3) {
2128; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
2129; IS__TUNIT____-LABEL: define {{[^@]+}}@unknown_access_mixed_not_simplifiable
2130; IS__TUNIT____-SAME: (i32 [[ARG1:%.*]], i32 [[ARG2:%.*]], i32 [[ARG3:%.*]]) #[[ATTR3]] {
2131; IS__TUNIT____-NEXT:  entry:
2132; IS__TUNIT____-NEXT:    [[S:%.*]] = alloca [[STRUCT_S:%.*]], align 4
2133; IS__TUNIT____-NEXT:    [[BC:%.*]] = bitcast %struct.S* [[S]] to i32*
2134; IS__TUNIT____-NEXT:    [[GEP1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
2135; IS__TUNIT____-NEXT:    [[GEP2:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG1]]
2136; IS__TUNIT____-NEXT:    [[GEP3:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG2]]
2137; IS__TUNIT____-NEXT:    [[BC4A:%.*]] = bitcast %struct.S* [[S]] to i8*
2138; IS__TUNIT____-NEXT:    [[GEP4:%.*]] = getelementptr inbounds i8, i8* [[BC4A]], i32 [[ARG3]]
2139; IS__TUNIT____-NEXT:    [[BC4B:%.*]] = bitcast i8* [[GEP4]] to i32*
2140; IS__TUNIT____-NEXT:    store i32 7, i32* [[GEP1]], align 4
2141; IS__TUNIT____-NEXT:    store i32 7, i32* [[GEP2]], align 4
2142; IS__TUNIT____-NEXT:    store i32 7, i32* [[GEP3]], align 4
2143; IS__TUNIT____-NEXT:    store i32 7, i32* [[BC4B]], align 4
2144; IS__TUNIT____-NEXT:    [[L1:%.*]] = load i32, i32* [[GEP1]], align 4
2145; IS__TUNIT____-NEXT:    [[L2:%.*]] = load i32, i32* [[GEP2]], align 4
2146; IS__TUNIT____-NEXT:    [[L3:%.*]] = load i32, i32* [[GEP3]], align 4
2147; IS__TUNIT____-NEXT:    [[L4:%.*]] = load i32, i32* [[BC4B]], align 4
2148; IS__TUNIT____-NEXT:    [[ADD1:%.*]] = add i32 [[L1]], [[L2]]
2149; IS__TUNIT____-NEXT:    [[ADD2:%.*]] = add i32 [[ADD1]], [[L3]]
2150; IS__TUNIT____-NEXT:    [[ADD3:%.*]] = add i32 [[ADD2]], [[L4]]
2151; IS__TUNIT____-NEXT:    ret i32 [[ADD3]]
2152;
2153; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
2154; IS__CGSCC____-LABEL: define {{[^@]+}}@unknown_access_mixed_not_simplifiable
2155; IS__CGSCC____-SAME: (i32 [[ARG1:%.*]], i32 [[ARG2:%.*]], i32 [[ARG3:%.*]]) #[[ATTR2]] {
2156; IS__CGSCC____-NEXT:  entry:
2157; IS__CGSCC____-NEXT:    [[S:%.*]] = alloca [[STRUCT_S:%.*]], align 4
2158; IS__CGSCC____-NEXT:    [[BC:%.*]] = bitcast %struct.S* [[S]] to i32*
2159; IS__CGSCC____-NEXT:    [[GEP1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
2160; IS__CGSCC____-NEXT:    [[GEP2:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG1]]
2161; IS__CGSCC____-NEXT:    [[GEP3:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG2]]
2162; IS__CGSCC____-NEXT:    [[BC4A:%.*]] = bitcast %struct.S* [[S]] to i8*
2163; IS__CGSCC____-NEXT:    [[GEP4:%.*]] = getelementptr inbounds i8, i8* [[BC4A]], i32 [[ARG3]]
2164; IS__CGSCC____-NEXT:    [[BC4B:%.*]] = bitcast i8* [[GEP4]] to i32*
2165; IS__CGSCC____-NEXT:    store i32 7, i32* [[GEP1]], align 4
2166; IS__CGSCC____-NEXT:    store i32 7, i32* [[GEP2]], align 4
2167; IS__CGSCC____-NEXT:    store i32 7, i32* [[GEP3]], align 4
2168; IS__CGSCC____-NEXT:    store i32 7, i32* [[BC4B]], align 4
2169; IS__CGSCC____-NEXT:    [[L1:%.*]] = load i32, i32* [[GEP1]], align 4
2170; IS__CGSCC____-NEXT:    [[L2:%.*]] = load i32, i32* [[GEP2]], align 4
2171; IS__CGSCC____-NEXT:    [[L3:%.*]] = load i32, i32* [[GEP3]], align 4
2172; IS__CGSCC____-NEXT:    [[L4:%.*]] = load i32, i32* [[BC4B]], align 4
2173; IS__CGSCC____-NEXT:    [[ADD1:%.*]] = add i32 [[L1]], [[L2]]
2174; IS__CGSCC____-NEXT:    [[ADD2:%.*]] = add i32 [[ADD1]], [[L3]]
2175; IS__CGSCC____-NEXT:    [[ADD3:%.*]] = add i32 [[ADD2]], [[L4]]
2176; IS__CGSCC____-NEXT:    ret i32 [[ADD3]]
2177;
2178entry:
2179  %s = alloca %struct.S, align 4
2180  %bc = bitcast %struct.S* %s to i32*
2181  %gep1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 2
2182  %gep2 = getelementptr inbounds i32, i32* %bc, i32 %arg1
2183  %gep3 = getelementptr inbounds i32, i32* %bc, i32 %arg2
2184  %bc4a = bitcast %struct.S* %s to i8*
2185  %gep4 = getelementptr inbounds i8, i8* %bc4a, i32 %arg3
2186  %bc4b = bitcast i8* %gep4 to i32*
2187  store i32 7, i32* %gep1
2188  store i32 7, i32* %gep2
2189  store i32 7, i32* %gep3
2190  store i32 7, i32* %bc4b
2191  %l1 = load i32, i32* %gep1
2192  %l2 = load i32, i32* %gep2
2193  %l3 = load i32, i32* %gep3
2194  %l4 = load i32, i32* %bc4b
2195  %add1 = add i32 %l1, %l2
2196  %add2 = add i32 %add1, %l3
2197  %add3 = add i32 %add2, %l4
2198  ret i32 %add3
2199}
2200
2201declare void @escape(i8*)
2202
2203;    int Flag0 = 0;
2204;    int global_not_simplifiable_1(int cnd) {
2205;      return Flag0;
2206;    }
2207;
2208define i32 @global_not_simplifiable_1(i32 %cnd) {
2209; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readonly willreturn
2210; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@global_not_simplifiable_1
2211; IS__TUNIT_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR7:[0-9]+]] {
2212; IS__TUNIT_OPM-NEXT:  entry:
2213; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = load i32, i32* @Flag0, align 4, !tbaa [[TBAA3]]
2214; IS__TUNIT_OPM-NEXT:    ret i32 [[I]]
2215;
2216; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readonly willreturn
2217; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@global_not_simplifiable_1
2218; IS__TUNIT_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR5:[0-9]+]] {
2219; IS__TUNIT_NPM-NEXT:  entry:
2220; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = load i32, i32* @Flag0, align 4, !tbaa [[TBAA3]]
2221; IS__TUNIT_NPM-NEXT:    ret i32 [[I]]
2222;
2223; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
2224; IS__CGSCC____-LABEL: define {{[^@]+}}@global_not_simplifiable_1
2225; IS__CGSCC____-SAME: (i32 [[CND:%.*]]) #[[ATTR7:[0-9]+]] {
2226; IS__CGSCC____-NEXT:  entry:
2227; IS__CGSCC____-NEXT:    [[I:%.*]] = load i32, i32* @Flag0, align 4, !tbaa [[TBAA3]]
2228; IS__CGSCC____-NEXT:    ret i32 [[I]]
2229;
2230entry:
2231  %i = load i32, i32* @Flag0, align 4, !tbaa !3
2232  ret i32 %i
2233}
2234
2235;    static int Flag1 __attribute__((loader_uninitialized));
2236;    int static_global_not_simplifiable_1(int cnd) {
2237;      int v = Flag1;
2238;      sync();
2239;      if (cnd)
2240;        Flag1 = 1;
2241;      return v;
2242;    }
2243;
2244define i32 @static_global_not_simplifiable_1(i32 %cnd) {
2245; CHECK-LABEL: define {{[^@]+}}@static_global_not_simplifiable_1
2246; CHECK-SAME: (i32 [[CND:%.*]]) {
2247; CHECK-NEXT:  entry:
2248; CHECK-NEXT:    call void @sync()
2249; CHECK-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
2250; CHECK-NEXT:    br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
2251; CHECK:       if.then:
2252; CHECK-NEXT:    store i32 1, i32* @Flag1, align 4, !tbaa [[TBAA3]]
2253; CHECK-NEXT:    br label [[IF_END]]
2254; CHECK:       if.end:
2255; CHECK-NEXT:    ret i32 1
2256;
2257entry:
2258  %i = load i32, i32* @Flag1, align 4, !tbaa !3
2259  call void @sync()
2260  %tobool.not = icmp eq i32 %cnd, 0
2261  br i1 %tobool.not, label %if.end, label %if.then
2262
2263if.then:                                          ; preds = %entry
2264  store i32 1, i32* @Flag1, align 4, !tbaa !3
2265  br label %if.end
2266
2267if.end:                                           ; preds = %if.then, %entry
2268  ret i32 %i
2269}
2270
2271declare void @sync()
2272
2273;    static int Flag2 __attribute__((loader_uninitialized));
2274;    int static_global_not_simplifiable_2(int cnd) {
2275;      Flag2 = 1;
2276;      sync();
2277;      int v = Flag2;
2278;      Flag2 = 2;
2279;      return v;
2280;    }
2281define i32 @static_global_not_simplifiable_2(i32 %cnd) {
2282; CHECK-LABEL: define {{[^@]+}}@static_global_not_simplifiable_2
2283; CHECK-SAME: (i32 [[CND:%.*]]) {
2284; CHECK-NEXT:  entry:
2285; CHECK-NEXT:    store i32 1, i32* @Flag2, align 4, !tbaa [[TBAA3]]
2286; CHECK-NEXT:    call void @sync()
2287; CHECK-NEXT:    [[I:%.*]] = load i32, i32* @Flag2, align 4, !tbaa [[TBAA3]]
2288; CHECK-NEXT:    store i32 2, i32* @Flag2, align 4, !tbaa [[TBAA3]]
2289; CHECK-NEXT:    ret i32 [[I]]
2290;
2291entry:
2292  store i32 1, i32* @Flag2, align 4, !tbaa !3
2293  call void @sync()
2294  %i = load i32, i32* @Flag2, align 4, !tbaa !3
2295  store i32 2, i32* @Flag2, align 4, !tbaa !3
2296  ret i32 %i
2297}
2298
2299;    int write_read{,_static,_static_undef}_global(void) {
2300;      Gint{,static,_static_undef}1 = 7;
2301;      return Gint1;
2302;    }
2303;    void write{,_static,_static_undef}_global(void) {
2304;      Gint{,static,_static_undef}2 = 7;
2305;    }
2306;    int read{,_static,_static_undef}_global(void) {
2307;      return Gint{,static,_static_undef}2;
2308;    }
2309;
2310; FIXME: We could replace these loads.
2311define i32 @write_read_global() {
2312; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn
2313; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_read_global
2314; IS__TUNIT_OPM-SAME: () #[[ATTR4]] {
2315; IS__TUNIT_OPM-NEXT:    store i32 7, i32* @Gint1, align 4
2316; IS__TUNIT_OPM-NEXT:    [[L:%.*]] = load i32, i32* @Gint1, align 4
2317; IS__TUNIT_OPM-NEXT:    ret i32 [[L]]
2318;
2319; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
2320; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_read_global
2321; IS__TUNIT_NPM-SAME: () #[[ATTR2]] {
2322; IS__TUNIT_NPM-NEXT:    store i32 7, i32* @Gint1, align 4
2323; IS__TUNIT_NPM-NEXT:    [[L:%.*]] = load i32, i32* @Gint1, align 4
2324; IS__TUNIT_NPM-NEXT:    ret i32 [[L]]
2325;
2326; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn
2327; IS__CGSCC____-LABEL: define {{[^@]+}}@write_read_global
2328; IS__CGSCC____-SAME: () #[[ATTR5]] {
2329; IS__CGSCC____-NEXT:    store i32 7, i32* @Gint1, align 4
2330; IS__CGSCC____-NEXT:    [[L:%.*]] = load i32, i32* @Gint1, align 4
2331; IS__CGSCC____-NEXT:    ret i32 [[L]]
2332;
2333  store i32 7, i32* @Gint1
2334  %l = load i32, i32* @Gint1
2335  ret i32 %l
2336}
2337define void @write_global() {
2338; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn writeonly
2339; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_global
2340; IS__TUNIT_OPM-SAME: () #[[ATTR5]] {
2341; IS__TUNIT_OPM-NEXT:    store i32 7, i32* @Gint2, align 4
2342; IS__TUNIT_OPM-NEXT:    ret void
2343;
2344; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly
2345; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_global
2346; IS__TUNIT_NPM-SAME: () #[[ATTR4]] {
2347; IS__TUNIT_NPM-NEXT:    store i32 7, i32* @Gint2, align 4
2348; IS__TUNIT_NPM-NEXT:    ret void
2349;
2350; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
2351; IS__CGSCC____-LABEL: define {{[^@]+}}@write_global
2352; IS__CGSCC____-SAME: () #[[ATTR4]] {
2353; IS__CGSCC____-NEXT:    store i32 7, i32* @Gint2, align 4
2354; IS__CGSCC____-NEXT:    ret void
2355;
2356  store i32 7, i32* @Gint2
2357  ret void
2358}
2359define i32 @read_global() {
2360; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readonly willreturn
2361; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@read_global
2362; IS__TUNIT_OPM-SAME: () #[[ATTR7]] {
2363; IS__TUNIT_OPM-NEXT:    [[L:%.*]] = load i32, i32* @Gint2, align 4
2364; IS__TUNIT_OPM-NEXT:    ret i32 [[L]]
2365;
2366; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readonly willreturn
2367; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@read_global
2368; IS__TUNIT_NPM-SAME: () #[[ATTR5]] {
2369; IS__TUNIT_NPM-NEXT:    [[L:%.*]] = load i32, i32* @Gint2, align 4
2370; IS__TUNIT_NPM-NEXT:    ret i32 [[L]]
2371;
2372; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
2373; IS__CGSCC____-LABEL: define {{[^@]+}}@read_global
2374; IS__CGSCC____-SAME: () #[[ATTR7]] {
2375; IS__CGSCC____-NEXT:    [[L:%.*]] = load i32, i32* @Gint2, align 4
2376; IS__CGSCC____-NEXT:    ret i32 [[L]]
2377;
2378  %l = load i32, i32* @Gint2
2379  ret i32 %l
2380}
2381; FIXME: We could replace these loads.
2382define i32 @write_read_static_global() {
2383; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn
2384; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_read_static_global
2385; IS__TUNIT_OPM-SAME: () #[[ATTR4]] {
2386; IS__TUNIT_OPM-NEXT:    store i32 7, i32* @Gstatic_int1, align 4
2387; IS__TUNIT_OPM-NEXT:    [[L:%.*]] = load i32, i32* @Gstatic_int1, align 4
2388; IS__TUNIT_OPM-NEXT:    ret i32 [[L]]
2389;
2390; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
2391; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_read_static_global
2392; IS__TUNIT_NPM-SAME: () #[[ATTR2]] {
2393; IS__TUNIT_NPM-NEXT:    store i32 7, i32* @Gstatic_int1, align 4
2394; IS__TUNIT_NPM-NEXT:    [[L:%.*]] = load i32, i32* @Gstatic_int1, align 4
2395; IS__TUNIT_NPM-NEXT:    ret i32 [[L]]
2396;
2397; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn
2398; IS__CGSCC____-LABEL: define {{[^@]+}}@write_read_static_global
2399; IS__CGSCC____-SAME: () #[[ATTR5]] {
2400; IS__CGSCC____-NEXT:    store i32 7, i32* @Gstatic_int1, align 4
2401; IS__CGSCC____-NEXT:    [[L:%.*]] = load i32, i32* @Gstatic_int1, align 4
2402; IS__CGSCC____-NEXT:    ret i32 [[L]]
2403;
2404  store i32 7, i32* @Gstatic_int1
2405  %l = load i32, i32* @Gstatic_int1
2406  ret i32 %l
2407}
2408define void @write_static_global() {
2409; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn writeonly
2410; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_static_global
2411; IS__TUNIT_OPM-SAME: () #[[ATTR5]] {
2412; IS__TUNIT_OPM-NEXT:    store i32 7, i32* @Gstatic_int2, align 4
2413; IS__TUNIT_OPM-NEXT:    ret void
2414;
2415; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly
2416; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_static_global
2417; IS__TUNIT_NPM-SAME: () #[[ATTR4]] {
2418; IS__TUNIT_NPM-NEXT:    store i32 7, i32* @Gstatic_int2, align 4
2419; IS__TUNIT_NPM-NEXT:    ret void
2420;
2421; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
2422; IS__CGSCC____-LABEL: define {{[^@]+}}@write_static_global
2423; IS__CGSCC____-SAME: () #[[ATTR4]] {
2424; IS__CGSCC____-NEXT:    store i32 7, i32* @Gstatic_int2, align 4
2425; IS__CGSCC____-NEXT:    ret void
2426;
2427  store i32 7, i32* @Gstatic_int2
2428  ret void
2429}
2430define i32 @read_static_global() {
2431; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readonly willreturn
2432; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@read_static_global
2433; IS__TUNIT_OPM-SAME: () #[[ATTR7]] {
2434; IS__TUNIT_OPM-NEXT:    [[L:%.*]] = load i32, i32* @Gstatic_int2, align 4
2435; IS__TUNIT_OPM-NEXT:    ret i32 [[L]]
2436;
2437; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readonly willreturn
2438; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@read_static_global
2439; IS__TUNIT_NPM-SAME: () #[[ATTR5]] {
2440; IS__TUNIT_NPM-NEXT:    [[L:%.*]] = load i32, i32* @Gstatic_int2, align 4
2441; IS__TUNIT_NPM-NEXT:    ret i32 [[L]]
2442;
2443; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
2444; IS__CGSCC____-LABEL: define {{[^@]+}}@read_static_global
2445; IS__CGSCC____-SAME: () #[[ATTR7]] {
2446; IS__CGSCC____-NEXT:    [[L:%.*]] = load i32, i32* @Gstatic_int2, align 4
2447; IS__CGSCC____-NEXT:    ret i32 [[L]]
2448;
2449  %l = load i32, i32* @Gstatic_int2
2450  ret i32 %l
2451}
2452define i32 @write_read_static_undef_global() {
2453; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn writeonly
2454; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_read_static_undef_global
2455; IS__TUNIT_OPM-SAME: () #[[ATTR5]] {
2456; IS__TUNIT_OPM-NEXT:    ret i32 7
2457;
2458; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly
2459; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_read_static_undef_global
2460; IS__TUNIT_NPM-SAME: () #[[ATTR4]] {
2461; IS__TUNIT_NPM-NEXT:    ret i32 7
2462;
2463; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
2464; IS__CGSCC____-LABEL: define {{[^@]+}}@write_read_static_undef_global
2465; IS__CGSCC____-SAME: () #[[ATTR4]] {
2466; IS__CGSCC____-NEXT:    ret i32 7
2467;
2468  store i32 7, i32* @Gstatic_undef_int1
2469  %l = load i32, i32* @Gstatic_undef_int1
2470  ret i32 %l
2471}
2472define void @write_static_undef_global() {
2473; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn writeonly
2474; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_static_undef_global
2475; IS__TUNIT_OPM-SAME: () #[[ATTR5]] {
2476; IS__TUNIT_OPM-NEXT:    ret void
2477;
2478; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly
2479; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_static_undef_global
2480; IS__TUNIT_NPM-SAME: () #[[ATTR4]] {
2481; IS__TUNIT_NPM-NEXT:    ret void
2482;
2483; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
2484; IS__CGSCC____-LABEL: define {{[^@]+}}@write_static_undef_global
2485; IS__CGSCC____-SAME: () #[[ATTR4]] {
2486; IS__CGSCC____-NEXT:    store i32 7, i32* @Gstatic_undef_int2, align 4
2487; IS__CGSCC____-NEXT:    ret void
2488;
2489  store i32 7, i32* @Gstatic_undef_int2
2490  ret void
2491}
2492define i32 @read_static_undef_global() {
2493; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
2494; IS__TUNIT____-LABEL: define {{[^@]+}}@read_static_undef_global
2495; IS__TUNIT____-SAME: () #[[ATTR3]] {
2496; IS__TUNIT____-NEXT:    ret i32 7
2497;
2498; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
2499; IS__CGSCC____-LABEL: define {{[^@]+}}@read_static_undef_global
2500; IS__CGSCC____-SAME: () #[[ATTR2]] {
2501; IS__CGSCC____-NEXT:    ret i32 7
2502;
2503  %l = load i32, i32* @Gstatic_undef_int2
2504  ret i32 %l
2505}
2506
2507define i32 @single_read_of_static_global() {
2508; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
2509; IS__TUNIT____-LABEL: define {{[^@]+}}@single_read_of_static_global
2510; IS__TUNIT____-SAME: () #[[ATTR3]] {
2511; IS__TUNIT____-NEXT:    ret i32 0
2512;
2513; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
2514; IS__CGSCC____-LABEL: define {{[^@]+}}@single_read_of_static_global
2515; IS__CGSCC____-SAME: () #[[ATTR2]] {
2516; IS__CGSCC____-NEXT:    ret i32 0
2517;
2518  %l = load i32, i32* @Gstatic_int3
2519  ret i32 %l
2520}
2521
2522
2523!llvm.module.flags = !{!0, !1}
2524!llvm.ident = !{!2}
2525
2526!0 = !{i32 1, !"wchar_size", i32 4}
2527!1 = !{i32 7, !"uwtable", i32 1}
2528!2 = !{!"clang version 13.0.0"}
2529!3 = !{!4, !4, i64 0}
2530!4 = !{!"int", !5, i64 0}
2531!5 = !{!"omnipotent char", !6, i64 0}
2532!6 = !{!"Simple C/C++ TBAA"}
2533!7 = !{!8, !9, i64 12}
2534!8 = !{!"S", !4, i64 0, !4, i64 4, !4, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}
2535!9 = !{!"float", !5, i64 0}
2536!10 = !{!8, !9, i64 16}
2537!11 = !{!8, !9, i64 20}
2538!12 = !{!8, !4, i64 0}
2539!13 = !{!8, !4, i64 4}
2540!14 = !{!8, !4, i64 8}
2541!15 = !{!5, !5, i64 0}
2542!16 = distinct !{!16, !17}
2543!17 = !{!"llvm.loop.mustprogress"}
2544!18 = !{!9, !9, i64 0}
2545!19 = distinct !{!19, !17}
2546!20 = !{!21, !21, i64 0}
2547!21 = !{!"long long", !5, i64 0}
2548!22 = distinct !{!22, !17}
2549!23 = distinct !{!23, !17}
2550!24 = distinct !{!24, !17}
2551!25 = distinct !{!25, !17}
2552!26 = distinct !{!26, !17}
2553!27 = distinct !{!27, !17}
2554!28 = distinct !{!28, !17}
2555!29 = distinct !{!29, !17}
2556!30 = distinct !{!30, !17}
2557!31 = distinct !{!31, !17}
2558;.
2559; IS__TUNIT_OPM: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind willreturn writeonly }
2560; IS__TUNIT_OPM: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind willreturn }
2561; IS__TUNIT_OPM: attributes #[[ATTR2]] = { nofree nosync nounwind }
2562; IS__TUNIT_OPM: attributes #[[ATTR3]] = { nofree nosync nounwind readnone willreturn }
2563; IS__TUNIT_OPM: attributes #[[ATTR4]] = { nofree nosync nounwind willreturn }
2564; IS__TUNIT_OPM: attributes #[[ATTR5]] = { nofree nosync nounwind willreturn writeonly }
2565; IS__TUNIT_OPM: attributes #[[ATTR6]] = { nofree nosync nounwind writeonly }
2566; IS__TUNIT_OPM: attributes #[[ATTR7]] = { nofree nosync nounwind readonly willreturn }
2567; IS__TUNIT_OPM: attributes #[[ATTR8]] = { willreturn }
2568;.
2569; IS__TUNIT_NPM: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind willreturn writeonly }
2570; IS__TUNIT_NPM: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind willreturn }
2571; IS__TUNIT_NPM: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn }
2572; IS__TUNIT_NPM: attributes #[[ATTR3]] = { nofree nosync nounwind readnone willreturn }
2573; IS__TUNIT_NPM: attributes #[[ATTR4]] = { nofree nosync nounwind willreturn writeonly }
2574; IS__TUNIT_NPM: attributes #[[ATTR5]] = { nofree nosync nounwind readonly willreturn }
2575; IS__TUNIT_NPM: attributes #[[ATTR6]] = { willreturn }
2576;.
2577; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
2578; IS__CGSCC____: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind willreturn }
2579; IS__CGSCC____: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn }
2580; IS__CGSCC____: attributes #[[ATTR3]] = { nofree nosync nounwind willreturn }
2581; IS__CGSCC____: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind willreturn writeonly }
2582; IS__CGSCC____: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind willreturn }
2583; IS__CGSCC____: attributes #[[ATTR6]] = { argmemonly nofree norecurse nosync nounwind willreturn }
2584; IS__CGSCC____: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind readonly willreturn }
2585; IS__CGSCC____: attributes #[[ATTR8]] = { willreturn }
2586; IS__CGSCC____: attributes #[[ATTR9]] = { nounwind willreturn writeonly }
2587; IS__CGSCC____: attributes #[[ATTR10]] = { nounwind writeonly }
2588;.
2589; IS__TUNIT____: [[META0:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
2590; IS__TUNIT____: [[META1:![0-9]+]] = !{i32 7, !"uwtable", i32 1}
2591; IS__TUNIT____: [[META2:![0-9]+]] = !{!"clang version 13.0.0"}
2592; IS__TUNIT____: [[TBAA3]] = !{!4, !4, i64 0}
2593; IS__TUNIT____: [[META4:![0-9]+]] = !{!"int", !5, i64 0}
2594; IS__TUNIT____: [[META5:![0-9]+]] = !{!"omnipotent char", !6, i64 0}
2595; IS__TUNIT____: [[META6:![0-9]+]] = !{!"Simple C/C++ TBAA"}
2596; IS__TUNIT____: [[META7:![0-9]+]] = !{!8, !9, i64 12}
2597; IS__TUNIT____: [[META8:![0-9]+]] = !{!"S", !4, i64 0, !4, i64 4, !4, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}
2598; IS__TUNIT____: [[META9:![0-9]+]] = !{!"float", !5, i64 0}
2599; IS__TUNIT____: [[META10:![0-9]+]] = !{!8, !9, i64 16}
2600; IS__TUNIT____: [[META11:![0-9]+]] = !{!8, !9, i64 20}
2601; IS__TUNIT____: [[META12:![0-9]+]] = !{!8, !4, i64 0}
2602; IS__TUNIT____: [[META13:![0-9]+]] = !{!8, !4, i64 4}
2603; IS__TUNIT____: [[META14:![0-9]+]] = !{!8, !4, i64 8}
2604; IS__TUNIT____: [[META15:![0-9]+]] = distinct !{!15, !16}
2605; IS__TUNIT____: [[META16:![0-9]+]] = !{!"llvm.loop.mustprogress"}
2606; IS__TUNIT____: [[META17:![0-9]+]] = distinct !{!17, !16}
2607; IS__TUNIT____: [[META18:![0-9]+]] = distinct !{!18, !16}
2608; IS__TUNIT____: [[META19:![0-9]+]] = !{!5, !5, i64 0}
2609; IS__TUNIT____: [[META20:![0-9]+]] = distinct !{!20, !16}
2610; IS__TUNIT____: [[META21:![0-9]+]] = distinct !{!21, !16}
2611; IS__TUNIT____: [[META22:![0-9]+]] = distinct !{!22, !16}
2612; IS__TUNIT____: [[META23:![0-9]+]] = distinct !{!23, !16}
2613; IS__TUNIT____: [[META24:![0-9]+]] = distinct !{!24, !16}
2614; IS__TUNIT____: [[META25:![0-9]+]] = distinct !{!25, !16}
2615; IS__TUNIT____: [[META26:![0-9]+]] = !{!9, !9, i64 0}
2616; IS__TUNIT____: [[META27:![0-9]+]] = distinct !{!27, !16}
2617; IS__TUNIT____: [[META28:![0-9]+]] = !{!29, !29, i64 0}
2618; IS__TUNIT____: [[META29:![0-9]+]] = !{!"long long", !5, i64 0}
2619; IS__TUNIT____: [[META30:![0-9]+]] = distinct !{!30, !16}
2620; IS__TUNIT____: [[META31:![0-9]+]] = distinct !{!31, !16}
2621;.
2622; IS__CGSCC____: [[META0:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
2623; IS__CGSCC____: [[META1:![0-9]+]] = !{i32 7, !"uwtable", i32 1}
2624; IS__CGSCC____: [[META2:![0-9]+]] = !{!"clang version 13.0.0"}
2625; IS__CGSCC____: [[TBAA3]] = !{!4, !4, i64 0}
2626; IS__CGSCC____: [[META4:![0-9]+]] = !{!"int", !5, i64 0}
2627; IS__CGSCC____: [[META5:![0-9]+]] = !{!"omnipotent char", !6, i64 0}
2628; IS__CGSCC____: [[META6:![0-9]+]] = !{!"Simple C/C++ TBAA"}
2629; IS__CGSCC____: [[TBAA7]] = !{!8, !9, i64 12}
2630; IS__CGSCC____: [[META8:![0-9]+]] = !{!"S", !4, i64 0, !4, i64 4, !4, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}
2631; IS__CGSCC____: [[META9:![0-9]+]] = !{!"float", !5, i64 0}
2632; IS__CGSCC____: [[TBAA10]] = !{!8, !9, i64 16}
2633; IS__CGSCC____: [[TBAA11]] = !{!8, !9, i64 20}
2634; IS__CGSCC____: [[TBAA12]] = !{!8, !4, i64 0}
2635; IS__CGSCC____: [[TBAA13]] = !{!8, !4, i64 4}
2636; IS__CGSCC____: [[TBAA14]] = !{!8, !4, i64 8}
2637; IS__CGSCC____: [[TBAA15]] = !{!5, !5, i64 0}
2638; IS__CGSCC____: [[META16:![0-9]+]] = distinct !{!16, !17}
2639; IS__CGSCC____: [[META17:![0-9]+]] = !{!"llvm.loop.mustprogress"}
2640; IS__CGSCC____: [[TBAA18]] = !{!9, !9, i64 0}
2641; IS__CGSCC____: [[META19:![0-9]+]] = distinct !{!19, !17}
2642; IS__CGSCC____: [[TBAA20]] = !{!21, !21, i64 0}
2643; IS__CGSCC____: [[META21:![0-9]+]] = !{!"long long", !5, i64 0}
2644; IS__CGSCC____: [[META22:![0-9]+]] = distinct !{!22, !17}
2645; IS__CGSCC____: [[META23:![0-9]+]] = distinct !{!23, !17}
2646; IS__CGSCC____: [[LOOP24]] = distinct !{!24, !17}
2647; IS__CGSCC____: [[LOOP25]] = distinct !{!25, !17}
2648; IS__CGSCC____: [[LOOP26]] = distinct !{!26, !17}
2649; IS__CGSCC____: [[LOOP27]] = distinct !{!27, !17}
2650; IS__CGSCC____: [[LOOP28]] = distinct !{!28, !17}
2651; IS__CGSCC____: [[LOOP29]] = distinct !{!29, !17}
2652; IS__CGSCC____: [[LOOP30]] = distinct !{!30, !17}
2653; IS__CGSCC____: [[LOOP31]] = distinct !{!31, !17}
2654;.
2655