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@a1 = internal global i32 zeroinitializer
27@a2 = internal global i32 zeroinitializer
28@a3 = internal global i32 undef
29@bytes1 = internal global i32 undef
30@bytes2 = internal global i32 undef
31@rec_storage = internal global i32 undef
32
33;.
34; CHECK: @[[GLOBALBYTES:[a-zA-Z0-9_$"\\.-]+]] = global [1024 x i8] zeroinitializer, align 16
35; CHECK: @[[GINT1:[a-zA-Z0-9_$"\\.-]+]] = global i32 0, align 4
36; CHECK: @[[GINT2:[a-zA-Z0-9_$"\\.-]+]] = global i32 0, align 4
37; CHECK: @[[GSTATIC_INT1:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 0, align 4
38; CHECK: @[[GSTATIC_INT2:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 0, align 4
39; CHECK: @[[GSTATIC_INT3:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 0, align 4
40; CHECK: @[[GSTATIC_UNDEF_INT1:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef, align 4
41; CHECK: @[[GSTATIC_UNDEF_INT2:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef, align 4
42; CHECK: @[[GI1:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef, align 4
43; CHECK: @[[GI2:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef, align 4
44; CHECK: @[[GS1:[a-zA-Z0-9_$"\\.-]+]] = internal global [[STRUCT_S:%.*]] undef, align 4
45; CHECK: @[[GS2:[a-zA-Z0-9_$"\\.-]+]] = internal global [[STRUCT_S:%.*]] zeroinitializer, align 4
46; CHECK: @[[GBYTES:[a-zA-Z0-9_$"\\.-]+]] = internal global [1024 x i8] zeroinitializer, align 16
47; CHECK: @[[FLAG0:[a-zA-Z0-9_$"\\.-]+]] = global i32 0, align 4
48; CHECK: @[[FLAG1:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef, align 4
49; CHECK: @[[FLAG2:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef, align 4
50; CHECK: @[[FLAG3:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 0, align 4
51; CHECK: @[[A1:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 0
52; CHECK: @[[A2:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 0
53; CHECK: @[[A3:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef
54; CHECK: @[[BYTES1:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef
55; CHECK: @[[BYTES2:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef
56; CHECK: @[[REC_STORAGE:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef
57;.
58define void @write_arg(i32* %p, i32 %v) {
59; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
60; IS__TUNIT____-LABEL: define {{[^@]+}}@write_arg
61; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P:%.*]], i32 [[V:%.*]]) #[[ATTR0:[0-9]+]] {
62; IS__TUNIT____-NEXT:  entry:
63; IS__TUNIT____-NEXT:    store i32 [[V]], i32* [[P]], align 4, !tbaa [[TBAA3:![0-9]+]]
64; IS__TUNIT____-NEXT:    ret void
65;
66; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
67; IS__CGSCC____-LABEL: define {{[^@]+}}@write_arg
68; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P:%.*]], i32 [[V:%.*]]) #[[ATTR0:[0-9]+]] {
69; IS__CGSCC____-NEXT:  entry:
70; IS__CGSCC____-NEXT:    store i32 [[V]], i32* [[P]], align 4, !tbaa [[TBAA3:![0-9]+]]
71; IS__CGSCC____-NEXT:    ret void
72;
73entry:
74  store i32 %v, i32* %p, align 4, !tbaa !3
75  ret void
76}
77
78define void @write_random(i32* %p) {
79; CHECK-LABEL: define {{[^@]+}}@write_random
80; CHECK-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) {
81; CHECK-NEXT:  entry:
82; CHECK-NEXT:    [[CALL:%.*]] = call i32 (...) @random()
83; CHECK-NEXT:    store i32 [[CALL]], i32* [[P]], align 4, !tbaa [[TBAA3:![0-9]+]]
84; CHECK-NEXT:    ret void
85;
86entry:
87  %call = call i32 (...) @random()
88  store i32 %call, i32* %p, align 4, !tbaa !3
89  ret void
90}
91
92declare i32 @random(...)
93
94;    struct S local_alloca_simplifiable_1(void) {
95;      struct S s;
96;      s.f1 = 1.1;
97;      s.f2 = 2.2;
98;      s.f3 = 3.3;
99;      write_arg(&s.i1, 1);
100;      write_arg(&s.i2, 2);
101;      write_arg(&s.i3, 3);
102;      struct S r;
103;      r.f1 = s.f1;
104;      r.f2 = s.f2 * 2;
105;      r.f3 = s.f3 + s.f1;
106;      r.i1 = s.i1;
107;      r.i2 = s.i2 * 2;
108;      r.i3 = s.i3 + s.i1;
109;      return r;
110;    }
111define void @local_alloca_simplifiable_1(%struct.S* noalias sret(%struct.S) align 4 %agg.result) {
112; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
113; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1
114; IS__TUNIT_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] {
115; IS__TUNIT_OPM-NEXT:  entry:
116; IS__TUNIT_OPM-NEXT:    [[S:%.*]] = alloca [[STRUCT_S]], align 4
117; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = bitcast %struct.S* [[S]] to i8*
118; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR9:[0-9]+]]
119; IS__TUNIT_OPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
120; IS__TUNIT_OPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
121; IS__TUNIT_OPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
122; IS__TUNIT_OPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
123; 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]+]]
124; IS__TUNIT_OPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
125; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR5]]
126; IS__TUNIT_OPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
127; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR5]]
128; IS__TUNIT_OPM-NEXT:    [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
129; IS__TUNIT_OPM-NEXT:    store float 0x3FF19999A0000000, float* [[F12]], align 4, !tbaa [[TBAA7:![0-9]+]]
130; IS__TUNIT_OPM-NEXT:    [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00
131; IS__TUNIT_OPM-NEXT:    [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
132; IS__TUNIT_OPM-NEXT:    store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10:![0-9]+]]
133; IS__TUNIT_OPM-NEXT:    [[ADD:%.*]] = fadd float 0x400A666660000000, 0x3FF19999A0000000
134; IS__TUNIT_OPM-NEXT:    [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
135; IS__TUNIT_OPM-NEXT:    store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11:![0-9]+]]
136; IS__TUNIT_OPM-NEXT:    [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
137; IS__TUNIT_OPM-NEXT:    store i32 1, i32* [[I19]], align 4, !tbaa [[TBAA12:![0-9]+]]
138; IS__TUNIT_OPM-NEXT:    [[MUL11:%.*]] = shl nsw i32 2, 1
139; IS__TUNIT_OPM-NEXT:    [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
140; IS__TUNIT_OPM-NEXT:    store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13:![0-9]+]]
141; IS__TUNIT_OPM-NEXT:    [[ADD15:%.*]] = add nsw i32 3, 1
142; IS__TUNIT_OPM-NEXT:    [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
143; IS__TUNIT_OPM-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14:![0-9]+]]
144; IS__TUNIT_OPM-NEXT:    [[I12:%.*]] = bitcast %struct.S* [[S]] to i8*
145; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR9]]
146; IS__TUNIT_OPM-NEXT:    ret void
147;
148; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
149; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1
150; IS__TUNIT_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] {
151; IS__TUNIT_NPM-NEXT:  entry:
152; IS__TUNIT_NPM-NEXT:    [[S:%.*]] = alloca [[STRUCT_S]], align 4
153; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = bitcast %struct.S* [[S]] to i8*
154; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR7:[0-9]+]]
155; IS__TUNIT_NPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
156; IS__TUNIT_NPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
157; IS__TUNIT_NPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
158; IS__TUNIT_NPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
159; 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]+]]
160; IS__TUNIT_NPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
161; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR4]]
162; IS__TUNIT_NPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
163; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR4]]
164; IS__TUNIT_NPM-NEXT:    [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
165; IS__TUNIT_NPM-NEXT:    store float 0x3FF19999A0000000, float* [[F12]], align 4, !tbaa [[TBAA7:![0-9]+]]
166; IS__TUNIT_NPM-NEXT:    [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00
167; IS__TUNIT_NPM-NEXT:    [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
168; IS__TUNIT_NPM-NEXT:    store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10:![0-9]+]]
169; IS__TUNIT_NPM-NEXT:    [[ADD:%.*]] = fadd float 0x400A666660000000, 0x3FF19999A0000000
170; IS__TUNIT_NPM-NEXT:    [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
171; IS__TUNIT_NPM-NEXT:    store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11:![0-9]+]]
172; IS__TUNIT_NPM-NEXT:    [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
173; IS__TUNIT_NPM-NEXT:    store i32 1, i32* [[I19]], align 4, !tbaa [[TBAA12:![0-9]+]]
174; IS__TUNIT_NPM-NEXT:    [[MUL11:%.*]] = shl nsw i32 2, 1
175; IS__TUNIT_NPM-NEXT:    [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
176; IS__TUNIT_NPM-NEXT:    store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13:![0-9]+]]
177; IS__TUNIT_NPM-NEXT:    [[ADD15:%.*]] = add nsw i32 3, 1
178; IS__TUNIT_NPM-NEXT:    [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
179; IS__TUNIT_NPM-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14:![0-9]+]]
180; IS__TUNIT_NPM-NEXT:    [[I12:%.*]] = bitcast %struct.S* [[S]] to i8*
181; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR7]]
182; IS__TUNIT_NPM-NEXT:    ret void
183;
184; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
185; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1
186; IS__CGSCC_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] {
187; IS__CGSCC_OPM-NEXT:  entry:
188; IS__CGSCC_OPM-NEXT:    [[S:%.*]] = alloca [[STRUCT_S]], align 4
189; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = bitcast %struct.S* [[S]] to i8*
190; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR11:[0-9]+]]
191; IS__CGSCC_OPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
192; IS__CGSCC_OPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
193; IS__CGSCC_OPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
194; IS__CGSCC_OPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
195; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR12:[0-9]+]]
196; IS__CGSCC_OPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
197; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR12]]
198; IS__CGSCC_OPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
199; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR12]]
200; IS__CGSCC_OPM-NEXT:    [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
201; IS__CGSCC_OPM-NEXT:    store float 0x3FF19999A0000000, float* [[F12]], align 4, !tbaa [[TBAA7:![0-9]+]]
202; IS__CGSCC_OPM-NEXT:    [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00
203; IS__CGSCC_OPM-NEXT:    [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
204; IS__CGSCC_OPM-NEXT:    store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10:![0-9]+]]
205; IS__CGSCC_OPM-NEXT:    [[ADD:%.*]] = fadd float 0x400A666660000000, 0x3FF19999A0000000
206; IS__CGSCC_OPM-NEXT:    [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
207; IS__CGSCC_OPM-NEXT:    store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11:![0-9]+]]
208; IS__CGSCC_OPM-NEXT:    [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
209; IS__CGSCC_OPM-NEXT:    store i32 1, i32* [[I19]], align 4, !tbaa [[TBAA12:![0-9]+]]
210; IS__CGSCC_OPM-NEXT:    [[MUL11:%.*]] = shl nsw i32 2, 1
211; IS__CGSCC_OPM-NEXT:    [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
212; IS__CGSCC_OPM-NEXT:    store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13:![0-9]+]]
213; IS__CGSCC_OPM-NEXT:    [[ADD15:%.*]] = add nsw i32 3, 1
214; IS__CGSCC_OPM-NEXT:    [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
215; IS__CGSCC_OPM-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14:![0-9]+]]
216; IS__CGSCC_OPM-NEXT:    [[I12:%.*]] = bitcast %struct.S* [[S]] to i8*
217; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR11]]
218; IS__CGSCC_OPM-NEXT:    ret void
219;
220; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
221; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1
222; IS__CGSCC_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] {
223; IS__CGSCC_NPM-NEXT:  entry:
224; IS__CGSCC_NPM-NEXT:    [[S:%.*]] = alloca [[STRUCT_S]], align 4
225; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = bitcast %struct.S* [[S]] to i8*
226; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR9:[0-9]+]]
227; IS__CGSCC_NPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
228; IS__CGSCC_NPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
229; IS__CGSCC_NPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
230; IS__CGSCC_NPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
231; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR10:[0-9]+]]
232; IS__CGSCC_NPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
233; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR10]]
234; IS__CGSCC_NPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
235; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR10]]
236; IS__CGSCC_NPM-NEXT:    [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
237; IS__CGSCC_NPM-NEXT:    store float 0x3FF19999A0000000, float* [[F12]], align 4, !tbaa [[TBAA7:![0-9]+]]
238; IS__CGSCC_NPM-NEXT:    [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00
239; IS__CGSCC_NPM-NEXT:    [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
240; IS__CGSCC_NPM-NEXT:    store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10:![0-9]+]]
241; IS__CGSCC_NPM-NEXT:    [[ADD:%.*]] = fadd float 0x400A666660000000, 0x3FF19999A0000000
242; IS__CGSCC_NPM-NEXT:    [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
243; IS__CGSCC_NPM-NEXT:    store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11:![0-9]+]]
244; IS__CGSCC_NPM-NEXT:    [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
245; IS__CGSCC_NPM-NEXT:    store i32 1, i32* [[I19]], align 4, !tbaa [[TBAA12:![0-9]+]]
246; IS__CGSCC_NPM-NEXT:    [[MUL11:%.*]] = shl nsw i32 2, 1
247; IS__CGSCC_NPM-NEXT:    [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
248; IS__CGSCC_NPM-NEXT:    store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13:![0-9]+]]
249; IS__CGSCC_NPM-NEXT:    [[ADD15:%.*]] = add nsw i32 3, 1
250; IS__CGSCC_NPM-NEXT:    [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
251; IS__CGSCC_NPM-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14:![0-9]+]]
252; IS__CGSCC_NPM-NEXT:    [[I12:%.*]] = bitcast %struct.S* [[S]] to i8*
253; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR9]]
254; IS__CGSCC_NPM-NEXT:    ret void
255;
256entry:
257  %s = alloca %struct.S, align 4
258  %i = bitcast %struct.S* %s to i8*
259  call void @llvm.lifetime.start.p0i8(i64 24, i8* nonnull %i)
260  %f1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 3
261  store float 0x3FF19999A0000000, float* %f1, align 4, !tbaa !7
262  %f2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 4
263  store float 0x40019999A0000000, float* %f2, align 4, !tbaa !10
264  %f3 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 5
265  store float 0x400A666660000000, float* %f3, align 4, !tbaa !11
266  %i1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0
267  call void @write_arg(i32* nonnull %i1, i32 1)
268  %i2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1
269  call void @write_arg(i32* nonnull %i2, i32 2)
270  %i3 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 2
271  call void @write_arg(i32* nonnull %i3, i32 3)
272  %f11 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 3
273  %i4 = load float, float* %f11, align 4, !tbaa !7
274  %f12 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 3
275  store float %i4, float* %f12, align 4, !tbaa !7
276  %f23 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 4
277  %i5 = load float, float* %f23, align 4, !tbaa !10
278  %mul = fmul float %i5, 2.000000e+00
279  %f24 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 4
280  store float %mul, float* %f24, align 4, !tbaa !10
281  %f35 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 5
282  %i6 = load float, float* %f35, align 4, !tbaa !11
283  %f16 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 3
284  %i7 = load float, float* %f16, align 4, !tbaa !7
285  %add = fadd float %i6, %i7
286  %f37 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 5
287  store float %add, float* %f37, align 4, !tbaa !11
288  %i18 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0
289  %i8 = load i32, i32* %i18, align 4, !tbaa !12
290  %i19 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 0
291  store i32 %i8, i32* %i19, align 4, !tbaa !12
292  %i210 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1
293  %i9 = load i32, i32* %i210, align 4, !tbaa !13
294  %mul11 = shl nsw i32 %i9, 1
295  %i212 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 1
296  store i32 %mul11, i32* %i212, align 4, !tbaa !13
297  %i313 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 2
298  %i10 = load i32, i32* %i313, align 4, !tbaa !14
299  %i114 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0
300  %i11 = load i32, i32* %i114, align 4, !tbaa !12
301  %add15 = add nsw i32 %i10, %i11
302  %i316 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 2
303  store i32 %add15, i32* %i316, align 4, !tbaa !14
304  %i12 = bitcast %struct.S* %s to i8*
305  call void @llvm.lifetime.end.p0i8(i64 24, i8* nonnull %i12)
306  ret void
307}
308
309declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture)
310
311declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture)
312
313;    void local_alloca_simplifiable_2(void) {
314;      char Bytes[1024];
315;      for (int i = 0; i < 100; ++i)
316;        Bytes[i * 10] = 0;
317;      for (int i = 0; i < 10; ++i)
318;        ((float *)Bytes)[i * 10 + 1] = 0;
319;      for (int i = 0; i < 20; ++i)
320;        ((long long int *)Bytes)[i * 10 + 2] = 0;
321;      Bytes[1023] = 0;
322;      write_arg((int *)&Bytes[500], 0);
323;      struct S R;
324;      for (int i = 0; i < 1024; ++i)
325;        globalBytes[i] = Bytes[i];
326;    }
327;
328define void @local_alloca_simplifiable_2() {
329; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind
330; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_2
331; IS__TUNIT_OPM-SAME: () #[[ATTR2:[0-9]+]] {
332; IS__TUNIT_OPM-NEXT:  entry:
333; IS__TUNIT_OPM-NEXT:    [[BYTES:%.*]] = alloca [1024 x i8], align 16
334; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
335; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]])
336; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND:%.*]]
337; IS__TUNIT_OPM:       for.cond:
338; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
339; IS__TUNIT_OPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
340; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
341; IS__TUNIT_OPM:       for.cond.cleanup:
342; IS__TUNIT_OPM-NEXT:    br label [[FOR_END:%.*]]
343; IS__TUNIT_OPM:       for.body:
344; IS__TUNIT_OPM-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
345; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[I15]]
346; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC]]
347; IS__TUNIT_OPM:       for.inc:
348; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
349; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP15:![0-9]+]]
350; IS__TUNIT_OPM:       for.end:
351; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2:%.*]]
352; IS__TUNIT_OPM:       for.cond2:
353; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
354; IS__TUNIT_OPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
355; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
356; IS__TUNIT_OPM:       for.cond.cleanup4:
357; IS__TUNIT_OPM-NEXT:    br label [[FOR_END11:%.*]]
358; IS__TUNIT_OPM:       for.body5:
359; IS__TUNIT_OPM-NEXT:    [[I16:%.*]] = bitcast [1024 x i8]* [[BYTES]] to float*
360; IS__TUNIT_OPM-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
361; IS__TUNIT_OPM-NEXT:    [[I18:%.*]] = or i64 [[I17]], 1
362; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I16]], i64 [[I18]]
363; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC9]]
364; IS__TUNIT_OPM:       for.inc9:
365; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
366; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP17:![0-9]+]]
367; IS__TUNIT_OPM:       for.end11:
368; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND13:%.*]]
369; IS__TUNIT_OPM:       for.cond13:
370; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC22:%.*]] ], [ 0, [[FOR_END11]] ]
371; IS__TUNIT_OPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
372; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
373; IS__TUNIT_OPM:       for.cond.cleanup15:
374; IS__TUNIT_OPM-NEXT:    br label [[FOR_END24:%.*]]
375; IS__TUNIT_OPM:       for.body16:
376; IS__TUNIT_OPM-NEXT:    [[I19:%.*]] = bitcast [1024 x i8]* [[BYTES]] to i64*
377; IS__TUNIT_OPM-NEXT:    [[I20:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
378; IS__TUNIT_OPM-NEXT:    [[I21:%.*]] = add nuw nsw i64 [[I20]], 2
379; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX21:%.*]] = getelementptr inbounds i64, i64* [[I19]], i64 [[I21]]
380; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC22]]
381; IS__TUNIT_OPM:       for.inc22:
382; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
383; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP18:![0-9]+]]
384; IS__TUNIT_OPM:       for.end24:
385; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 1023
386; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500
387; IS__TUNIT_OPM-NEXT:    [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32*
388; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(524) [[I22]], i32 noundef 0) #[[ATTR6:[0-9]+]]
389; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND28:%.*]]
390; IS__TUNIT_OPM:       for.cond28:
391; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ]
392; IS__TUNIT_OPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
393; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY31:%.*]], label [[FOR_COND_CLEANUP30:%.*]]
394; IS__TUNIT_OPM:       for.cond.cleanup30:
395; IS__TUNIT_OPM-NEXT:    br label [[FOR_END38:%.*]]
396; IS__TUNIT_OPM:       for.body31:
397; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
398; IS__TUNIT_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX35]], align 1, !tbaa [[TBAA19:![0-9]+]]
399; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC36]]
400; IS__TUNIT_OPM:       for.inc36:
401; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
402; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND28]], !llvm.loop [[LOOP20:![0-9]+]]
403; IS__TUNIT_OPM:       for.end38:
404; IS__TUNIT_OPM-NEXT:    [[I24:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
405; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I24]])
406; IS__TUNIT_OPM-NEXT:    ret void
407;
408; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
409; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_2
410; IS__TUNIT_NPM-SAME: () #[[ATTR2:[0-9]+]] {
411; IS__TUNIT_NPM-NEXT:  entry:
412; IS__TUNIT_NPM-NEXT:    [[BYTES:%.*]] = alloca [1024 x i8], align 16
413; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
414; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]]) #[[ATTR7]]
415; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND:%.*]]
416; IS__TUNIT_NPM:       for.cond:
417; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
418; IS__TUNIT_NPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
419; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
420; IS__TUNIT_NPM:       for.cond.cleanup:
421; IS__TUNIT_NPM-NEXT:    br label [[FOR_END:%.*]]
422; IS__TUNIT_NPM:       for.body:
423; IS__TUNIT_NPM-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
424; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[I15]]
425; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC]]
426; IS__TUNIT_NPM:       for.inc:
427; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
428; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP15:![0-9]+]]
429; IS__TUNIT_NPM:       for.end:
430; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2:%.*]]
431; IS__TUNIT_NPM:       for.cond2:
432; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
433; IS__TUNIT_NPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
434; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
435; IS__TUNIT_NPM:       for.cond.cleanup4:
436; IS__TUNIT_NPM-NEXT:    br label [[FOR_END11:%.*]]
437; IS__TUNIT_NPM:       for.body5:
438; IS__TUNIT_NPM-NEXT:    [[I16:%.*]] = bitcast [1024 x i8]* [[BYTES]] to float*
439; IS__TUNIT_NPM-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
440; IS__TUNIT_NPM-NEXT:    [[I18:%.*]] = or i64 [[I17]], 1
441; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I16]], i64 [[I18]]
442; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC9]]
443; IS__TUNIT_NPM:       for.inc9:
444; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
445; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP17:![0-9]+]]
446; IS__TUNIT_NPM:       for.end11:
447; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND13:%.*]]
448; IS__TUNIT_NPM:       for.cond13:
449; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC22:%.*]] ], [ 0, [[FOR_END11]] ]
450; IS__TUNIT_NPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
451; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
452; IS__TUNIT_NPM:       for.cond.cleanup15:
453; IS__TUNIT_NPM-NEXT:    br label [[FOR_END24:%.*]]
454; IS__TUNIT_NPM:       for.body16:
455; IS__TUNIT_NPM-NEXT:    [[I19:%.*]] = bitcast [1024 x i8]* [[BYTES]] to i64*
456; IS__TUNIT_NPM-NEXT:    [[I20:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
457; IS__TUNIT_NPM-NEXT:    [[I21:%.*]] = add nuw nsw i64 [[I20]], 2
458; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX21:%.*]] = getelementptr inbounds i64, i64* [[I19]], i64 [[I21]]
459; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC22]]
460; IS__TUNIT_NPM:       for.inc22:
461; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
462; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP18:![0-9]+]]
463; IS__TUNIT_NPM:       for.end24:
464; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 1023
465; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500
466; IS__TUNIT_NPM-NEXT:    [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32*
467; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(524) [[I22]], i32 noundef 0) #[[ATTR4]]
468; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND28:%.*]]
469; IS__TUNIT_NPM:       for.cond28:
470; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ]
471; IS__TUNIT_NPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
472; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY31:%.*]], label [[FOR_COND_CLEANUP30:%.*]]
473; IS__TUNIT_NPM:       for.cond.cleanup30:
474; IS__TUNIT_NPM-NEXT:    br label [[FOR_END38:%.*]]
475; IS__TUNIT_NPM:       for.body31:
476; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
477; IS__TUNIT_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX35]], align 1, !tbaa [[TBAA19:![0-9]+]]
478; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC36]]
479; IS__TUNIT_NPM:       for.inc36:
480; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
481; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND28]], !llvm.loop [[LOOP20:![0-9]+]]
482; IS__TUNIT_NPM:       for.end38:
483; IS__TUNIT_NPM-NEXT:    [[I24:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
484; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I24]]) #[[ATTR7]]
485; IS__TUNIT_NPM-NEXT:    ret void
486;
487; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_2() {
488; IS__CGSCC_OPM-NEXT:  entry:
489; IS__CGSCC_OPM-NEXT:    [[BYTES:%.*]] = alloca [1024 x i8], align 16
490; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
491; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]])
492; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND:%.*]]
493; IS__CGSCC_OPM:       for.cond:
494; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
495; IS__CGSCC_OPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
496; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
497; IS__CGSCC_OPM:       for.cond.cleanup:
498; IS__CGSCC_OPM-NEXT:    br label [[FOR_END:%.*]]
499; IS__CGSCC_OPM:       for.body:
500; IS__CGSCC_OPM-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
501; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[I15]]
502; IS__CGSCC_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15:![0-9]+]]
503; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC]]
504; IS__CGSCC_OPM:       for.inc:
505; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
506; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP16:![0-9]+]]
507; IS__CGSCC_OPM:       for.end:
508; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND2:%.*]]
509; IS__CGSCC_OPM:       for.cond2:
510; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
511; IS__CGSCC_OPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
512; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
513; IS__CGSCC_OPM:       for.cond.cleanup4:
514; IS__CGSCC_OPM-NEXT:    br label [[FOR_END11:%.*]]
515; IS__CGSCC_OPM:       for.body5:
516; IS__CGSCC_OPM-NEXT:    [[I16:%.*]] = bitcast [1024 x i8]* [[BYTES]] to float*
517; IS__CGSCC_OPM-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
518; IS__CGSCC_OPM-NEXT:    [[I18:%.*]] = or i64 [[I17]], 1
519; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I16]], i64 [[I18]]
520; IS__CGSCC_OPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18:![0-9]+]]
521; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC9]]
522; IS__CGSCC_OPM:       for.inc9:
523; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
524; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP19:![0-9]+]]
525; IS__CGSCC_OPM:       for.end11:
526; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND13:%.*]]
527; IS__CGSCC_OPM:       for.cond13:
528; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC22:%.*]] ], [ 0, [[FOR_END11]] ]
529; IS__CGSCC_OPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
530; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
531; IS__CGSCC_OPM:       for.cond.cleanup15:
532; IS__CGSCC_OPM-NEXT:    br label [[FOR_END24:%.*]]
533; IS__CGSCC_OPM:       for.body16:
534; IS__CGSCC_OPM-NEXT:    [[I19:%.*]] = bitcast [1024 x i8]* [[BYTES]] to i64*
535; IS__CGSCC_OPM-NEXT:    [[I20:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
536; IS__CGSCC_OPM-NEXT:    [[I21:%.*]] = add nuw nsw i64 [[I20]], 2
537; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX21:%.*]] = getelementptr inbounds i64, i64* [[I19]], i64 [[I21]]
538; IS__CGSCC_OPM-NEXT:    store i64 0, i64* [[ARRAYIDX21]], align 16, !tbaa [[TBAA20:![0-9]+]]
539; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC22]]
540; IS__CGSCC_OPM:       for.inc22:
541; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
542; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP22:![0-9]+]]
543; IS__CGSCC_OPM:       for.end24:
544; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 1023
545; IS__CGSCC_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX25]], align 1, !tbaa [[TBAA15]]
546; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500
547; IS__CGSCC_OPM-NEXT:    [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32*
548; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I22]], i32 noundef 0) #[[ATTR13:[0-9]+]]
549; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND28:%.*]]
550; IS__CGSCC_OPM:       for.cond28:
551; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ]
552; IS__CGSCC_OPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
553; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY31:%.*]], label [[FOR_COND_CLEANUP30:%.*]]
554; IS__CGSCC_OPM:       for.cond.cleanup30:
555; IS__CGSCC_OPM-NEXT:    br label [[FOR_END38:%.*]]
556; IS__CGSCC_OPM:       for.body31:
557; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX33:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[INDVARS_IV12]]
558; IS__CGSCC_OPM-NEXT:    [[I23:%.*]] = load i8, i8* [[ARRAYIDX33]], align 1, !tbaa [[TBAA15]]
559; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
560; IS__CGSCC_OPM-NEXT:    store i8 [[I23]], i8* [[ARRAYIDX35]], align 1, !tbaa [[TBAA15]]
561; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC36]]
562; IS__CGSCC_OPM:       for.inc36:
563; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
564; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND28]], !llvm.loop [[LOOP23:![0-9]+]]
565; IS__CGSCC_OPM:       for.end38:
566; IS__CGSCC_OPM-NEXT:    [[I24:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
567; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nofree noundef nonnull [[I24]])
568; IS__CGSCC_OPM-NEXT:    ret void
569;
570; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_2() {
571; IS__CGSCC_NPM-NEXT:  entry:
572; IS__CGSCC_NPM-NEXT:    [[BYTES:%.*]] = alloca [1024 x i8], align 16
573; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
574; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]]) #[[ATTR9]]
575; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND:%.*]]
576; IS__CGSCC_NPM:       for.cond:
577; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
578; IS__CGSCC_NPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
579; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
580; IS__CGSCC_NPM:       for.cond.cleanup:
581; IS__CGSCC_NPM-NEXT:    br label [[FOR_END:%.*]]
582; IS__CGSCC_NPM:       for.body:
583; IS__CGSCC_NPM-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
584; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[I15]]
585; IS__CGSCC_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15:![0-9]+]]
586; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC]]
587; IS__CGSCC_NPM:       for.inc:
588; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
589; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP16:![0-9]+]]
590; IS__CGSCC_NPM:       for.end:
591; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND2:%.*]]
592; IS__CGSCC_NPM:       for.cond2:
593; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
594; IS__CGSCC_NPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
595; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
596; IS__CGSCC_NPM:       for.cond.cleanup4:
597; IS__CGSCC_NPM-NEXT:    br label [[FOR_END11:%.*]]
598; IS__CGSCC_NPM:       for.body5:
599; IS__CGSCC_NPM-NEXT:    [[I16:%.*]] = bitcast [1024 x i8]* [[BYTES]] to float*
600; IS__CGSCC_NPM-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
601; IS__CGSCC_NPM-NEXT:    [[I18:%.*]] = or i64 [[I17]], 1
602; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I16]], i64 [[I18]]
603; IS__CGSCC_NPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18:![0-9]+]]
604; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC9]]
605; IS__CGSCC_NPM:       for.inc9:
606; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
607; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP19:![0-9]+]]
608; IS__CGSCC_NPM:       for.end11:
609; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND13:%.*]]
610; IS__CGSCC_NPM:       for.cond13:
611; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC22:%.*]] ], [ 0, [[FOR_END11]] ]
612; IS__CGSCC_NPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
613; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
614; IS__CGSCC_NPM:       for.cond.cleanup15:
615; IS__CGSCC_NPM-NEXT:    br label [[FOR_END24:%.*]]
616; IS__CGSCC_NPM:       for.body16:
617; IS__CGSCC_NPM-NEXT:    [[I19:%.*]] = bitcast [1024 x i8]* [[BYTES]] to i64*
618; IS__CGSCC_NPM-NEXT:    [[I20:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
619; IS__CGSCC_NPM-NEXT:    [[I21:%.*]] = add nuw nsw i64 [[I20]], 2
620; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX21:%.*]] = getelementptr inbounds i64, i64* [[I19]], i64 [[I21]]
621; IS__CGSCC_NPM-NEXT:    store i64 0, i64* [[ARRAYIDX21]], align 16, !tbaa [[TBAA20:![0-9]+]]
622; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC22]]
623; IS__CGSCC_NPM:       for.inc22:
624; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
625; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP22:![0-9]+]]
626; IS__CGSCC_NPM:       for.end24:
627; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 1023
628; IS__CGSCC_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX25]], align 1, !tbaa [[TBAA15]]
629; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500
630; IS__CGSCC_NPM-NEXT:    [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32*
631; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I22]], i32 noundef 0) #[[ATTR11:[0-9]+]]
632; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND28:%.*]]
633; IS__CGSCC_NPM:       for.cond28:
634; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ]
635; IS__CGSCC_NPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
636; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY31:%.*]], label [[FOR_COND_CLEANUP30:%.*]]
637; IS__CGSCC_NPM:       for.cond.cleanup30:
638; IS__CGSCC_NPM-NEXT:    br label [[FOR_END38:%.*]]
639; IS__CGSCC_NPM:       for.body31:
640; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX33:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[INDVARS_IV12]]
641; IS__CGSCC_NPM-NEXT:    [[I23:%.*]] = load i8, i8* [[ARRAYIDX33]], align 1, !tbaa [[TBAA15]]
642; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
643; IS__CGSCC_NPM-NEXT:    store i8 [[I23]], i8* [[ARRAYIDX35]], align 1, !tbaa [[TBAA15]]
644; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC36]]
645; IS__CGSCC_NPM:       for.inc36:
646; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
647; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND28]], !llvm.loop [[LOOP23:![0-9]+]]
648; IS__CGSCC_NPM:       for.end38:
649; IS__CGSCC_NPM-NEXT:    [[I24:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
650; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nofree noundef nonnull [[I24]])
651; IS__CGSCC_NPM-NEXT:    ret void
652;
653entry:
654  %Bytes = alloca [1024 x i8], align 16
655  %i = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 0
656  call void @llvm.lifetime.start.p0i8(i64 1024, i8* nonnull %i)
657  br label %for.cond
658
659for.cond:                                         ; preds = %for.inc, %entry
660  %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
661  %exitcond = icmp ne i64 %indvars.iv, 100
662  br i1 %exitcond, label %for.body, label %for.cond.cleanup
663
664for.cond.cleanup:                                 ; preds = %for.cond
665  br label %for.end
666
667for.body:                                         ; preds = %for.cond
668  %i15 = mul nuw nsw i64 %indvars.iv, 10
669  %arrayidx = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 %i15
670  store i8 0, i8* %arrayidx, align 2, !tbaa !15
671  br label %for.inc
672
673for.inc:                                          ; preds = %for.body
674  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
675  br label %for.cond, !llvm.loop !16
676
677for.end:                                          ; preds = %for.cond.cleanup
678  br label %for.cond2
679
680for.cond2:                                        ; preds = %for.inc9, %for.end
681  %indvars.iv2 = phi i64 [ %indvars.iv.next3, %for.inc9 ], [ 0, %for.end ]
682  %exitcond6 = icmp ne i64 %indvars.iv2, 10
683  br i1 %exitcond6, label %for.body5, label %for.cond.cleanup4
684
685for.cond.cleanup4:                                ; preds = %for.cond2
686  br label %for.end11
687
688for.body5:                                        ; preds = %for.cond2
689  %i16 = bitcast [1024 x i8]* %Bytes to float*
690  %i17 = mul nuw nsw i64 %indvars.iv2, 10
691  %i18 = or i64 %i17, 1
692  %arrayidx8 = getelementptr inbounds float, float* %i16, i64 %i18
693  store float 0.000000e+00, float* %arrayidx8, align 4, !tbaa !18
694  br label %for.inc9
695
696for.inc9:                                         ; preds = %for.body5
697  %indvars.iv.next3 = add nuw nsw i64 %indvars.iv2, 1
698  br label %for.cond2, !llvm.loop !19
699
700for.end11:                                        ; preds = %for.cond.cleanup4
701  br label %for.cond13
702
703for.cond13:                                       ; preds = %for.inc22, %for.end11
704  %indvars.iv7 = phi i64 [ %indvars.iv.next8, %for.inc22 ], [ 0, %for.end11 ]
705  %exitcond11 = icmp ne i64 %indvars.iv7, 20
706  br i1 %exitcond11, label %for.body16, label %for.cond.cleanup15
707
708for.cond.cleanup15:                               ; preds = %for.cond13
709  br label %for.end24
710
711for.body16:                                       ; preds = %for.cond13
712  %i19 = bitcast [1024 x i8]* %Bytes to i64*
713  %i20 = mul nuw nsw i64 %indvars.iv7, 10
714  %i21 = add nuw nsw i64 %i20, 2
715  %arrayidx21 = getelementptr inbounds i64, i64* %i19, i64 %i21
716  store i64 0, i64* %arrayidx21, align 16, !tbaa !20
717  br label %for.inc22
718
719for.inc22:                                        ; preds = %for.body16
720  %indvars.iv.next8 = add nuw nsw i64 %indvars.iv7, 1
721  br label %for.cond13, !llvm.loop !22
722
723for.end24:                                        ; preds = %for.cond.cleanup15
724  %arrayidx25 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 1023
725  store i8 0, i8* %arrayidx25, align 1, !tbaa !15
726  %arrayidx26 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 500
727  %i22 = bitcast i8* %arrayidx26 to i32*
728  call void @write_arg(i32* nonnull %i22, i32 0)
729  br label %for.cond28
730
731for.cond28:                                       ; preds = %for.inc36, %for.end24
732  %indvars.iv12 = phi i64 [ %indvars.iv.next13, %for.inc36 ], [ 0, %for.end24 ]
733  %exitcond14 = icmp ne i64 %indvars.iv12, 1024
734  br i1 %exitcond14, label %for.body31, label %for.cond.cleanup30
735
736for.cond.cleanup30:                               ; preds = %for.cond28
737  br label %for.end38
738
739for.body31:                                       ; preds = %for.cond28
740  %arrayidx33 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 %indvars.iv12
741  %i23 = load i8, i8* %arrayidx33, align 1, !tbaa !15
742  %arrayidx35 = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 %indvars.iv12
743  store i8 %i23, i8* %arrayidx35, align 1, !tbaa !15
744  br label %for.inc36
745
746for.inc36:                                        ; preds = %for.body31
747  %indvars.iv.next13 = add nuw nsw i64 %indvars.iv12, 1
748  br label %for.cond28, !llvm.loop !23
749
750for.end38:                                        ; preds = %for.cond.cleanup30
751  %i24 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 0
752  call void @llvm.lifetime.end.p0i8(i64 1024, i8* nonnull %i24)
753  ret void
754}
755
756;    int local_alloca_simplifiable_3() {
757;      int A = 1;
758;      // split
759;      A = 2;
760;      return A;
761;    }
762;
763define i32 @local_alloca_simplifiable_3() {
764; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
765; IS__TUNIT____-LABEL: define {{[^@]+}}@local_alloca_simplifiable_3
766; IS__TUNIT____-SAME: () #[[ATTR3:[0-9]+]] {
767; IS__TUNIT____-NEXT:    [[A:%.*]] = alloca i32, align 4
768; IS__TUNIT____-NEXT:    store i32 1, i32* [[A]], align 4
769; IS__TUNIT____-NEXT:    br label [[SPLIT:%.*]]
770; IS__TUNIT____:       split:
771; IS__TUNIT____-NEXT:    store i32 2, i32* [[A]], align 4
772; IS__TUNIT____-NEXT:    [[L:%.*]] = load i32, i32* [[A]], align 4
773; IS__TUNIT____-NEXT:    ret i32 [[L]]
774;
775; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
776; IS__CGSCC____-LABEL: define {{[^@]+}}@local_alloca_simplifiable_3
777; IS__CGSCC____-SAME: () #[[ATTR2:[0-9]+]] {
778; IS__CGSCC____-NEXT:    [[A:%.*]] = alloca i32, align 4
779; IS__CGSCC____-NEXT:    store i32 1, i32* [[A]], align 4
780; IS__CGSCC____-NEXT:    br label [[SPLIT:%.*]]
781; IS__CGSCC____:       split:
782; IS__CGSCC____-NEXT:    store i32 2, i32* [[A]], align 4
783; IS__CGSCC____-NEXT:    [[L:%.*]] = load i32, i32* [[A]], align 4
784; IS__CGSCC____-NEXT:    ret i32 [[L]]
785;
786  %A = alloca i32, align 4
787  store i32 1, i32* %A
788  br label %split
789split:
790  store i32 2, i32* %A
791  %l = load i32, i32* %A, align 4
792  ret i32 %l
793}
794;    int local_alloca_simplifiable_4() {
795;      int A;
796;      return A;
797;    }
798;
799define i32 @local_alloca_simplifiable_4() {
800; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
801; IS__TUNIT____-LABEL: define {{[^@]+}}@local_alloca_simplifiable_4
802; IS__TUNIT____-SAME: () #[[ATTR3]] {
803; IS__TUNIT____-NEXT:    ret i32 undef
804;
805; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
806; IS__CGSCC____-LABEL: define {{[^@]+}}@local_alloca_simplifiable_4
807; IS__CGSCC____-SAME: () #[[ATTR2]] {
808; IS__CGSCC____-NEXT:    ret i32 undef
809;
810  %A = alloca i32, align 4
811  %l = load i32, i32* %A, align 4
812  ret i32 %l
813}
814
815;    static int GI1 __attribute__((loader_uninitialized));
816;    int multi_obj_simplifiable_1(int cnd) {
817;      int L = GI1 = 5;
818;      int *p = cnd ? &GI1 : &L;
819;      return *p;
820;    }
821define i32 @multi_obj_simplifiable_1(i32 %cnd) {
822; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn
823; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1
824; IS__TUNIT_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR4:[0-9]+]] {
825; IS__TUNIT_OPM-NEXT:  entry:
826; IS__TUNIT_OPM-NEXT:    [[L:%.*]] = alloca i32, align 4
827; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = bitcast i32* [[L]] to i8*
828; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR9]]
829; IS__TUNIT_OPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
830; IS__TUNIT_OPM-NEXT:    br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
831; IS__TUNIT_OPM:       cond.true:
832; IS__TUNIT_OPM-NEXT:    br label [[COND_END:%.*]]
833; IS__TUNIT_OPM:       cond.false:
834; IS__TUNIT_OPM-NEXT:    br label [[COND_END]]
835; IS__TUNIT_OPM:       cond.end:
836; IS__TUNIT_OPM-NEXT:    [[I2:%.*]] = bitcast i32* [[L]] to i8*
837; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR9]]
838; IS__TUNIT_OPM-NEXT:    ret i32 5
839;
840; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
841; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1
842; IS__TUNIT_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR2]] {
843; IS__TUNIT_NPM-NEXT:  entry:
844; IS__TUNIT_NPM-NEXT:    [[L:%.*]] = alloca i32, align 4
845; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = bitcast i32* [[L]] to i8*
846; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR7]]
847; IS__TUNIT_NPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
848; IS__TUNIT_NPM-NEXT:    br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
849; IS__TUNIT_NPM:       cond.true:
850; IS__TUNIT_NPM-NEXT:    br label [[COND_END:%.*]]
851; IS__TUNIT_NPM:       cond.false:
852; IS__TUNIT_NPM-NEXT:    br label [[COND_END]]
853; IS__TUNIT_NPM:       cond.end:
854; IS__TUNIT_NPM-NEXT:    [[I2:%.*]] = bitcast i32* [[L]] to i8*
855; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR7]]
856; IS__TUNIT_NPM-NEXT:    ret i32 5
857;
858; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind willreturn
859; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1
860; IS__CGSCC_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR3:[0-9]+]] {
861; IS__CGSCC_OPM-NEXT:  entry:
862; IS__CGSCC_OPM-NEXT:    [[L:%.*]] = alloca i32, align 4
863; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = bitcast i32* [[L]] to i8*
864; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR11]]
865; IS__CGSCC_OPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
866; IS__CGSCC_OPM-NEXT:    br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
867; IS__CGSCC_OPM:       cond.true:
868; IS__CGSCC_OPM-NEXT:    br label [[COND_END:%.*]]
869; IS__CGSCC_OPM:       cond.false:
870; IS__CGSCC_OPM-NEXT:    br label [[COND_END]]
871; IS__CGSCC_OPM:       cond.end:
872; IS__CGSCC_OPM-NEXT:    [[I2:%.*]] = bitcast i32* [[L]] to i8*
873; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR11]]
874; IS__CGSCC_OPM-NEXT:    ret i32 5
875;
876; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
877; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1
878; IS__CGSCC_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR3:[0-9]+]] {
879; IS__CGSCC_NPM-NEXT:  entry:
880; IS__CGSCC_NPM-NEXT:    [[L:%.*]] = alloca i32, align 4
881; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = bitcast i32* [[L]] to i8*
882; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR9]]
883; IS__CGSCC_NPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
884; IS__CGSCC_NPM-NEXT:    br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
885; IS__CGSCC_NPM:       cond.true:
886; IS__CGSCC_NPM-NEXT:    br label [[COND_END:%.*]]
887; IS__CGSCC_NPM:       cond.false:
888; IS__CGSCC_NPM-NEXT:    br label [[COND_END]]
889; IS__CGSCC_NPM:       cond.end:
890; IS__CGSCC_NPM-NEXT:    [[I2:%.*]] = bitcast i32* [[L]] to i8*
891; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR9]]
892; IS__CGSCC_NPM-NEXT:    ret i32 5
893;
894entry:
895  %L = alloca i32, align 4
896  %i = bitcast i32* %L to i8*
897  call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %i)
898  store i32 5, i32* @GI1, align 4, !tbaa !3
899  store i32 5, i32* %L, align 4, !tbaa !3
900  %tobool.not = icmp eq i32 %cnd, 0
901  br i1 %tobool.not, label %cond.false, label %cond.true
902
903cond.true:                                        ; preds = %entry
904  br label %cond.end
905
906cond.false:                                       ; preds = %entry
907  br label %cond.end
908
909cond.end:                                         ; preds = %cond.false, %cond.true
910  %cond = phi i32* [ @GI1, %cond.true ], [ %L, %cond.false ]
911  %i1 = load i32, i32* %cond, align 4, !tbaa !3
912  %i2 = bitcast i32* %L to i8*
913  call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %i2)
914  ret i32 %i1
915}
916
917;    static int GI2 __attribute__((loader_uninitialized));
918;    int multi_obj_simplifiable_2(int cnd) {
919;      int L;
920;      int *p = cnd ? &GI2 : &L;
921;      *p = 5;
922;      return *p;
923;    }
924;
925define i32 @multi_obj_simplifiable_2(i32 %cnd) {
926; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn
927; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2
928; IS__TUNIT_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR4]] {
929; IS__TUNIT_OPM-NEXT:  entry:
930; IS__TUNIT_OPM-NEXT:    [[L:%.*]] = alloca i32, align 4
931; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = bitcast i32* [[L]] to i8*
932; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR9]]
933; IS__TUNIT_OPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
934; IS__TUNIT_OPM-NEXT:    br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
935; IS__TUNIT_OPM:       cond.true:
936; IS__TUNIT_OPM-NEXT:    br label [[COND_END:%.*]]
937; IS__TUNIT_OPM:       cond.false:
938; IS__TUNIT_OPM-NEXT:    br label [[COND_END]]
939; IS__TUNIT_OPM:       cond.end:
940; IS__TUNIT_OPM-NEXT:    [[I1:%.*]] = bitcast i32* [[L]] to i8*
941; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR9]]
942; IS__TUNIT_OPM-NEXT:    ret i32 5
943;
944; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
945; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2
946; IS__TUNIT_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR2]] {
947; IS__TUNIT_NPM-NEXT:  entry:
948; IS__TUNIT_NPM-NEXT:    [[L:%.*]] = alloca i32, align 4
949; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = bitcast i32* [[L]] to i8*
950; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR7]]
951; IS__TUNIT_NPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
952; IS__TUNIT_NPM-NEXT:    br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
953; IS__TUNIT_NPM:       cond.true:
954; IS__TUNIT_NPM-NEXT:    br label [[COND_END:%.*]]
955; IS__TUNIT_NPM:       cond.false:
956; IS__TUNIT_NPM-NEXT:    br label [[COND_END]]
957; IS__TUNIT_NPM:       cond.end:
958; IS__TUNIT_NPM-NEXT:    [[I1:%.*]] = bitcast i32* [[L]] to i8*
959; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR7]]
960; IS__TUNIT_NPM-NEXT:    ret i32 5
961;
962; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind willreturn
963; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2
964; IS__CGSCC_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR3]] {
965; IS__CGSCC_OPM-NEXT:  entry:
966; IS__CGSCC_OPM-NEXT:    [[L:%.*]] = alloca i32, align 4
967; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = bitcast i32* [[L]] to i8*
968; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR11]]
969; IS__CGSCC_OPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
970; IS__CGSCC_OPM-NEXT:    br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
971; IS__CGSCC_OPM:       cond.true:
972; IS__CGSCC_OPM-NEXT:    br label [[COND_END:%.*]]
973; IS__CGSCC_OPM:       cond.false:
974; IS__CGSCC_OPM-NEXT:    br label [[COND_END]]
975; IS__CGSCC_OPM:       cond.end:
976; IS__CGSCC_OPM-NEXT:    [[I1:%.*]] = bitcast i32* [[L]] to i8*
977; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR11]]
978; IS__CGSCC_OPM-NEXT:    ret i32 5
979;
980; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
981; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2
982; IS__CGSCC_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR3]] {
983; IS__CGSCC_NPM-NEXT:  entry:
984; IS__CGSCC_NPM-NEXT:    [[L:%.*]] = alloca i32, align 4
985; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = bitcast i32* [[L]] to i8*
986; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR9]]
987; IS__CGSCC_NPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
988; IS__CGSCC_NPM-NEXT:    br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
989; IS__CGSCC_NPM:       cond.true:
990; IS__CGSCC_NPM-NEXT:    br label [[COND_END:%.*]]
991; IS__CGSCC_NPM:       cond.false:
992; IS__CGSCC_NPM-NEXT:    br label [[COND_END]]
993; IS__CGSCC_NPM:       cond.end:
994; IS__CGSCC_NPM-NEXT:    [[I1:%.*]] = bitcast i32* [[L]] to i8*
995; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR9]]
996; IS__CGSCC_NPM-NEXT:    ret i32 5
997;
998entry:
999  %L = alloca i32, align 4
1000  %i = bitcast i32* %L to i8*
1001  call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %i)
1002  %tobool.not = icmp eq i32 %cnd, 0
1003  br i1 %tobool.not, label %cond.false, label %cond.true
1004
1005cond.true:                                        ; preds = %entry
1006  br label %cond.end
1007
1008cond.false:                                       ; preds = %entry
1009  br label %cond.end
1010
1011cond.end:                                         ; preds = %cond.false, %cond.true
1012  %cond = phi i32* [ @GI2, %cond.true ], [ %L, %cond.false ]
1013  store i32 5, i32* %cond, align 4, !tbaa !3
1014  %i1 = bitcast i32* %L to i8*
1015  %l = load i32, i32* %cond, align 4, !tbaa !3
1016  call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %i1)
1017  ret i32 %l
1018}
1019
1020;    static struct S Gs __attribute__((loader_uninitialized));
1021;    struct S static_global_simplifiable_1(void) {
1022;      Gs.f1 = 1.1;
1023;      Gs.f2 = 2.2;
1024;      Gs.f3 = 3.3;
1025;      write_arg(&Gs.i1, 1);
1026;      write_arg(&Gs.i2, 2);
1027;      write_arg(&Gs.i3, 3);
1028;      struct S r;
1029;      r.f1 = Gs.f1;
1030;      r.f2 = Gs.f2 * 2;
1031;      r.f3 = Gs.f3 + Gs.f1;
1032;      r.i1 = Gs.i1;
1033;      r.i2 = Gs.i2 * 2;
1034;      r.i3 = Gs.i3 + Gs.i1;
1035;      return r;
1036;    }
1037;
1038define void @static_global_simplifiable_1(%struct.S* noalias sret(%struct.S) align 4 %agg.result) {
1039; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn writeonly
1040; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@static_global_simplifiable_1
1041; IS__TUNIT_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR5]] {
1042; IS__TUNIT_OPM-NEXT:  entry:
1043; 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]]
1044; 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]]
1045; 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]]
1046; IS__TUNIT_OPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
1047; IS__TUNIT_OPM-NEXT:    store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
1048; IS__TUNIT_OPM-NEXT:    [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00
1049; IS__TUNIT_OPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
1050; IS__TUNIT_OPM-NEXT:    store float [[MUL]], float* [[F2]], align 4, !tbaa [[TBAA10]]
1051; IS__TUNIT_OPM-NEXT:    [[ADD:%.*]] = fadd float 0x400A666660000000, 0x3FF19999A0000000
1052; IS__TUNIT_OPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
1053; IS__TUNIT_OPM-NEXT:    store float [[ADD]], float* [[F3]], align 4, !tbaa [[TBAA11]]
1054; IS__TUNIT_OPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
1055; IS__TUNIT_OPM-NEXT:    store i32 1, i32* [[I1]], align 4, !tbaa [[TBAA12]]
1056; IS__TUNIT_OPM-NEXT:    [[MUL1:%.*]] = shl nsw i32 2, 1
1057; IS__TUNIT_OPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
1058; IS__TUNIT_OPM-NEXT:    store i32 [[MUL1]], i32* [[I2]], align 4, !tbaa [[TBAA13]]
1059; IS__TUNIT_OPM-NEXT:    [[ADD2:%.*]] = add nsw i32 3, 1
1060; IS__TUNIT_OPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
1061; IS__TUNIT_OPM-NEXT:    store i32 [[ADD2]], i32* [[I3]], align 4, !tbaa [[TBAA14]]
1062; IS__TUNIT_OPM-NEXT:    ret void
1063;
1064; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly
1065; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_1
1066; IS__TUNIT_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR4]] {
1067; IS__TUNIT_NPM-NEXT:  entry:
1068; 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]]
1069; 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]]
1070; 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]]
1071; IS__TUNIT_NPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
1072; IS__TUNIT_NPM-NEXT:    store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
1073; IS__TUNIT_NPM-NEXT:    [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00
1074; IS__TUNIT_NPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
1075; IS__TUNIT_NPM-NEXT:    store float [[MUL]], float* [[F2]], align 4, !tbaa [[TBAA10]]
1076; IS__TUNIT_NPM-NEXT:    [[ADD:%.*]] = fadd float 0x400A666660000000, 0x3FF19999A0000000
1077; IS__TUNIT_NPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
1078; IS__TUNIT_NPM-NEXT:    store float [[ADD]], float* [[F3]], align 4, !tbaa [[TBAA11]]
1079; IS__TUNIT_NPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
1080; IS__TUNIT_NPM-NEXT:    store i32 1, i32* [[I1]], align 4, !tbaa [[TBAA12]]
1081; IS__TUNIT_NPM-NEXT:    [[MUL1:%.*]] = shl nsw i32 2, 1
1082; IS__TUNIT_NPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
1083; IS__TUNIT_NPM-NEXT:    store i32 [[MUL1]], i32* [[I2]], align 4, !tbaa [[TBAA13]]
1084; IS__TUNIT_NPM-NEXT:    [[ADD2:%.*]] = add nsw i32 3, 1
1085; IS__TUNIT_NPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
1086; IS__TUNIT_NPM-NEXT:    store i32 [[ADD2]], i32* [[I3]], align 4, !tbaa [[TBAA14]]
1087; IS__TUNIT_NPM-NEXT:    ret void
1088;
1089; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
1090; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@static_global_simplifiable_1
1091; IS__CGSCC_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR4:[0-9]+]] {
1092; IS__CGSCC_OPM-NEXT:  entry:
1093; IS__CGSCC_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) #[[ATTR12]]
1094; IS__CGSCC_OPM-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) #[[ATTR12]]
1095; IS__CGSCC_OPM-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) #[[ATTR12]]
1096; IS__CGSCC_OPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
1097; IS__CGSCC_OPM-NEXT:    store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
1098; IS__CGSCC_OPM-NEXT:    [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00
1099; IS__CGSCC_OPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
1100; IS__CGSCC_OPM-NEXT:    store float [[MUL]], float* [[F2]], align 4, !tbaa [[TBAA10]]
1101; IS__CGSCC_OPM-NEXT:    [[ADD:%.*]] = fadd float 0x400A666660000000, 0x3FF19999A0000000
1102; IS__CGSCC_OPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
1103; IS__CGSCC_OPM-NEXT:    store float [[ADD]], float* [[F3]], align 4, !tbaa [[TBAA11]]
1104; IS__CGSCC_OPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
1105; IS__CGSCC_OPM-NEXT:    store i32 1, i32* [[I1]], align 4, !tbaa [[TBAA12]]
1106; IS__CGSCC_OPM-NEXT:    [[MUL1:%.*]] = shl nsw i32 2, 1
1107; IS__CGSCC_OPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
1108; IS__CGSCC_OPM-NEXT:    store i32 [[MUL1]], i32* [[I2]], align 4, !tbaa [[TBAA13]]
1109; IS__CGSCC_OPM-NEXT:    [[ADD2:%.*]] = add nsw i32 3, 1
1110; IS__CGSCC_OPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
1111; IS__CGSCC_OPM-NEXT:    store i32 [[ADD2]], i32* [[I3]], align 4, !tbaa [[TBAA14]]
1112; IS__CGSCC_OPM-NEXT:    ret void
1113;
1114; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
1115; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_1
1116; IS__CGSCC_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR4:[0-9]+]] {
1117; IS__CGSCC_NPM-NEXT:  entry:
1118; IS__CGSCC_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) #[[ATTR10]]
1119; IS__CGSCC_NPM-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) #[[ATTR10]]
1120; IS__CGSCC_NPM-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) #[[ATTR10]]
1121; IS__CGSCC_NPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
1122; IS__CGSCC_NPM-NEXT:    store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
1123; IS__CGSCC_NPM-NEXT:    [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00
1124; IS__CGSCC_NPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
1125; IS__CGSCC_NPM-NEXT:    store float [[MUL]], float* [[F2]], align 4, !tbaa [[TBAA10]]
1126; IS__CGSCC_NPM-NEXT:    [[ADD:%.*]] = fadd float 0x400A666660000000, 0x3FF19999A0000000
1127; IS__CGSCC_NPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
1128; IS__CGSCC_NPM-NEXT:    store float [[ADD]], float* [[F3]], align 4, !tbaa [[TBAA11]]
1129; IS__CGSCC_NPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
1130; IS__CGSCC_NPM-NEXT:    store i32 1, i32* [[I1]], align 4, !tbaa [[TBAA12]]
1131; IS__CGSCC_NPM-NEXT:    [[MUL1:%.*]] = shl nsw i32 2, 1
1132; IS__CGSCC_NPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
1133; IS__CGSCC_NPM-NEXT:    store i32 [[MUL1]], i32* [[I2]], align 4, !tbaa [[TBAA13]]
1134; IS__CGSCC_NPM-NEXT:    [[ADD2:%.*]] = add nsw i32 3, 1
1135; IS__CGSCC_NPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
1136; IS__CGSCC_NPM-NEXT:    store i32 [[ADD2]], i32* [[I3]], align 4, !tbaa [[TBAA14]]
1137; IS__CGSCC_NPM-NEXT:    ret void
1138;
1139entry:
1140  store float 0x3FF19999A0000000, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa !7
1141  store float 0x40019999A0000000, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 4), align 4, !tbaa !10
1142  store float 0x400A666660000000, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 5), align 4, !tbaa !11
1143  call void @write_arg(i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 0), i32 1)
1144  call void @write_arg(i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 1), i32 2)
1145  call void @write_arg(i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 2), i32 3)
1146  %i = load float, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa !7
1147  %f1 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 3
1148  store float %i, float* %f1, align 4, !tbaa !7
1149  %i4 = load float, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 4), align 4, !tbaa !10
1150  %mul = fmul float %i4, 2.000000e+00
1151  %f2 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 4
1152  store float %mul, float* %f2, align 4, !tbaa !10
1153  %i5 = load float, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 5), align 4, !tbaa !11
1154  %i6 = load float, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa !7
1155  %add = fadd float %i5, %i6
1156  %f3 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 5
1157  store float %add, float* %f3, align 4, !tbaa !11
1158  %i7 = load i32, i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 0), align 4, !tbaa !12
1159  %i1 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 0
1160  store i32 %i7, i32* %i1, align 4, !tbaa !12
1161  %i8 = load i32, i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 1), align 4, !tbaa !13
1162  %mul1 = shl nsw i32 %i8, 1
1163  %i2 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 1
1164  store i32 %mul1, i32* %i2, align 4, !tbaa !13
1165  %i9 = load i32, i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 2), align 4, !tbaa !14
1166  %i10 = load i32, i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 0), align 4, !tbaa !12
1167  %add2 = add nsw i32 %i9, %i10
1168  %i3 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 2
1169  store i32 %add2, i32* %i3, align 4, !tbaa !14
1170  ret void
1171}
1172
1173;    static char GBytes[1024];
1174;    void static_global_simplifiable_2(void) {
1175;      for (int i = 0; i < 100; ++i)
1176;        GBytes[i * 10] = 0;
1177;      for (int i = 0; i < 10; ++i)
1178;        ((float *)GBytes)[i * 10 + 1] = 0;
1179;      for (int i = 0; i < 20; ++i)
1180;        ((long long int *)GBytes)[i * 10 + 2] = 0;
1181;      GBytes[1023] = 0;
1182;      write_arg((int *)&GBytes[500], 0);
1183;      struct S R;
1184;      for (int i = 0; i < 1024; ++i)
1185;        globalBytes[i] = GBytes[i];
1186;    }
1187;
1188define void @static_global_simplifiable_2() {
1189; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind writeonly
1190; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@static_global_simplifiable_2
1191; IS__TUNIT_OPM-SAME: () #[[ATTR6]] {
1192; IS__TUNIT_OPM-NEXT:  entry:
1193; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND:%.*]]
1194; IS__TUNIT_OPM:       for.cond:
1195; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
1196; IS__TUNIT_OPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
1197; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
1198; IS__TUNIT_OPM:       for.cond.cleanup:
1199; IS__TUNIT_OPM-NEXT:    br label [[FOR_END:%.*]]
1200; IS__TUNIT_OPM:       for.body:
1201; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
1202; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[I]]
1203; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC]]
1204; IS__TUNIT_OPM:       for.inc:
1205; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
1206; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP21:![0-9]+]]
1207; IS__TUNIT_OPM:       for.end:
1208; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2:%.*]]
1209; IS__TUNIT_OPM:       for.cond2:
1210; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
1211; IS__TUNIT_OPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
1212; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
1213; IS__TUNIT_OPM:       for.cond.cleanup4:
1214; IS__TUNIT_OPM-NEXT:    br label [[FOR_END11:%.*]]
1215; IS__TUNIT_OPM:       for.body5:
1216; IS__TUNIT_OPM-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
1217; IS__TUNIT_OPM-NEXT:    [[I16:%.*]] = or i64 [[I15]], 1
1218; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 [[I16]]
1219; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC9]]
1220; IS__TUNIT_OPM:       for.inc9:
1221; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
1222; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP22:![0-9]+]]
1223; IS__TUNIT_OPM:       for.end11:
1224; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND13:%.*]]
1225; IS__TUNIT_OPM:       for.cond13:
1226; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
1227; IS__TUNIT_OPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
1228; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
1229; IS__TUNIT_OPM:       for.cond.cleanup15:
1230; IS__TUNIT_OPM-NEXT:    br label [[FOR_END23:%.*]]
1231; IS__TUNIT_OPM:       for.body16:
1232; IS__TUNIT_OPM-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
1233; IS__TUNIT_OPM-NEXT:    [[I18:%.*]] = add nuw nsw i64 [[I17]], 2
1234; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 [[I18]]
1235; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC21]]
1236; IS__TUNIT_OPM:       for.inc21:
1237; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
1238; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP23:![0-9]+]]
1239; IS__TUNIT_OPM:       for.end23:
1240; 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]]
1241; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND25:%.*]]
1242; IS__TUNIT_OPM:       for.cond25:
1243; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ]
1244; IS__TUNIT_OPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
1245; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY28:%.*]], label [[FOR_COND_CLEANUP27:%.*]]
1246; IS__TUNIT_OPM:       for.cond.cleanup27:
1247; IS__TUNIT_OPM-NEXT:    br label [[FOR_END35:%.*]]
1248; IS__TUNIT_OPM:       for.body28:
1249; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
1250; IS__TUNIT_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA19]]
1251; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC33]]
1252; IS__TUNIT_OPM:       for.inc33:
1253; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
1254; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND25]], !llvm.loop [[LOOP24:![0-9]+]]
1255; IS__TUNIT_OPM:       for.end35:
1256; IS__TUNIT_OPM-NEXT:    ret void
1257;
1258; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly
1259; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_2
1260; IS__TUNIT_NPM-SAME: () #[[ATTR4]] {
1261; IS__TUNIT_NPM-NEXT:  entry:
1262; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND:%.*]]
1263; IS__TUNIT_NPM:       for.cond:
1264; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
1265; IS__TUNIT_NPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
1266; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
1267; IS__TUNIT_NPM:       for.cond.cleanup:
1268; IS__TUNIT_NPM-NEXT:    br label [[FOR_END:%.*]]
1269; IS__TUNIT_NPM:       for.body:
1270; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
1271; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[I]]
1272; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC]]
1273; IS__TUNIT_NPM:       for.inc:
1274; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
1275; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP21:![0-9]+]]
1276; IS__TUNIT_NPM:       for.end:
1277; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2:%.*]]
1278; IS__TUNIT_NPM:       for.cond2:
1279; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
1280; IS__TUNIT_NPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
1281; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
1282; IS__TUNIT_NPM:       for.cond.cleanup4:
1283; IS__TUNIT_NPM-NEXT:    br label [[FOR_END11:%.*]]
1284; IS__TUNIT_NPM:       for.body5:
1285; IS__TUNIT_NPM-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
1286; IS__TUNIT_NPM-NEXT:    [[I16:%.*]] = or i64 [[I15]], 1
1287; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 [[I16]]
1288; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC9]]
1289; IS__TUNIT_NPM:       for.inc9:
1290; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
1291; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP22:![0-9]+]]
1292; IS__TUNIT_NPM:       for.end11:
1293; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND13:%.*]]
1294; IS__TUNIT_NPM:       for.cond13:
1295; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
1296; IS__TUNIT_NPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
1297; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
1298; IS__TUNIT_NPM:       for.cond.cleanup15:
1299; IS__TUNIT_NPM-NEXT:    br label [[FOR_END23:%.*]]
1300; IS__TUNIT_NPM:       for.body16:
1301; IS__TUNIT_NPM-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
1302; IS__TUNIT_NPM-NEXT:    [[I18:%.*]] = add nuw nsw i64 [[I17]], 2
1303; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 [[I18]]
1304; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC21]]
1305; IS__TUNIT_NPM:       for.inc21:
1306; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
1307; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP23:![0-9]+]]
1308; IS__TUNIT_NPM:       for.end23:
1309; 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]]
1310; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND25:%.*]]
1311; IS__TUNIT_NPM:       for.cond25:
1312; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ]
1313; IS__TUNIT_NPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
1314; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY28:%.*]], label [[FOR_COND_CLEANUP27:%.*]]
1315; IS__TUNIT_NPM:       for.cond.cleanup27:
1316; IS__TUNIT_NPM-NEXT:    br label [[FOR_END35:%.*]]
1317; IS__TUNIT_NPM:       for.body28:
1318; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
1319; IS__TUNIT_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA19]]
1320; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC33]]
1321; IS__TUNIT_NPM:       for.inc33:
1322; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
1323; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND25]], !llvm.loop [[LOOP24:![0-9]+]]
1324; IS__TUNIT_NPM:       for.end35:
1325; IS__TUNIT_NPM-NEXT:    ret void
1326;
1327; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@static_global_simplifiable_2() {
1328; IS__CGSCC_OPM-NEXT:  entry:
1329; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND:%.*]]
1330; IS__CGSCC_OPM:       for.cond:
1331; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
1332; IS__CGSCC_OPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
1333; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
1334; IS__CGSCC_OPM:       for.cond.cleanup:
1335; IS__CGSCC_OPM-NEXT:    br label [[FOR_END:%.*]]
1336; IS__CGSCC_OPM:       for.body:
1337; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
1338; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[I]]
1339; IS__CGSCC_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15]]
1340; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC]]
1341; IS__CGSCC_OPM:       for.inc:
1342; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
1343; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP24:![0-9]+]]
1344; IS__CGSCC_OPM:       for.end:
1345; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND2:%.*]]
1346; IS__CGSCC_OPM:       for.cond2:
1347; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
1348; IS__CGSCC_OPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
1349; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
1350; IS__CGSCC_OPM:       for.cond.cleanup4:
1351; IS__CGSCC_OPM-NEXT:    br label [[FOR_END11:%.*]]
1352; IS__CGSCC_OPM:       for.body5:
1353; IS__CGSCC_OPM-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
1354; IS__CGSCC_OPM-NEXT:    [[I16:%.*]] = or i64 [[I15]], 1
1355; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 [[I16]]
1356; IS__CGSCC_OPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]]
1357; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC9]]
1358; IS__CGSCC_OPM:       for.inc9:
1359; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
1360; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP25:![0-9]+]]
1361; IS__CGSCC_OPM:       for.end11:
1362; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND13:%.*]]
1363; IS__CGSCC_OPM:       for.cond13:
1364; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
1365; IS__CGSCC_OPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
1366; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
1367; IS__CGSCC_OPM:       for.cond.cleanup15:
1368; IS__CGSCC_OPM-NEXT:    br label [[FOR_END23:%.*]]
1369; IS__CGSCC_OPM:       for.body16:
1370; IS__CGSCC_OPM-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
1371; IS__CGSCC_OPM-NEXT:    [[I18:%.*]] = add nuw nsw i64 [[I17]], 2
1372; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 [[I18]]
1373; IS__CGSCC_OPM-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 16, !tbaa [[TBAA20]]
1374; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC21]]
1375; IS__CGSCC_OPM:       for.inc21:
1376; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
1377; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP26:![0-9]+]]
1378; IS__CGSCC_OPM:       for.end23:
1379; IS__CGSCC_OPM-NEXT:    store i8 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 1023), align 1, !tbaa [[TBAA15]]
1380; IS__CGSCC_OPM-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) #[[ATTR13]]
1381; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND25:%.*]]
1382; IS__CGSCC_OPM:       for.cond25:
1383; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ]
1384; IS__CGSCC_OPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
1385; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY28:%.*]], label [[FOR_COND_CLEANUP27:%.*]]
1386; IS__CGSCC_OPM:       for.cond.cleanup27:
1387; IS__CGSCC_OPM-NEXT:    br label [[FOR_END35:%.*]]
1388; IS__CGSCC_OPM:       for.body28:
1389; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX30:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[INDVARS_IV12]]
1390; IS__CGSCC_OPM-NEXT:    [[I19:%.*]] = load i8, i8* [[ARRAYIDX30]], align 1, !tbaa [[TBAA15]]
1391; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
1392; IS__CGSCC_OPM-NEXT:    store i8 [[I19]], i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]]
1393; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC33]]
1394; IS__CGSCC_OPM:       for.inc33:
1395; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
1396; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND25]], !llvm.loop [[LOOP27:![0-9]+]]
1397; IS__CGSCC_OPM:       for.end35:
1398; IS__CGSCC_OPM-NEXT:    ret void
1399;
1400; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_2() {
1401; IS__CGSCC_NPM-NEXT:  entry:
1402; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND:%.*]]
1403; IS__CGSCC_NPM:       for.cond:
1404; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
1405; IS__CGSCC_NPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
1406; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
1407; IS__CGSCC_NPM:       for.cond.cleanup:
1408; IS__CGSCC_NPM-NEXT:    br label [[FOR_END:%.*]]
1409; IS__CGSCC_NPM:       for.body:
1410; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
1411; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[I]]
1412; IS__CGSCC_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15]]
1413; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC]]
1414; IS__CGSCC_NPM:       for.inc:
1415; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
1416; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP24:![0-9]+]]
1417; IS__CGSCC_NPM:       for.end:
1418; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND2:%.*]]
1419; IS__CGSCC_NPM:       for.cond2:
1420; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
1421; IS__CGSCC_NPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
1422; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
1423; IS__CGSCC_NPM:       for.cond.cleanup4:
1424; IS__CGSCC_NPM-NEXT:    br label [[FOR_END11:%.*]]
1425; IS__CGSCC_NPM:       for.body5:
1426; IS__CGSCC_NPM-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
1427; IS__CGSCC_NPM-NEXT:    [[I16:%.*]] = or i64 [[I15]], 1
1428; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 [[I16]]
1429; IS__CGSCC_NPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]]
1430; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC9]]
1431; IS__CGSCC_NPM:       for.inc9:
1432; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
1433; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP25:![0-9]+]]
1434; IS__CGSCC_NPM:       for.end11:
1435; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND13:%.*]]
1436; IS__CGSCC_NPM:       for.cond13:
1437; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
1438; IS__CGSCC_NPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
1439; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
1440; IS__CGSCC_NPM:       for.cond.cleanup15:
1441; IS__CGSCC_NPM-NEXT:    br label [[FOR_END23:%.*]]
1442; IS__CGSCC_NPM:       for.body16:
1443; IS__CGSCC_NPM-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
1444; IS__CGSCC_NPM-NEXT:    [[I18:%.*]] = add nuw nsw i64 [[I17]], 2
1445; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 [[I18]]
1446; IS__CGSCC_NPM-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 16, !tbaa [[TBAA20]]
1447; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC21]]
1448; IS__CGSCC_NPM:       for.inc21:
1449; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
1450; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP26:![0-9]+]]
1451; IS__CGSCC_NPM:       for.end23:
1452; IS__CGSCC_NPM-NEXT:    store i8 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 1023), align 1, !tbaa [[TBAA15]]
1453; IS__CGSCC_NPM-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) #[[ATTR11]]
1454; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND25:%.*]]
1455; IS__CGSCC_NPM:       for.cond25:
1456; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ]
1457; IS__CGSCC_NPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
1458; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY28:%.*]], label [[FOR_COND_CLEANUP27:%.*]]
1459; IS__CGSCC_NPM:       for.cond.cleanup27:
1460; IS__CGSCC_NPM-NEXT:    br label [[FOR_END35:%.*]]
1461; IS__CGSCC_NPM:       for.body28:
1462; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX30:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[INDVARS_IV12]]
1463; IS__CGSCC_NPM-NEXT:    [[I19:%.*]] = load i8, i8* [[ARRAYIDX30]], align 1, !tbaa [[TBAA15]]
1464; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
1465; IS__CGSCC_NPM-NEXT:    store i8 [[I19]], i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]]
1466; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC33]]
1467; IS__CGSCC_NPM:       for.inc33:
1468; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
1469; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND25]], !llvm.loop [[LOOP27:![0-9]+]]
1470; IS__CGSCC_NPM:       for.end35:
1471; IS__CGSCC_NPM-NEXT:    ret void
1472;
1473entry:
1474  br label %for.cond
1475
1476for.cond:                                         ; preds = %for.inc, %entry
1477  %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
1478  %exitcond = icmp ne i64 %indvars.iv, 100
1479  br i1 %exitcond, label %for.body, label %for.cond.cleanup
1480
1481for.cond.cleanup:                                 ; preds = %for.cond
1482  br label %for.end
1483
1484for.body:                                         ; preds = %for.cond
1485  %i = mul nuw nsw i64 %indvars.iv, 10
1486  %arrayidx = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 %i
1487  store i8 0, i8* %arrayidx, align 2, !tbaa !15
1488  br label %for.inc
1489
1490for.inc:                                          ; preds = %for.body
1491  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
1492  br label %for.cond, !llvm.loop !24
1493
1494for.end:                                          ; preds = %for.cond.cleanup
1495  br label %for.cond2
1496
1497for.cond2:                                        ; preds = %for.inc9, %for.end
1498  %indvars.iv2 = phi i64 [ %indvars.iv.next3, %for.inc9 ], [ 0, %for.end ]
1499  %exitcond6 = icmp ne i64 %indvars.iv2, 10
1500  br i1 %exitcond6, label %for.body5, label %for.cond.cleanup4
1501
1502for.cond.cleanup4:                                ; preds = %for.cond2
1503  br label %for.end11
1504
1505for.body5:                                        ; preds = %for.cond2
1506  %i15 = mul nuw nsw i64 %indvars.iv2, 10
1507  %i16 = or i64 %i15, 1
1508  %arrayidx8 = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 %i16
1509  store float 0.000000e+00, float* %arrayidx8, align 4, !tbaa !18
1510  br label %for.inc9
1511
1512for.inc9:                                         ; preds = %for.body5
1513  %indvars.iv.next3 = add nuw nsw i64 %indvars.iv2, 1
1514  br label %for.cond2, !llvm.loop !25
1515
1516for.end11:                                        ; preds = %for.cond.cleanup4
1517  br label %for.cond13
1518
1519for.cond13:                                       ; preds = %for.inc21, %for.end11
1520  %indvars.iv7 = phi i64 [ %indvars.iv.next8, %for.inc21 ], [ 0, %for.end11 ]
1521  %exitcond11 = icmp ne i64 %indvars.iv7, 20
1522  br i1 %exitcond11, label %for.body16, label %for.cond.cleanup15
1523
1524for.cond.cleanup15:                               ; preds = %for.cond13
1525  br label %for.end23
1526
1527for.body16:                                       ; preds = %for.cond13
1528  %i17 = mul nuw nsw i64 %indvars.iv7, 10
1529  %i18 = add nuw nsw i64 %i17, 2
1530  %arrayidx20 = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 %i18
1531  store i64 0, i64* %arrayidx20, align 16, !tbaa !20
1532  br label %for.inc21
1533
1534for.inc21:                                        ; preds = %for.body16
1535  %indvars.iv.next8 = add nuw nsw i64 %indvars.iv7, 1
1536  br label %for.cond13, !llvm.loop !26
1537
1538for.end23:                                        ; preds = %for.cond.cleanup15
1539  store i8 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 1023), align 1, !tbaa !15
1540  call void @write_arg(i32* bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 0)
1541  br label %for.cond25
1542
1543for.cond25:                                       ; preds = %for.inc33, %for.end23
1544  %indvars.iv12 = phi i64 [ %indvars.iv.next13, %for.inc33 ], [ 0, %for.end23 ]
1545  %exitcond14 = icmp ne i64 %indvars.iv12, 1024
1546  br i1 %exitcond14, label %for.body28, label %for.cond.cleanup27
1547
1548for.cond.cleanup27:                               ; preds = %for.cond25
1549  br label %for.end35
1550
1551for.body28:                                       ; preds = %for.cond25
1552  %arrayidx30 = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 %indvars.iv12
1553  %i19 = load i8, i8* %arrayidx30, align 1, !tbaa !15
1554  %arrayidx32 = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 %indvars.iv12
1555  store i8 %i19, i8* %arrayidx32, align 1, !tbaa !15
1556  br label %for.inc33
1557
1558for.inc33:                                        ; preds = %for.body28
1559  %indvars.iv.next13 = add nuw nsw i64 %indvars.iv12, 1
1560  br label %for.cond25, !llvm.loop !27
1561
1562for.end35:                                        ; preds = %for.cond.cleanup27
1563  ret void
1564}
1565
1566;    static int Flag3;
1567;    int static_global_simplifiable_3() {
1568;      Flag3 = 1;
1569;      return Flag3;
1570;    }
1571define i32 @static_global_simplifiable_3() {
1572; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn
1573; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@static_global_simplifiable_3
1574; IS__TUNIT_OPM-SAME: () #[[ATTR4]] {
1575; IS__TUNIT_OPM-NEXT:    store i32 1, i32* @Flag3, align 4, !tbaa [[TBAA3]]
1576; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = load i32, i32* @Flag3, align 4, !tbaa [[TBAA3]]
1577; IS__TUNIT_OPM-NEXT:    ret i32 [[I]]
1578;
1579; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
1580; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_3
1581; IS__TUNIT_NPM-SAME: () #[[ATTR2]] {
1582; IS__TUNIT_NPM-NEXT:    store i32 1, i32* @Flag3, align 4, !tbaa [[TBAA3]]
1583; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = load i32, i32* @Flag3, align 4, !tbaa [[TBAA3]]
1584; IS__TUNIT_NPM-NEXT:    ret i32 [[I]]
1585;
1586; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn
1587; IS__CGSCC____-LABEL: define {{[^@]+}}@static_global_simplifiable_3
1588; IS__CGSCC____-SAME: () #[[ATTR5:[0-9]+]] {
1589; IS__CGSCC____-NEXT:    store i32 1, i32* @Flag3, align 4, !tbaa [[TBAA3]]
1590; IS__CGSCC____-NEXT:    [[I:%.*]] = load i32, i32* @Flag3, align 4, !tbaa [[TBAA3]]
1591; IS__CGSCC____-NEXT:    ret i32 [[I]]
1592;
1593  store i32 1, i32* @Flag3, align 4, !tbaa !3
1594  %i = load i32, i32* @Flag3, align 4, !tbaa !3
1595  ret i32 %i
1596}
1597
1598;    struct S noalias_arg_simplifiable_1(struct S s) {
1599;      s.f1 = 1.1;
1600;      s.f2 = 2.2;
1601;      s.f3 = 3.3;
1602;      write_arg(&s.i1, 1);
1603;      write_arg(&s.i2, 2);
1604;      write_arg(&s.i3, 3);
1605;      struct S r;
1606;      r.f1 = s.f1;
1607;      r.f2 = s.f2 * 2;
1608;      r.f3 = s.f3 + s.f1;
1609;      r.i1 = s.i1;
1610;      r.i2 = s.i2 * 2;
1611;      r.i3 = s.i3 + s.i1;
1612;      return r;
1613;    }
1614;
1615define void @noalias_arg_simplifiable_1(%struct.S* noalias sret(%struct.S) align 4 %agg.result, %struct.S* byval(%struct.S) align 8 %s) {
1616; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
1617; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1
1618; 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]] {
1619; IS__TUNIT_OPM-NEXT:  entry:
1620; IS__TUNIT_OPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1621; IS__TUNIT_OPM-NEXT:    store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
1622; IS__TUNIT_OPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
1623; IS__TUNIT_OPM-NEXT:    store float 0x40019999A0000000, float* [[F2]], align 8, !tbaa [[TBAA10]]
1624; IS__TUNIT_OPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
1625; IS__TUNIT_OPM-NEXT:    store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]]
1626; IS__TUNIT_OPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1627; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR5]]
1628; IS__TUNIT_OPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
1629; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR5]]
1630; IS__TUNIT_OPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
1631; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR5]]
1632; IS__TUNIT_OPM-NEXT:    [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1633; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]]
1634; IS__TUNIT_OPM-NEXT:    [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
1635; IS__TUNIT_OPM-NEXT:    store float [[I]], float* [[F12]], align 4, !tbaa [[TBAA7]]
1636; IS__TUNIT_OPM-NEXT:    [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
1637; IS__TUNIT_OPM-NEXT:    [[I4:%.*]] = load float, float* [[F23]], align 8, !tbaa [[TBAA10]]
1638; IS__TUNIT_OPM-NEXT:    [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00
1639; IS__TUNIT_OPM-NEXT:    [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
1640; IS__TUNIT_OPM-NEXT:    store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]]
1641; IS__TUNIT_OPM-NEXT:    [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
1642; IS__TUNIT_OPM-NEXT:    [[I5:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]]
1643; IS__TUNIT_OPM-NEXT:    [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1644; IS__TUNIT_OPM-NEXT:    [[I6:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]]
1645; IS__TUNIT_OPM-NEXT:    [[ADD:%.*]] = fadd float [[I5]], [[I6]]
1646; IS__TUNIT_OPM-NEXT:    [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
1647; IS__TUNIT_OPM-NEXT:    store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]]
1648; IS__TUNIT_OPM-NEXT:    [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1649; IS__TUNIT_OPM-NEXT:    [[I7:%.*]] = load i32, i32* [[I18]], align 8, !tbaa [[TBAA12]]
1650; IS__TUNIT_OPM-NEXT:    [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
1651; IS__TUNIT_OPM-NEXT:    store i32 [[I7]], i32* [[I19]], align 4, !tbaa [[TBAA12]]
1652; IS__TUNIT_OPM-NEXT:    [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
1653; IS__TUNIT_OPM-NEXT:    [[I8:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13]]
1654; IS__TUNIT_OPM-NEXT:    [[MUL11:%.*]] = shl nsw i32 [[I8]], 1
1655; IS__TUNIT_OPM-NEXT:    [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
1656; IS__TUNIT_OPM-NEXT:    store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]]
1657; IS__TUNIT_OPM-NEXT:    [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
1658; IS__TUNIT_OPM-NEXT:    [[I9:%.*]] = load i32, i32* [[I313]], align 8, !tbaa [[TBAA14]]
1659; IS__TUNIT_OPM-NEXT:    [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1660; IS__TUNIT_OPM-NEXT:    [[I10:%.*]] = load i32, i32* [[I114]], align 8, !tbaa [[TBAA12]]
1661; IS__TUNIT_OPM-NEXT:    [[ADD15:%.*]] = add nsw i32 [[I9]], [[I10]]
1662; IS__TUNIT_OPM-NEXT:    [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
1663; IS__TUNIT_OPM-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]]
1664; IS__TUNIT_OPM-NEXT:    ret void
1665;
1666; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
1667; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1
1668; 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]] {
1669; IS__TUNIT_NPM-NEXT:  entry:
1670; IS__TUNIT_NPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1671; IS__TUNIT_NPM-NEXT:    store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
1672; IS__TUNIT_NPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
1673; IS__TUNIT_NPM-NEXT:    store float 0x40019999A0000000, float* [[F2]], align 8, !tbaa [[TBAA10]]
1674; IS__TUNIT_NPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
1675; IS__TUNIT_NPM-NEXT:    store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]]
1676; IS__TUNIT_NPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1677; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR4]]
1678; IS__TUNIT_NPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
1679; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR4]]
1680; IS__TUNIT_NPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
1681; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR4]]
1682; IS__TUNIT_NPM-NEXT:    [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1683; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]]
1684; IS__TUNIT_NPM-NEXT:    [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
1685; IS__TUNIT_NPM-NEXT:    store float [[I]], float* [[F12]], align 4, !tbaa [[TBAA7]]
1686; IS__TUNIT_NPM-NEXT:    [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
1687; IS__TUNIT_NPM-NEXT:    [[I4:%.*]] = load float, float* [[F23]], align 8, !tbaa [[TBAA10]]
1688; IS__TUNIT_NPM-NEXT:    [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00
1689; IS__TUNIT_NPM-NEXT:    [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
1690; IS__TUNIT_NPM-NEXT:    store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]]
1691; IS__TUNIT_NPM-NEXT:    [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
1692; IS__TUNIT_NPM-NEXT:    [[I5:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]]
1693; IS__TUNIT_NPM-NEXT:    [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1694; IS__TUNIT_NPM-NEXT:    [[I6:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]]
1695; IS__TUNIT_NPM-NEXT:    [[ADD:%.*]] = fadd float [[I5]], [[I6]]
1696; IS__TUNIT_NPM-NEXT:    [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
1697; IS__TUNIT_NPM-NEXT:    store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]]
1698; IS__TUNIT_NPM-NEXT:    [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1699; IS__TUNIT_NPM-NEXT:    [[I7:%.*]] = load i32, i32* [[I18]], align 8, !tbaa [[TBAA12]]
1700; IS__TUNIT_NPM-NEXT:    [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
1701; IS__TUNIT_NPM-NEXT:    store i32 [[I7]], i32* [[I19]], align 4, !tbaa [[TBAA12]]
1702; IS__TUNIT_NPM-NEXT:    [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
1703; IS__TUNIT_NPM-NEXT:    [[I8:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13]]
1704; IS__TUNIT_NPM-NEXT:    [[MUL11:%.*]] = shl nsw i32 [[I8]], 1
1705; IS__TUNIT_NPM-NEXT:    [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
1706; IS__TUNIT_NPM-NEXT:    store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]]
1707; IS__TUNIT_NPM-NEXT:    [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
1708; IS__TUNIT_NPM-NEXT:    [[I9:%.*]] = load i32, i32* [[I313]], align 8, !tbaa [[TBAA14]]
1709; IS__TUNIT_NPM-NEXT:    [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1710; IS__TUNIT_NPM-NEXT:    [[I10:%.*]] = load i32, i32* [[I114]], align 8, !tbaa [[TBAA12]]
1711; IS__TUNIT_NPM-NEXT:    [[ADD15:%.*]] = add nsw i32 [[I9]], [[I10]]
1712; IS__TUNIT_NPM-NEXT:    [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
1713; IS__TUNIT_NPM-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]]
1714; IS__TUNIT_NPM-NEXT:    ret void
1715;
1716; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
1717; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1
1718; IS__CGSCC_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:%.*]]) #[[ATTR6:[0-9]+]] {
1719; IS__CGSCC_OPM-NEXT:  entry:
1720; IS__CGSCC_OPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1721; IS__CGSCC_OPM-NEXT:    store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
1722; IS__CGSCC_OPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
1723; IS__CGSCC_OPM-NEXT:    store float 0x40019999A0000000, float* [[F2]], align 8, !tbaa [[TBAA10]]
1724; IS__CGSCC_OPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
1725; IS__CGSCC_OPM-NEXT:    store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]]
1726; IS__CGSCC_OPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1727; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR12]]
1728; IS__CGSCC_OPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
1729; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR12]]
1730; IS__CGSCC_OPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
1731; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR12]]
1732; IS__CGSCC_OPM-NEXT:    [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1733; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]]
1734; IS__CGSCC_OPM-NEXT:    [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
1735; IS__CGSCC_OPM-NEXT:    store float [[I]], float* [[F12]], align 4, !tbaa [[TBAA7]]
1736; IS__CGSCC_OPM-NEXT:    [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
1737; IS__CGSCC_OPM-NEXT:    [[I4:%.*]] = load float, float* [[F23]], align 8, !tbaa [[TBAA10]]
1738; IS__CGSCC_OPM-NEXT:    [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00
1739; IS__CGSCC_OPM-NEXT:    [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
1740; IS__CGSCC_OPM-NEXT:    store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]]
1741; IS__CGSCC_OPM-NEXT:    [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
1742; IS__CGSCC_OPM-NEXT:    [[I5:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]]
1743; IS__CGSCC_OPM-NEXT:    [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1744; IS__CGSCC_OPM-NEXT:    [[I6:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]]
1745; IS__CGSCC_OPM-NEXT:    [[ADD:%.*]] = fadd float [[I5]], [[I6]]
1746; IS__CGSCC_OPM-NEXT:    [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
1747; IS__CGSCC_OPM-NEXT:    store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]]
1748; IS__CGSCC_OPM-NEXT:    [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1749; IS__CGSCC_OPM-NEXT:    [[I7:%.*]] = load i32, i32* [[I18]], align 8, !tbaa [[TBAA12]]
1750; IS__CGSCC_OPM-NEXT:    [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
1751; IS__CGSCC_OPM-NEXT:    store i32 [[I7]], i32* [[I19]], align 4, !tbaa [[TBAA12]]
1752; IS__CGSCC_OPM-NEXT:    [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
1753; IS__CGSCC_OPM-NEXT:    [[I8:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13]]
1754; IS__CGSCC_OPM-NEXT:    [[MUL11:%.*]] = shl nsw i32 [[I8]], 1
1755; IS__CGSCC_OPM-NEXT:    [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
1756; IS__CGSCC_OPM-NEXT:    store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]]
1757; IS__CGSCC_OPM-NEXT:    [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
1758; IS__CGSCC_OPM-NEXT:    [[I9:%.*]] = load i32, i32* [[I313]], align 8, !tbaa [[TBAA14]]
1759; IS__CGSCC_OPM-NEXT:    [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1760; IS__CGSCC_OPM-NEXT:    [[I10:%.*]] = load i32, i32* [[I114]], align 8, !tbaa [[TBAA12]]
1761; IS__CGSCC_OPM-NEXT:    [[ADD15:%.*]] = add nsw i32 [[I9]], [[I10]]
1762; IS__CGSCC_OPM-NEXT:    [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
1763; IS__CGSCC_OPM-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]]
1764; IS__CGSCC_OPM-NEXT:    ret void
1765;
1766; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
1767; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1
1768; IS__CGSCC_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:%.*]]) #[[ATTR6:[0-9]+]] {
1769; IS__CGSCC_NPM-NEXT:  entry:
1770; IS__CGSCC_NPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1771; IS__CGSCC_NPM-NEXT:    store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
1772; IS__CGSCC_NPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
1773; IS__CGSCC_NPM-NEXT:    store float 0x40019999A0000000, float* [[F2]], align 8, !tbaa [[TBAA10]]
1774; IS__CGSCC_NPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
1775; IS__CGSCC_NPM-NEXT:    store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]]
1776; IS__CGSCC_NPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1777; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR10]]
1778; IS__CGSCC_NPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
1779; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR10]]
1780; IS__CGSCC_NPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
1781; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR10]]
1782; IS__CGSCC_NPM-NEXT:    [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1783; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]]
1784; IS__CGSCC_NPM-NEXT:    [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
1785; IS__CGSCC_NPM-NEXT:    store float [[I]], float* [[F12]], align 4, !tbaa [[TBAA7]]
1786; IS__CGSCC_NPM-NEXT:    [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
1787; IS__CGSCC_NPM-NEXT:    [[I4:%.*]] = load float, float* [[F23]], align 8, !tbaa [[TBAA10]]
1788; IS__CGSCC_NPM-NEXT:    [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00
1789; IS__CGSCC_NPM-NEXT:    [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
1790; IS__CGSCC_NPM-NEXT:    store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]]
1791; IS__CGSCC_NPM-NEXT:    [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
1792; IS__CGSCC_NPM-NEXT:    [[I5:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]]
1793; IS__CGSCC_NPM-NEXT:    [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
1794; IS__CGSCC_NPM-NEXT:    [[I6:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]]
1795; IS__CGSCC_NPM-NEXT:    [[ADD:%.*]] = fadd float [[I5]], [[I6]]
1796; IS__CGSCC_NPM-NEXT:    [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
1797; IS__CGSCC_NPM-NEXT:    store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]]
1798; IS__CGSCC_NPM-NEXT:    [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1799; IS__CGSCC_NPM-NEXT:    [[I7:%.*]] = load i32, i32* [[I18]], align 8, !tbaa [[TBAA12]]
1800; IS__CGSCC_NPM-NEXT:    [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
1801; IS__CGSCC_NPM-NEXT:    store i32 [[I7]], i32* [[I19]], align 4, !tbaa [[TBAA12]]
1802; IS__CGSCC_NPM-NEXT:    [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
1803; IS__CGSCC_NPM-NEXT:    [[I8:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13]]
1804; IS__CGSCC_NPM-NEXT:    [[MUL11:%.*]] = shl nsw i32 [[I8]], 1
1805; IS__CGSCC_NPM-NEXT:    [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
1806; IS__CGSCC_NPM-NEXT:    store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]]
1807; IS__CGSCC_NPM-NEXT:    [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
1808; IS__CGSCC_NPM-NEXT:    [[I9:%.*]] = load i32, i32* [[I313]], align 8, !tbaa [[TBAA14]]
1809; IS__CGSCC_NPM-NEXT:    [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
1810; IS__CGSCC_NPM-NEXT:    [[I10:%.*]] = load i32, i32* [[I114]], align 8, !tbaa [[TBAA12]]
1811; IS__CGSCC_NPM-NEXT:    [[ADD15:%.*]] = add nsw i32 [[I9]], [[I10]]
1812; IS__CGSCC_NPM-NEXT:    [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
1813; IS__CGSCC_NPM-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]]
1814; IS__CGSCC_NPM-NEXT:    ret void
1815;
1816entry:
1817  %f1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 3
1818  store float 0x3FF19999A0000000, float* %f1, align 4, !tbaa !7
1819  %f2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 4
1820  store float 0x40019999A0000000, float* %f2, align 8, !tbaa !10
1821  %f3 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 5
1822  store float 0x400A666660000000, float* %f3, align 4, !tbaa !11
1823  %i1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0
1824  call void @write_arg(i32* nonnull %i1, i32 1)
1825  %i2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1
1826  call void @write_arg(i32* nonnull %i2, i32 2)
1827  %i3 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 2
1828  call void @write_arg(i32* nonnull %i3, i32 3)
1829  %f11 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 3
1830  %i = load float, float* %f11, align 4, !tbaa !7
1831  %f12 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 3
1832  store float %i, float* %f12, align 4, !tbaa !7
1833  %f23 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 4
1834  %i4 = load float, float* %f23, align 8, !tbaa !10
1835  %mul = fmul float %i4, 2.000000e+00
1836  %f24 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 4
1837  store float %mul, float* %f24, align 4, !tbaa !10
1838  %f35 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 5
1839  %i5 = load float, float* %f35, align 4, !tbaa !11
1840  %f16 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 3
1841  %i6 = load float, float* %f16, align 4, !tbaa !7
1842  %add = fadd float %i5, %i6
1843  %f37 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 5
1844  store float %add, float* %f37, align 4, !tbaa !11
1845  %i18 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0
1846  %i7 = load i32, i32* %i18, align 8, !tbaa !12
1847  %i19 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 0
1848  store i32 %i7, i32* %i19, align 4, !tbaa !12
1849  %i210 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1
1850  %i8 = load i32, i32* %i210, align 4, !tbaa !13
1851  %mul11 = shl nsw i32 %i8, 1
1852  %i212 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 1
1853  store i32 %mul11, i32* %i212, align 4, !tbaa !13
1854  %i313 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 2
1855  %i9 = load i32, i32* %i313, align 8, !tbaa !14
1856  %i114 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0
1857  %i10 = load i32, i32* %i114, align 8, !tbaa !12
1858  %add15 = add nsw i32 %i9, %i10
1859  %i316 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 2
1860  store i32 %add15, i32* %i316, align 4, !tbaa !14
1861  ret void
1862}
1863
1864;    void noalias_arg_simplifiable_2(char Bytes[1024]) {
1865;      for (int i = 0; i < 100; ++i)
1866;        Bytes[i * 10] = 0;
1867;      for (int i = 0; i < 10; ++i)
1868;        ((float *)Bytes)[i * 10 + 1] = 0;
1869;      for (int i = 0; i < 20; ++i)
1870;        ((long long int *)Bytes)[i * 10 + 2] = 0;
1871;      Bytes[1023] = 0;
1872;      write_arg((int *)&Bytes[500], 0);
1873;      struct S R;
1874;      for (int i = 0; i < 1024; ++i)
1875;        globalBytes[i] = Bytes[i];
1876;    }
1877;
1878define void @noalias_arg_simplifiable_2(i8* %Bytes) {
1879; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind
1880; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_2
1881; IS__TUNIT_OPM-SAME: (i8* nocapture nofree [[BYTES:%.*]]) #[[ATTR2]] {
1882; IS__TUNIT_OPM-NEXT:  entry:
1883; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND:%.*]]
1884; IS__TUNIT_OPM:       for.cond:
1885; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
1886; IS__TUNIT_OPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
1887; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
1888; IS__TUNIT_OPM:       for.cond.cleanup:
1889; IS__TUNIT_OPM-NEXT:    br label [[FOR_END:%.*]]
1890; IS__TUNIT_OPM:       for.body:
1891; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
1892; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[I]]
1893; IS__TUNIT_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA19]]
1894; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC]]
1895; IS__TUNIT_OPM:       for.inc:
1896; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
1897; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP25:![0-9]+]]
1898; IS__TUNIT_OPM:       for.end:
1899; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2:%.*]]
1900; IS__TUNIT_OPM:       for.cond2:
1901; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
1902; IS__TUNIT_OPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
1903; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
1904; IS__TUNIT_OPM:       for.cond.cleanup4:
1905; IS__TUNIT_OPM-NEXT:    br label [[FOR_END11:%.*]]
1906; IS__TUNIT_OPM:       for.body5:
1907; IS__TUNIT_OPM-NEXT:    [[I15:%.*]] = bitcast i8* [[BYTES]] to float*
1908; IS__TUNIT_OPM-NEXT:    [[I16:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
1909; IS__TUNIT_OPM-NEXT:    [[I17:%.*]] = or i64 [[I16]], 1
1910; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I15]], i64 [[I17]]
1911; IS__TUNIT_OPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA26:![0-9]+]]
1912; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC9]]
1913; IS__TUNIT_OPM:       for.inc9:
1914; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
1915; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP27:![0-9]+]]
1916; IS__TUNIT_OPM:       for.end11:
1917; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND13:%.*]]
1918; IS__TUNIT_OPM:       for.cond13:
1919; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
1920; IS__TUNIT_OPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
1921; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
1922; IS__TUNIT_OPM:       for.cond.cleanup15:
1923; IS__TUNIT_OPM-NEXT:    br label [[FOR_END23:%.*]]
1924; IS__TUNIT_OPM:       for.body16:
1925; IS__TUNIT_OPM-NEXT:    [[I18:%.*]] = bitcast i8* [[BYTES]] to i64*
1926; IS__TUNIT_OPM-NEXT:    [[I19:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
1927; IS__TUNIT_OPM-NEXT:    [[I20:%.*]] = add nuw nsw i64 [[I19]], 2
1928; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* [[I18]], i64 [[I20]]
1929; IS__TUNIT_OPM-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA28:![0-9]+]]
1930; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC21]]
1931; IS__TUNIT_OPM:       for.inc21:
1932; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
1933; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP30:![0-9]+]]
1934; IS__TUNIT_OPM:       for.end23:
1935; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 1023
1936; IS__TUNIT_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA19]]
1937; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500
1938; IS__TUNIT_OPM-NEXT:    [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32*
1939; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 [[I21]], i32 noundef 0) #[[ATTR6]]
1940; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND27:%.*]]
1941; IS__TUNIT_OPM:       for.cond27:
1942; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ]
1943; IS__TUNIT_OPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
1944; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY30:%.*]], label [[FOR_COND_CLEANUP29:%.*]]
1945; IS__TUNIT_OPM:       for.cond.cleanup29:
1946; IS__TUNIT_OPM-NEXT:    br label [[FOR_END37:%.*]]
1947; IS__TUNIT_OPM:       for.body30:
1948; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[INDVARS_IV12]]
1949; IS__TUNIT_OPM-NEXT:    [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA19]]
1950; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX34:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
1951; IS__TUNIT_OPM-NEXT:    store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA19]]
1952; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC35]]
1953; IS__TUNIT_OPM:       for.inc35:
1954; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
1955; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND27]], !llvm.loop [[LOOP31:![0-9]+]]
1956; IS__TUNIT_OPM:       for.end37:
1957; IS__TUNIT_OPM-NEXT:    ret void
1958;
1959; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
1960; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_2
1961; IS__TUNIT_NPM-SAME: (i8* nocapture nofree [[BYTES:%.*]]) #[[ATTR2]] {
1962; IS__TUNIT_NPM-NEXT:  entry:
1963; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND:%.*]]
1964; IS__TUNIT_NPM:       for.cond:
1965; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
1966; IS__TUNIT_NPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
1967; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
1968; IS__TUNIT_NPM:       for.cond.cleanup:
1969; IS__TUNIT_NPM-NEXT:    br label [[FOR_END:%.*]]
1970; IS__TUNIT_NPM:       for.body:
1971; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
1972; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[I]]
1973; IS__TUNIT_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA19]]
1974; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC]]
1975; IS__TUNIT_NPM:       for.inc:
1976; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
1977; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP25:![0-9]+]]
1978; IS__TUNIT_NPM:       for.end:
1979; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2:%.*]]
1980; IS__TUNIT_NPM:       for.cond2:
1981; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
1982; IS__TUNIT_NPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
1983; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
1984; IS__TUNIT_NPM:       for.cond.cleanup4:
1985; IS__TUNIT_NPM-NEXT:    br label [[FOR_END11:%.*]]
1986; IS__TUNIT_NPM:       for.body5:
1987; IS__TUNIT_NPM-NEXT:    [[I15:%.*]] = bitcast i8* [[BYTES]] to float*
1988; IS__TUNIT_NPM-NEXT:    [[I16:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
1989; IS__TUNIT_NPM-NEXT:    [[I17:%.*]] = or i64 [[I16]], 1
1990; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I15]], i64 [[I17]]
1991; IS__TUNIT_NPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA26:![0-9]+]]
1992; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC9]]
1993; IS__TUNIT_NPM:       for.inc9:
1994; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
1995; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP27:![0-9]+]]
1996; IS__TUNIT_NPM:       for.end11:
1997; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND13:%.*]]
1998; IS__TUNIT_NPM:       for.cond13:
1999; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
2000; IS__TUNIT_NPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
2001; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
2002; IS__TUNIT_NPM:       for.cond.cleanup15:
2003; IS__TUNIT_NPM-NEXT:    br label [[FOR_END23:%.*]]
2004; IS__TUNIT_NPM:       for.body16:
2005; IS__TUNIT_NPM-NEXT:    [[I18:%.*]] = bitcast i8* [[BYTES]] to i64*
2006; IS__TUNIT_NPM-NEXT:    [[I19:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
2007; IS__TUNIT_NPM-NEXT:    [[I20:%.*]] = add nuw nsw i64 [[I19]], 2
2008; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* [[I18]], i64 [[I20]]
2009; IS__TUNIT_NPM-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA28:![0-9]+]]
2010; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC21]]
2011; IS__TUNIT_NPM:       for.inc21:
2012; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
2013; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP30:![0-9]+]]
2014; IS__TUNIT_NPM:       for.end23:
2015; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 1023
2016; IS__TUNIT_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA19]]
2017; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500
2018; IS__TUNIT_NPM-NEXT:    [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32*
2019; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 [[I21]], i32 noundef 0) #[[ATTR4]]
2020; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND27:%.*]]
2021; IS__TUNIT_NPM:       for.cond27:
2022; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ]
2023; IS__TUNIT_NPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
2024; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY30:%.*]], label [[FOR_COND_CLEANUP29:%.*]]
2025; IS__TUNIT_NPM:       for.cond.cleanup29:
2026; IS__TUNIT_NPM-NEXT:    br label [[FOR_END37:%.*]]
2027; IS__TUNIT_NPM:       for.body30:
2028; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[INDVARS_IV12]]
2029; IS__TUNIT_NPM-NEXT:    [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA19]]
2030; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX34:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
2031; IS__TUNIT_NPM-NEXT:    store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA19]]
2032; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC35]]
2033; IS__TUNIT_NPM:       for.inc35:
2034; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
2035; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND27]], !llvm.loop [[LOOP31:![0-9]+]]
2036; IS__TUNIT_NPM:       for.end37:
2037; IS__TUNIT_NPM-NEXT:    ret void
2038;
2039; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_2
2040; IS__CGSCC_OPM-SAME: (i8* [[BYTES:%.*]]) {
2041; IS__CGSCC_OPM-NEXT:  entry:
2042; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND:%.*]]
2043; IS__CGSCC_OPM:       for.cond:
2044; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
2045; IS__CGSCC_OPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
2046; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
2047; IS__CGSCC_OPM:       for.cond.cleanup:
2048; IS__CGSCC_OPM-NEXT:    br label [[FOR_END:%.*]]
2049; IS__CGSCC_OPM:       for.body:
2050; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
2051; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[I]]
2052; IS__CGSCC_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA15]]
2053; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC]]
2054; IS__CGSCC_OPM:       for.inc:
2055; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
2056; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP28:![0-9]+]]
2057; IS__CGSCC_OPM:       for.end:
2058; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND2:%.*]]
2059; IS__CGSCC_OPM:       for.cond2:
2060; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
2061; IS__CGSCC_OPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
2062; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
2063; IS__CGSCC_OPM:       for.cond.cleanup4:
2064; IS__CGSCC_OPM-NEXT:    br label [[FOR_END11:%.*]]
2065; IS__CGSCC_OPM:       for.body5:
2066; IS__CGSCC_OPM-NEXT:    [[I15:%.*]] = bitcast i8* [[BYTES]] to float*
2067; IS__CGSCC_OPM-NEXT:    [[I16:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
2068; IS__CGSCC_OPM-NEXT:    [[I17:%.*]] = or i64 [[I16]], 1
2069; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I15]], i64 [[I17]]
2070; IS__CGSCC_OPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]]
2071; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC9]]
2072; IS__CGSCC_OPM:       for.inc9:
2073; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
2074; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP29:![0-9]+]]
2075; IS__CGSCC_OPM:       for.end11:
2076; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND13:%.*]]
2077; IS__CGSCC_OPM:       for.cond13:
2078; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
2079; IS__CGSCC_OPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
2080; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
2081; IS__CGSCC_OPM:       for.cond.cleanup15:
2082; IS__CGSCC_OPM-NEXT:    br label [[FOR_END23:%.*]]
2083; IS__CGSCC_OPM:       for.body16:
2084; IS__CGSCC_OPM-NEXT:    [[I18:%.*]] = bitcast i8* [[BYTES]] to i64*
2085; IS__CGSCC_OPM-NEXT:    [[I19:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
2086; IS__CGSCC_OPM-NEXT:    [[I20:%.*]] = add nuw nsw i64 [[I19]], 2
2087; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* [[I18]], i64 [[I20]]
2088; IS__CGSCC_OPM-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA20]]
2089; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC21]]
2090; IS__CGSCC_OPM:       for.inc21:
2091; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
2092; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP30:![0-9]+]]
2093; IS__CGSCC_OPM:       for.end23:
2094; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 1023
2095; IS__CGSCC_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA15]]
2096; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500
2097; IS__CGSCC_OPM-NEXT:    [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32*
2098; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I21]], i32 noundef 0) #[[ATTR13]]
2099; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND27:%.*]]
2100; IS__CGSCC_OPM:       for.cond27:
2101; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ]
2102; IS__CGSCC_OPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
2103; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY30:%.*]], label [[FOR_COND_CLEANUP29:%.*]]
2104; IS__CGSCC_OPM:       for.cond.cleanup29:
2105; IS__CGSCC_OPM-NEXT:    br label [[FOR_END37:%.*]]
2106; IS__CGSCC_OPM:       for.body30:
2107; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[INDVARS_IV12]]
2108; IS__CGSCC_OPM-NEXT:    [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]]
2109; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX34:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
2110; IS__CGSCC_OPM-NEXT:    store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA15]]
2111; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC35]]
2112; IS__CGSCC_OPM:       for.inc35:
2113; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
2114; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND27]], !llvm.loop [[LOOP31:![0-9]+]]
2115; IS__CGSCC_OPM:       for.end37:
2116; IS__CGSCC_OPM-NEXT:    ret void
2117;
2118; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_2
2119; IS__CGSCC_NPM-SAME: (i8* [[BYTES:%.*]]) {
2120; IS__CGSCC_NPM-NEXT:  entry:
2121; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND:%.*]]
2122; IS__CGSCC_NPM:       for.cond:
2123; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
2124; IS__CGSCC_NPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
2125; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
2126; IS__CGSCC_NPM:       for.cond.cleanup:
2127; IS__CGSCC_NPM-NEXT:    br label [[FOR_END:%.*]]
2128; IS__CGSCC_NPM:       for.body:
2129; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
2130; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[I]]
2131; IS__CGSCC_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA15]]
2132; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC]]
2133; IS__CGSCC_NPM:       for.inc:
2134; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
2135; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP28:![0-9]+]]
2136; IS__CGSCC_NPM:       for.end:
2137; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND2:%.*]]
2138; IS__CGSCC_NPM:       for.cond2:
2139; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
2140; IS__CGSCC_NPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
2141; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
2142; IS__CGSCC_NPM:       for.cond.cleanup4:
2143; IS__CGSCC_NPM-NEXT:    br label [[FOR_END11:%.*]]
2144; IS__CGSCC_NPM:       for.body5:
2145; IS__CGSCC_NPM-NEXT:    [[I15:%.*]] = bitcast i8* [[BYTES]] to float*
2146; IS__CGSCC_NPM-NEXT:    [[I16:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
2147; IS__CGSCC_NPM-NEXT:    [[I17:%.*]] = or i64 [[I16]], 1
2148; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I15]], i64 [[I17]]
2149; IS__CGSCC_NPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]]
2150; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC9]]
2151; IS__CGSCC_NPM:       for.inc9:
2152; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
2153; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP29:![0-9]+]]
2154; IS__CGSCC_NPM:       for.end11:
2155; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND13:%.*]]
2156; IS__CGSCC_NPM:       for.cond13:
2157; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
2158; IS__CGSCC_NPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
2159; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
2160; IS__CGSCC_NPM:       for.cond.cleanup15:
2161; IS__CGSCC_NPM-NEXT:    br label [[FOR_END23:%.*]]
2162; IS__CGSCC_NPM:       for.body16:
2163; IS__CGSCC_NPM-NEXT:    [[I18:%.*]] = bitcast i8* [[BYTES]] to i64*
2164; IS__CGSCC_NPM-NEXT:    [[I19:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
2165; IS__CGSCC_NPM-NEXT:    [[I20:%.*]] = add nuw nsw i64 [[I19]], 2
2166; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* [[I18]], i64 [[I20]]
2167; IS__CGSCC_NPM-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA20]]
2168; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC21]]
2169; IS__CGSCC_NPM:       for.inc21:
2170; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
2171; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP30:![0-9]+]]
2172; IS__CGSCC_NPM:       for.end23:
2173; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 1023
2174; IS__CGSCC_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA15]]
2175; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500
2176; IS__CGSCC_NPM-NEXT:    [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32*
2177; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I21]], i32 noundef 0) #[[ATTR11]]
2178; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND27:%.*]]
2179; IS__CGSCC_NPM:       for.cond27:
2180; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ]
2181; IS__CGSCC_NPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
2182; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY30:%.*]], label [[FOR_COND_CLEANUP29:%.*]]
2183; IS__CGSCC_NPM:       for.cond.cleanup29:
2184; IS__CGSCC_NPM-NEXT:    br label [[FOR_END37:%.*]]
2185; IS__CGSCC_NPM:       for.body30:
2186; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[INDVARS_IV12]]
2187; IS__CGSCC_NPM-NEXT:    [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]]
2188; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX34:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
2189; IS__CGSCC_NPM-NEXT:    store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA15]]
2190; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC35]]
2191; IS__CGSCC_NPM:       for.inc35:
2192; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
2193; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND27]], !llvm.loop [[LOOP31:![0-9]+]]
2194; IS__CGSCC_NPM:       for.end37:
2195; IS__CGSCC_NPM-NEXT:    ret void
2196;
2197entry:
2198  br label %for.cond
2199
2200for.cond:                                         ; preds = %for.inc, %entry
2201  %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
2202  %exitcond = icmp ne i64 %indvars.iv, 100
2203  br i1 %exitcond, label %for.body, label %for.cond.cleanup
2204
2205for.cond.cleanup:                                 ; preds = %for.cond
2206  br label %for.end
2207
2208for.body:                                         ; preds = %for.cond
2209  %i = mul nuw nsw i64 %indvars.iv, 10
2210  %arrayidx = getelementptr inbounds i8, i8* %Bytes, i64 %i
2211  store i8 0, i8* %arrayidx, align 1, !tbaa !15
2212  br label %for.inc
2213
2214for.inc:                                          ; preds = %for.body
2215  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
2216  br label %for.cond, !llvm.loop !28
2217
2218for.end:                                          ; preds = %for.cond.cleanup
2219  br label %for.cond2
2220
2221for.cond2:                                        ; preds = %for.inc9, %for.end
2222  %indvars.iv2 = phi i64 [ %indvars.iv.next3, %for.inc9 ], [ 0, %for.end ]
2223  %exitcond6 = icmp ne i64 %indvars.iv2, 10
2224  br i1 %exitcond6, label %for.body5, label %for.cond.cleanup4
2225
2226for.cond.cleanup4:                                ; preds = %for.cond2
2227  br label %for.end11
2228
2229for.body5:                                        ; preds = %for.cond2
2230  %i15 = bitcast i8* %Bytes to float*
2231  %i16 = mul nuw nsw i64 %indvars.iv2, 10
2232  %i17 = or i64 %i16, 1
2233  %arrayidx8 = getelementptr inbounds float, float* %i15, i64 %i17
2234  store float 0.000000e+00, float* %arrayidx8, align 4, !tbaa !18
2235  br label %for.inc9
2236
2237for.inc9:                                         ; preds = %for.body5
2238  %indvars.iv.next3 = add nuw nsw i64 %indvars.iv2, 1
2239  br label %for.cond2, !llvm.loop !29
2240
2241for.end11:                                        ; preds = %for.cond.cleanup4
2242  br label %for.cond13
2243
2244for.cond13:                                       ; preds = %for.inc21, %for.end11
2245  %indvars.iv7 = phi i64 [ %indvars.iv.next8, %for.inc21 ], [ 0, %for.end11 ]
2246  %exitcond11 = icmp ne i64 %indvars.iv7, 20
2247  br i1 %exitcond11, label %for.body16, label %for.cond.cleanup15
2248
2249for.cond.cleanup15:                               ; preds = %for.cond13
2250  br label %for.end23
2251
2252for.body16:                                       ; preds = %for.cond13
2253  %i18 = bitcast i8* %Bytes to i64*
2254  %i19 = mul nuw nsw i64 %indvars.iv7, 10
2255  %i20 = add nuw nsw i64 %i19, 2
2256  %arrayidx20 = getelementptr inbounds i64, i64* %i18, i64 %i20
2257  store i64 0, i64* %arrayidx20, align 8, !tbaa !20
2258  br label %for.inc21
2259
2260for.inc21:                                        ; preds = %for.body16
2261  %indvars.iv.next8 = add nuw nsw i64 %indvars.iv7, 1
2262  br label %for.cond13, !llvm.loop !30
2263
2264for.end23:                                        ; preds = %for.cond.cleanup15
2265  %arrayidx24 = getelementptr inbounds i8, i8* %Bytes, i64 1023
2266  store i8 0, i8* %arrayidx24, align 1, !tbaa !15
2267  %arrayidx25 = getelementptr inbounds i8, i8* %Bytes, i64 500
2268  %i21 = bitcast i8* %arrayidx25 to i32*
2269  call void @write_arg(i32* nonnull %i21, i32 0)
2270  br label %for.cond27
2271
2272for.cond27:                                       ; preds = %for.inc35, %for.end23
2273  %indvars.iv12 = phi i64 [ %indvars.iv.next13, %for.inc35 ], [ 0, %for.end23 ]
2274  %exitcond14 = icmp ne i64 %indvars.iv12, 1024
2275  br i1 %exitcond14, label %for.body30, label %for.cond.cleanup29
2276
2277for.cond.cleanup29:                               ; preds = %for.cond27
2278  br label %for.end37
2279
2280for.body30:                                       ; preds = %for.cond27
2281  %arrayidx32 = getelementptr inbounds i8, i8* %Bytes, i64 %indvars.iv12
2282  %i22 = load i8, i8* %arrayidx32, align 1, !tbaa !15
2283  %arrayidx34 = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 %indvars.iv12
2284  store i8 %i22, i8* %arrayidx34, align 1, !tbaa !15
2285  br label %for.inc35
2286
2287for.inc35:                                        ; preds = %for.body30
2288  %indvars.iv.next13 = add nuw nsw i64 %indvars.iv12, 1
2289  br label %for.cond27, !llvm.loop !31
2290
2291for.end37:                                        ; preds = %for.cond.cleanup29
2292  ret void
2293}
2294
2295;    int local_alloca_not_simplifiable_1() {
2296;      int X, Y, Z;
2297;      X = Y = 1;
2298;      escape(&X);
2299;      write_random(&Y);
2300;      Z = X ? 1 : 2;
2301;      return X + Y + Z;
2302;    }
2303;
2304define i32 @local_alloca_not_simplifiable_1() {
2305; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() {
2306; IS__TUNIT_OPM-NEXT:  entry:
2307; IS__TUNIT_OPM-NEXT:    [[X:%.*]] = alloca i32, align 4
2308; IS__TUNIT_OPM-NEXT:    [[Y:%.*]] = alloca i32, align 4
2309; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = bitcast i32* [[X]] to i8*
2310; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR9]]
2311; IS__TUNIT_OPM-NEXT:    [[I1:%.*]] = bitcast i32* [[Y]] to i8*
2312; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR9]]
2313; IS__TUNIT_OPM-NEXT:    store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]]
2314; IS__TUNIT_OPM-NEXT:    store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]]
2315; IS__TUNIT_OPM-NEXT:    [[I2:%.*]] = bitcast i32* [[X]] to i8*
2316; IS__TUNIT_OPM-NEXT:    call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]])
2317; IS__TUNIT_OPM-NEXT:    call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]])
2318; IS__TUNIT_OPM-NEXT:    [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]]
2319; IS__TUNIT_OPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0
2320; IS__TUNIT_OPM-NEXT:    [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1
2321; IS__TUNIT_OPM-NEXT:    [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]]
2322; IS__TUNIT_OPM-NEXT:    [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]]
2323; IS__TUNIT_OPM-NEXT:    [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]]
2324; IS__TUNIT_OPM-NEXT:    [[I5:%.*]] = bitcast i32* [[Y]] to i8*
2325; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]])
2326; IS__TUNIT_OPM-NEXT:    [[I6:%.*]] = bitcast i32* [[X]] to i8*
2327; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]])
2328; IS__TUNIT_OPM-NEXT:    ret i32 [[ADD1]]
2329;
2330; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() {
2331; IS__TUNIT_NPM-NEXT:  entry:
2332; IS__TUNIT_NPM-NEXT:    [[X:%.*]] = alloca i32, align 4
2333; IS__TUNIT_NPM-NEXT:    [[Y:%.*]] = alloca i32, align 4
2334; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = bitcast i32* [[X]] to i8*
2335; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR7]]
2336; IS__TUNIT_NPM-NEXT:    [[I1:%.*]] = bitcast i32* [[Y]] to i8*
2337; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR7]]
2338; IS__TUNIT_NPM-NEXT:    store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]]
2339; IS__TUNIT_NPM-NEXT:    store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]]
2340; IS__TUNIT_NPM-NEXT:    [[I2:%.*]] = bitcast i32* [[X]] to i8*
2341; IS__TUNIT_NPM-NEXT:    call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]])
2342; IS__TUNIT_NPM-NEXT:    call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]])
2343; IS__TUNIT_NPM-NEXT:    [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]]
2344; IS__TUNIT_NPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0
2345; IS__TUNIT_NPM-NEXT:    [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1
2346; IS__TUNIT_NPM-NEXT:    [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]]
2347; IS__TUNIT_NPM-NEXT:    [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]]
2348; IS__TUNIT_NPM-NEXT:    [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]]
2349; IS__TUNIT_NPM-NEXT:    [[I5:%.*]] = bitcast i32* [[Y]] to i8*
2350; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]])
2351; IS__TUNIT_NPM-NEXT:    [[I6:%.*]] = bitcast i32* [[X]] to i8*
2352; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]])
2353; IS__TUNIT_NPM-NEXT:    ret i32 [[ADD1]]
2354;
2355; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() {
2356; IS__CGSCC_OPM-NEXT:  entry:
2357; IS__CGSCC_OPM-NEXT:    [[X:%.*]] = alloca i32, align 4
2358; IS__CGSCC_OPM-NEXT:    [[Y:%.*]] = alloca i32, align 4
2359; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = bitcast i32* [[X]] to i8*
2360; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR11]]
2361; IS__CGSCC_OPM-NEXT:    [[I1:%.*]] = bitcast i32* [[Y]] to i8*
2362; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR11]]
2363; IS__CGSCC_OPM-NEXT:    store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]]
2364; IS__CGSCC_OPM-NEXT:    store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]]
2365; IS__CGSCC_OPM-NEXT:    [[I2:%.*]] = bitcast i32* [[X]] to i8*
2366; IS__CGSCC_OPM-NEXT:    call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]])
2367; IS__CGSCC_OPM-NEXT:    call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]])
2368; IS__CGSCC_OPM-NEXT:    [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]]
2369; IS__CGSCC_OPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0
2370; IS__CGSCC_OPM-NEXT:    [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1
2371; IS__CGSCC_OPM-NEXT:    [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]]
2372; IS__CGSCC_OPM-NEXT:    [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]]
2373; IS__CGSCC_OPM-NEXT:    [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]]
2374; IS__CGSCC_OPM-NEXT:    [[I5:%.*]] = bitcast i32* [[Y]] to i8*
2375; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]])
2376; IS__CGSCC_OPM-NEXT:    [[I6:%.*]] = bitcast i32* [[X]] to i8*
2377; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]])
2378; IS__CGSCC_OPM-NEXT:    ret i32 [[ADD1]]
2379;
2380; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() {
2381; IS__CGSCC_NPM-NEXT:  entry:
2382; IS__CGSCC_NPM-NEXT:    [[X:%.*]] = alloca i32, align 4
2383; IS__CGSCC_NPM-NEXT:    [[Y:%.*]] = alloca i32, align 4
2384; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = bitcast i32* [[X]] to i8*
2385; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR9]]
2386; IS__CGSCC_NPM-NEXT:    [[I1:%.*]] = bitcast i32* [[Y]] to i8*
2387; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR9]]
2388; IS__CGSCC_NPM-NEXT:    store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]]
2389; IS__CGSCC_NPM-NEXT:    store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]]
2390; IS__CGSCC_NPM-NEXT:    [[I2:%.*]] = bitcast i32* [[X]] to i8*
2391; IS__CGSCC_NPM-NEXT:    call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]])
2392; IS__CGSCC_NPM-NEXT:    call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]])
2393; IS__CGSCC_NPM-NEXT:    [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]]
2394; IS__CGSCC_NPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0
2395; IS__CGSCC_NPM-NEXT:    [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1
2396; IS__CGSCC_NPM-NEXT:    [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]]
2397; IS__CGSCC_NPM-NEXT:    [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]]
2398; IS__CGSCC_NPM-NEXT:    [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]]
2399; IS__CGSCC_NPM-NEXT:    [[I5:%.*]] = bitcast i32* [[Y]] to i8*
2400; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]])
2401; IS__CGSCC_NPM-NEXT:    [[I6:%.*]] = bitcast i32* [[X]] to i8*
2402; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]])
2403; IS__CGSCC_NPM-NEXT:    ret i32 [[ADD1]]
2404;
2405entry:
2406  %X = alloca i32, align 4
2407  %Y = alloca i32, align 4
2408  %i = bitcast i32* %X to i8*
2409  call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %i)
2410  %i1 = bitcast i32* %Y to i8*
2411  call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %i1)
2412  store i32 1, i32* %Y, align 4, !tbaa !3
2413  store i32 1, i32* %X, align 4, !tbaa !3
2414  %i2 = bitcast i32* %X to i8*
2415  call void @escape(i8* nonnull %i2)
2416  call void @write_random(i32* nonnull %Y)
2417  %i3 = load i32, i32* %X, align 4, !tbaa !3
2418  %tobool.not = icmp eq i32 %i3, 0
2419  %cond = select i1 %tobool.not, i32 2, i32 1
2420  %i4 = load i32, i32* %Y, align 4, !tbaa !3
2421  %add = add nsw i32 %i3, %i4
2422  %add1 = add nsw i32 %add, %cond
2423  %i5 = bitcast i32* %Y to i8*
2424  call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %i5)
2425  %i6 = bitcast i32* %X to i8*
2426  call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %i6)
2427  ret i32 %add1
2428}
2429
2430; We could simplify these if we separate accessed bins wrt. alignment (here mod 4).
2431define i32 @unknown_access_mixed_simplifiable(i32 %arg1, i32 %arg2) {
2432; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
2433; IS__TUNIT____-LABEL: define {{[^@]+}}@unknown_access_mixed_simplifiable
2434; IS__TUNIT____-SAME: (i32 [[ARG1:%.*]], i32 [[ARG2:%.*]]) #[[ATTR3]] {
2435; IS__TUNIT____-NEXT:  entry:
2436; IS__TUNIT____-NEXT:    [[S:%.*]] = alloca [[STRUCT_S:%.*]], align 4
2437; IS__TUNIT____-NEXT:    [[BC:%.*]] = bitcast %struct.S* [[S]] to i32*
2438; IS__TUNIT____-NEXT:    [[GEP1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
2439; IS__TUNIT____-NEXT:    [[GEP2:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG1]]
2440; IS__TUNIT____-NEXT:    [[GEP3:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG2]]
2441; IS__TUNIT____-NEXT:    store i32 7, i32* [[GEP1]], align 4
2442; IS__TUNIT____-NEXT:    store i32 7, i32* [[GEP2]], align 4
2443; IS__TUNIT____-NEXT:    store i32 7, i32* [[GEP3]], align 4
2444; IS__TUNIT____-NEXT:    [[L1:%.*]] = load i32, i32* [[GEP1]], align 4
2445; IS__TUNIT____-NEXT:    [[L2:%.*]] = load i32, i32* [[GEP2]], align 4
2446; IS__TUNIT____-NEXT:    [[L3:%.*]] = load i32, i32* [[GEP3]], align 4
2447; IS__TUNIT____-NEXT:    [[ADD1:%.*]] = add i32 [[L1]], [[L2]]
2448; IS__TUNIT____-NEXT:    [[ADD2:%.*]] = add i32 [[ADD1]], [[L3]]
2449; IS__TUNIT____-NEXT:    ret i32 [[ADD2]]
2450;
2451; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
2452; IS__CGSCC____-LABEL: define {{[^@]+}}@unknown_access_mixed_simplifiable
2453; IS__CGSCC____-SAME: (i32 [[ARG1:%.*]], i32 [[ARG2:%.*]]) #[[ATTR2]] {
2454; IS__CGSCC____-NEXT:  entry:
2455; IS__CGSCC____-NEXT:    [[S:%.*]] = alloca [[STRUCT_S:%.*]], align 4
2456; IS__CGSCC____-NEXT:    [[BC:%.*]] = bitcast %struct.S* [[S]] to i32*
2457; IS__CGSCC____-NEXT:    [[GEP1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
2458; IS__CGSCC____-NEXT:    [[GEP2:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG1]]
2459; IS__CGSCC____-NEXT:    [[GEP3:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG2]]
2460; IS__CGSCC____-NEXT:    store i32 7, i32* [[GEP1]], align 4
2461; IS__CGSCC____-NEXT:    store i32 7, i32* [[GEP2]], align 4
2462; IS__CGSCC____-NEXT:    store i32 7, i32* [[GEP3]], align 4
2463; IS__CGSCC____-NEXT:    [[L1:%.*]] = load i32, i32* [[GEP1]], align 4
2464; IS__CGSCC____-NEXT:    [[L2:%.*]] = load i32, i32* [[GEP2]], align 4
2465; IS__CGSCC____-NEXT:    [[L3:%.*]] = load i32, i32* [[GEP3]], align 4
2466; IS__CGSCC____-NEXT:    [[ADD1:%.*]] = add i32 [[L1]], [[L2]]
2467; IS__CGSCC____-NEXT:    [[ADD2:%.*]] = add i32 [[ADD1]], [[L3]]
2468; IS__CGSCC____-NEXT:    ret i32 [[ADD2]]
2469;
2470entry:
2471  %s = alloca %struct.S, align 4
2472  %bc = bitcast %struct.S* %s to i32*
2473  %gep1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 2
2474  %gep2 = getelementptr inbounds i32, i32* %bc, i32 %arg1
2475  %gep3 = getelementptr inbounds i32, i32* %bc, i32 %arg2
2476  store i32 7, i32* %gep1
2477  store i32 7, i32* %gep2
2478  store i32 7, i32* %gep3
2479  %l1 = load i32, i32* %gep1
2480  %l2 = load i32, i32* %gep2
2481  %l3 = load i32, i32* %gep3
2482  %add1 = add i32 %l1, %l2
2483  %add2 = add i32 %add1, %l3
2484  ret i32 %add2
2485}
2486
2487; The access to bc4b could go anywhere, nothing is simplifiable.
2488define i32 @unknown_access_mixed_not_simplifiable(i32 %arg1, i32 %arg2, i32 %arg3) {
2489; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
2490; IS__TUNIT____-LABEL: define {{[^@]+}}@unknown_access_mixed_not_simplifiable
2491; IS__TUNIT____-SAME: (i32 [[ARG1:%.*]], i32 [[ARG2:%.*]], i32 [[ARG3:%.*]]) #[[ATTR3]] {
2492; IS__TUNIT____-NEXT:  entry:
2493; IS__TUNIT____-NEXT:    [[S:%.*]] = alloca [[STRUCT_S:%.*]], align 4
2494; IS__TUNIT____-NEXT:    [[BC:%.*]] = bitcast %struct.S* [[S]] to i32*
2495; IS__TUNIT____-NEXT:    [[GEP1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
2496; IS__TUNIT____-NEXT:    [[GEP2:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG1]]
2497; IS__TUNIT____-NEXT:    [[GEP3:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG2]]
2498; IS__TUNIT____-NEXT:    [[BC4A:%.*]] = bitcast %struct.S* [[S]] to i8*
2499; IS__TUNIT____-NEXT:    [[GEP4:%.*]] = getelementptr inbounds i8, i8* [[BC4A]], i32 [[ARG3]]
2500; IS__TUNIT____-NEXT:    [[BC4B:%.*]] = bitcast i8* [[GEP4]] to i32*
2501; IS__TUNIT____-NEXT:    store i32 7, i32* [[GEP1]], align 4
2502; IS__TUNIT____-NEXT:    store i32 7, i32* [[GEP2]], align 4
2503; IS__TUNIT____-NEXT:    store i32 7, i32* [[GEP3]], align 4
2504; IS__TUNIT____-NEXT:    store i32 7, i32* [[BC4B]], align 4
2505; IS__TUNIT____-NEXT:    [[L1:%.*]] = load i32, i32* [[GEP1]], align 4
2506; IS__TUNIT____-NEXT:    [[L2:%.*]] = load i32, i32* [[GEP2]], align 4
2507; IS__TUNIT____-NEXT:    [[L3:%.*]] = load i32, i32* [[GEP3]], align 4
2508; IS__TUNIT____-NEXT:    [[L4:%.*]] = load i32, i32* [[BC4B]], align 4
2509; IS__TUNIT____-NEXT:    [[ADD1:%.*]] = add i32 [[L1]], [[L2]]
2510; IS__TUNIT____-NEXT:    [[ADD2:%.*]] = add i32 [[ADD1]], [[L3]]
2511; IS__TUNIT____-NEXT:    [[ADD3:%.*]] = add i32 [[ADD2]], [[L4]]
2512; IS__TUNIT____-NEXT:    ret i32 [[ADD3]]
2513;
2514; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
2515; IS__CGSCC____-LABEL: define {{[^@]+}}@unknown_access_mixed_not_simplifiable
2516; IS__CGSCC____-SAME: (i32 [[ARG1:%.*]], i32 [[ARG2:%.*]], i32 [[ARG3:%.*]]) #[[ATTR2]] {
2517; IS__CGSCC____-NEXT:  entry:
2518; IS__CGSCC____-NEXT:    [[S:%.*]] = alloca [[STRUCT_S:%.*]], align 4
2519; IS__CGSCC____-NEXT:    [[BC:%.*]] = bitcast %struct.S* [[S]] to i32*
2520; IS__CGSCC____-NEXT:    [[GEP1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
2521; IS__CGSCC____-NEXT:    [[GEP2:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG1]]
2522; IS__CGSCC____-NEXT:    [[GEP3:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG2]]
2523; IS__CGSCC____-NEXT:    [[BC4A:%.*]] = bitcast %struct.S* [[S]] to i8*
2524; IS__CGSCC____-NEXT:    [[GEP4:%.*]] = getelementptr inbounds i8, i8* [[BC4A]], i32 [[ARG3]]
2525; IS__CGSCC____-NEXT:    [[BC4B:%.*]] = bitcast i8* [[GEP4]] to i32*
2526; IS__CGSCC____-NEXT:    store i32 7, i32* [[GEP1]], align 4
2527; IS__CGSCC____-NEXT:    store i32 7, i32* [[GEP2]], align 4
2528; IS__CGSCC____-NEXT:    store i32 7, i32* [[GEP3]], align 4
2529; IS__CGSCC____-NEXT:    store i32 7, i32* [[BC4B]], align 4
2530; IS__CGSCC____-NEXT:    [[L1:%.*]] = load i32, i32* [[GEP1]], align 4
2531; IS__CGSCC____-NEXT:    [[L2:%.*]] = load i32, i32* [[GEP2]], align 4
2532; IS__CGSCC____-NEXT:    [[L3:%.*]] = load i32, i32* [[GEP3]], align 4
2533; IS__CGSCC____-NEXT:    [[L4:%.*]] = load i32, i32* [[BC4B]], align 4
2534; IS__CGSCC____-NEXT:    [[ADD1:%.*]] = add i32 [[L1]], [[L2]]
2535; IS__CGSCC____-NEXT:    [[ADD2:%.*]] = add i32 [[ADD1]], [[L3]]
2536; IS__CGSCC____-NEXT:    [[ADD3:%.*]] = add i32 [[ADD2]], [[L4]]
2537; IS__CGSCC____-NEXT:    ret i32 [[ADD3]]
2538;
2539entry:
2540  %s = alloca %struct.S, align 4
2541  %bc = bitcast %struct.S* %s to i32*
2542  %gep1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 2
2543  %gep2 = getelementptr inbounds i32, i32* %bc, i32 %arg1
2544  %gep3 = getelementptr inbounds i32, i32* %bc, i32 %arg2
2545  %bc4a = bitcast %struct.S* %s to i8*
2546  %gep4 = getelementptr inbounds i8, i8* %bc4a, i32 %arg3
2547  %bc4b = bitcast i8* %gep4 to i32*
2548  store i32 7, i32* %gep1
2549  store i32 7, i32* %gep2
2550  store i32 7, i32* %gep3
2551  store i32 7, i32* %bc4b
2552  %l1 = load i32, i32* %gep1
2553  %l2 = load i32, i32* %gep2
2554  %l3 = load i32, i32* %gep3
2555  %l4 = load i32, i32* %bc4b
2556  %add1 = add i32 %l1, %l2
2557  %add2 = add i32 %add1, %l3
2558  %add3 = add i32 %add2, %l4
2559  ret i32 %add3
2560}
2561
2562declare void @escape(i8*)
2563
2564;    int Flag0 = 0;
2565;    int global_not_simplifiable_1(int cnd) {
2566;      return Flag0;
2567;    }
2568;
2569define i32 @global_not_simplifiable_1(i32 %cnd) {
2570; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readonly willreturn
2571; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@global_not_simplifiable_1
2572; IS__TUNIT_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR7:[0-9]+]] {
2573; IS__TUNIT_OPM-NEXT:  entry:
2574; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = load i32, i32* @Flag0, align 4, !tbaa [[TBAA3]]
2575; IS__TUNIT_OPM-NEXT:    ret i32 [[I]]
2576;
2577; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readonly willreturn
2578; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@global_not_simplifiable_1
2579; IS__TUNIT_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR5:[0-9]+]] {
2580; IS__TUNIT_NPM-NEXT:  entry:
2581; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = load i32, i32* @Flag0, align 4, !tbaa [[TBAA3]]
2582; IS__TUNIT_NPM-NEXT:    ret i32 [[I]]
2583;
2584; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
2585; IS__CGSCC____-LABEL: define {{[^@]+}}@global_not_simplifiable_1
2586; IS__CGSCC____-SAME: (i32 [[CND:%.*]]) #[[ATTR7:[0-9]+]] {
2587; IS__CGSCC____-NEXT:  entry:
2588; IS__CGSCC____-NEXT:    [[I:%.*]] = load i32, i32* @Flag0, align 4, !tbaa [[TBAA3]]
2589; IS__CGSCC____-NEXT:    ret i32 [[I]]
2590;
2591entry:
2592  %i = load i32, i32* @Flag0, align 4, !tbaa !3
2593  ret i32 %i
2594}
2595
2596;    static int Flag1 __attribute__((loader_uninitialized));
2597;    int static_global_not_simplifiable_1(int cnd) {
2598;      int v = Flag1;
2599;      sync();
2600;      if (cnd)
2601;        Flag1 = 1;
2602;      return v;
2603;    }
2604;
2605define i32 @static_global_not_simplifiable_1(i32 %cnd) {
2606; CHECK-LABEL: define {{[^@]+}}@static_global_not_simplifiable_1
2607; CHECK-SAME: (i32 [[CND:%.*]]) {
2608; CHECK-NEXT:  entry:
2609; CHECK-NEXT:    call void @sync()
2610; CHECK-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
2611; CHECK-NEXT:    br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
2612; CHECK:       if.then:
2613; CHECK-NEXT:    store i32 1, i32* @Flag1, align 4, !tbaa [[TBAA3]]
2614; CHECK-NEXT:    br label [[IF_END]]
2615; CHECK:       if.end:
2616; CHECK-NEXT:    ret i32 1
2617;
2618entry:
2619  %i = load i32, i32* @Flag1, align 4, !tbaa !3
2620  call void @sync()
2621  %tobool.not = icmp eq i32 %cnd, 0
2622  br i1 %tobool.not, label %if.end, label %if.then
2623
2624if.then:                                          ; preds = %entry
2625  store i32 1, i32* @Flag1, align 4, !tbaa !3
2626  br label %if.end
2627
2628if.end:                                           ; preds = %if.then, %entry
2629  ret i32 %i
2630}
2631
2632declare void @sync()
2633
2634;    static int Flag2 __attribute__((loader_uninitialized));
2635;    int static_global_not_simplifiable_2(int cnd) {
2636;      Flag2 = 1;
2637;      sync();
2638;      int v = Flag2;
2639;      Flag2 = 2;
2640;      return v;
2641;    }
2642define i32 @static_global_not_simplifiable_2(i32 %cnd) {
2643; CHECK-LABEL: define {{[^@]+}}@static_global_not_simplifiable_2
2644; CHECK-SAME: (i32 [[CND:%.*]]) {
2645; CHECK-NEXT:  entry:
2646; CHECK-NEXT:    store i32 1, i32* @Flag2, align 4, !tbaa [[TBAA3]]
2647; CHECK-NEXT:    call void @sync()
2648; CHECK-NEXT:    [[I:%.*]] = load i32, i32* @Flag2, align 4, !tbaa [[TBAA3]]
2649; CHECK-NEXT:    store i32 2, i32* @Flag2, align 4, !tbaa [[TBAA3]]
2650; CHECK-NEXT:    ret i32 [[I]]
2651;
2652entry:
2653  store i32 1, i32* @Flag2, align 4, !tbaa !3
2654  call void @sync()
2655  %i = load i32, i32* @Flag2, align 4, !tbaa !3
2656  store i32 2, i32* @Flag2, align 4, !tbaa !3
2657  ret i32 %i
2658}
2659
2660;    int write_read{,_static,_static_undef}_global(void) {
2661;      Gint{,static,_static_undef}1 = 7;
2662;      return Gint1;
2663;    }
2664;    void write{,_static,_static_undef}_global(void) {
2665;      Gint{,static,_static_undef}2 = 7;
2666;    }
2667;    int read{,_static,_static_undef}_global(void) {
2668;      return Gint{,static,_static_undef}2;
2669;    }
2670;
2671; FIXME: We could replace these loads.
2672define i32 @write_read_global() {
2673; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn
2674; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_read_global
2675; IS__TUNIT_OPM-SAME: () #[[ATTR4]] {
2676; IS__TUNIT_OPM-NEXT:    store i32 7, i32* @Gint1, align 4
2677; IS__TUNIT_OPM-NEXT:    [[L:%.*]] = load i32, i32* @Gint1, align 4
2678; IS__TUNIT_OPM-NEXT:    ret i32 [[L]]
2679;
2680; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
2681; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_read_global
2682; IS__TUNIT_NPM-SAME: () #[[ATTR2]] {
2683; IS__TUNIT_NPM-NEXT:    store i32 7, i32* @Gint1, align 4
2684; IS__TUNIT_NPM-NEXT:    [[L:%.*]] = load i32, i32* @Gint1, align 4
2685; IS__TUNIT_NPM-NEXT:    ret i32 [[L]]
2686;
2687; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn
2688; IS__CGSCC____-LABEL: define {{[^@]+}}@write_read_global
2689; IS__CGSCC____-SAME: () #[[ATTR5]] {
2690; IS__CGSCC____-NEXT:    store i32 7, i32* @Gint1, align 4
2691; IS__CGSCC____-NEXT:    [[L:%.*]] = load i32, i32* @Gint1, align 4
2692; IS__CGSCC____-NEXT:    ret i32 [[L]]
2693;
2694  store i32 7, i32* @Gint1
2695  %l = load i32, i32* @Gint1
2696  ret i32 %l
2697}
2698define void @write_global() {
2699; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn writeonly
2700; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_global
2701; IS__TUNIT_OPM-SAME: () #[[ATTR5]] {
2702; IS__TUNIT_OPM-NEXT:    store i32 7, i32* @Gint2, align 4
2703; IS__TUNIT_OPM-NEXT:    ret void
2704;
2705; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly
2706; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_global
2707; IS__TUNIT_NPM-SAME: () #[[ATTR4]] {
2708; IS__TUNIT_NPM-NEXT:    store i32 7, i32* @Gint2, align 4
2709; IS__TUNIT_NPM-NEXT:    ret void
2710;
2711; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
2712; IS__CGSCC____-LABEL: define {{[^@]+}}@write_global
2713; IS__CGSCC____-SAME: () #[[ATTR4:[0-9]+]] {
2714; IS__CGSCC____-NEXT:    store i32 7, i32* @Gint2, align 4
2715; IS__CGSCC____-NEXT:    ret void
2716;
2717  store i32 7, i32* @Gint2
2718  ret void
2719}
2720define i32 @read_global() {
2721; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readonly willreturn
2722; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@read_global
2723; IS__TUNIT_OPM-SAME: () #[[ATTR7]] {
2724; IS__TUNIT_OPM-NEXT:    [[L:%.*]] = load i32, i32* @Gint2, align 4
2725; IS__TUNIT_OPM-NEXT:    ret i32 [[L]]
2726;
2727; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readonly willreturn
2728; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@read_global
2729; IS__TUNIT_NPM-SAME: () #[[ATTR5]] {
2730; IS__TUNIT_NPM-NEXT:    [[L:%.*]] = load i32, i32* @Gint2, align 4
2731; IS__TUNIT_NPM-NEXT:    ret i32 [[L]]
2732;
2733; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
2734; IS__CGSCC____-LABEL: define {{[^@]+}}@read_global
2735; IS__CGSCC____-SAME: () #[[ATTR7]] {
2736; IS__CGSCC____-NEXT:    [[L:%.*]] = load i32, i32* @Gint2, align 4
2737; IS__CGSCC____-NEXT:    ret i32 [[L]]
2738;
2739  %l = load i32, i32* @Gint2
2740  ret i32 %l
2741}
2742; FIXME: We could replace these loads.
2743define i32 @write_read_static_global() {
2744; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn
2745; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_read_static_global
2746; IS__TUNIT_OPM-SAME: () #[[ATTR4]] {
2747; IS__TUNIT_OPM-NEXT:    store i32 7, i32* @Gstatic_int1, align 4
2748; IS__TUNIT_OPM-NEXT:    [[L:%.*]] = load i32, i32* @Gstatic_int1, align 4
2749; IS__TUNIT_OPM-NEXT:    ret i32 [[L]]
2750;
2751; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
2752; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_read_static_global
2753; IS__TUNIT_NPM-SAME: () #[[ATTR2]] {
2754; IS__TUNIT_NPM-NEXT:    store i32 7, i32* @Gstatic_int1, align 4
2755; IS__TUNIT_NPM-NEXT:    [[L:%.*]] = load i32, i32* @Gstatic_int1, align 4
2756; IS__TUNIT_NPM-NEXT:    ret i32 [[L]]
2757;
2758; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn
2759; IS__CGSCC____-LABEL: define {{[^@]+}}@write_read_static_global
2760; IS__CGSCC____-SAME: () #[[ATTR5]] {
2761; IS__CGSCC____-NEXT:    store i32 7, i32* @Gstatic_int1, align 4
2762; IS__CGSCC____-NEXT:    [[L:%.*]] = load i32, i32* @Gstatic_int1, align 4
2763; IS__CGSCC____-NEXT:    ret i32 [[L]]
2764;
2765  store i32 7, i32* @Gstatic_int1
2766  %l = load i32, i32* @Gstatic_int1
2767  ret i32 %l
2768}
2769define void @write_static_global() {
2770; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn writeonly
2771; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_static_global
2772; IS__TUNIT_OPM-SAME: () #[[ATTR5]] {
2773; IS__TUNIT_OPM-NEXT:    store i32 7, i32* @Gstatic_int2, align 4
2774; IS__TUNIT_OPM-NEXT:    ret void
2775;
2776; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly
2777; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_static_global
2778; IS__TUNIT_NPM-SAME: () #[[ATTR4]] {
2779; IS__TUNIT_NPM-NEXT:    store i32 7, i32* @Gstatic_int2, align 4
2780; IS__TUNIT_NPM-NEXT:    ret void
2781;
2782; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
2783; IS__CGSCC____-LABEL: define {{[^@]+}}@write_static_global
2784; IS__CGSCC____-SAME: () #[[ATTR4]] {
2785; IS__CGSCC____-NEXT:    store i32 7, i32* @Gstatic_int2, align 4
2786; IS__CGSCC____-NEXT:    ret void
2787;
2788  store i32 7, i32* @Gstatic_int2
2789  ret void
2790}
2791define i32 @read_static_global() {
2792; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readonly willreturn
2793; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@read_static_global
2794; IS__TUNIT_OPM-SAME: () #[[ATTR7]] {
2795; IS__TUNIT_OPM-NEXT:    [[L:%.*]] = load i32, i32* @Gstatic_int2, align 4
2796; IS__TUNIT_OPM-NEXT:    ret i32 [[L]]
2797;
2798; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readonly willreturn
2799; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@read_static_global
2800; IS__TUNIT_NPM-SAME: () #[[ATTR5]] {
2801; IS__TUNIT_NPM-NEXT:    [[L:%.*]] = load i32, i32* @Gstatic_int2, align 4
2802; IS__TUNIT_NPM-NEXT:    ret i32 [[L]]
2803;
2804; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
2805; IS__CGSCC____-LABEL: define {{[^@]+}}@read_static_global
2806; IS__CGSCC____-SAME: () #[[ATTR7]] {
2807; IS__CGSCC____-NEXT:    [[L:%.*]] = load i32, i32* @Gstatic_int2, align 4
2808; IS__CGSCC____-NEXT:    ret i32 [[L]]
2809;
2810  %l = load i32, i32* @Gstatic_int2
2811  ret i32 %l
2812}
2813define i32 @write_read_static_undef_global() {
2814; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn writeonly
2815; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_read_static_undef_global
2816; IS__TUNIT_OPM-SAME: () #[[ATTR5]] {
2817; IS__TUNIT_OPM-NEXT:    ret i32 7
2818;
2819; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly
2820; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_read_static_undef_global
2821; IS__TUNIT_NPM-SAME: () #[[ATTR4]] {
2822; IS__TUNIT_NPM-NEXT:    ret i32 7
2823;
2824; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
2825; IS__CGSCC____-LABEL: define {{[^@]+}}@write_read_static_undef_global
2826; IS__CGSCC____-SAME: () #[[ATTR4]] {
2827; IS__CGSCC____-NEXT:    ret i32 7
2828;
2829  store i32 7, i32* @Gstatic_undef_int1
2830  %l = load i32, i32* @Gstatic_undef_int1
2831  ret i32 %l
2832}
2833define void @write_static_undef_global() {
2834; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn writeonly
2835; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_static_undef_global
2836; IS__TUNIT_OPM-SAME: () #[[ATTR5]] {
2837; IS__TUNIT_OPM-NEXT:    ret void
2838;
2839; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly
2840; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_static_undef_global
2841; IS__TUNIT_NPM-SAME: () #[[ATTR4]] {
2842; IS__TUNIT_NPM-NEXT:    ret void
2843;
2844; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
2845; IS__CGSCC____-LABEL: define {{[^@]+}}@write_static_undef_global
2846; IS__CGSCC____-SAME: () #[[ATTR4]] {
2847; IS__CGSCC____-NEXT:    store i32 7, i32* @Gstatic_undef_int2, align 4
2848; IS__CGSCC____-NEXT:    ret void
2849;
2850  store i32 7, i32* @Gstatic_undef_int2
2851  ret void
2852}
2853define i32 @read_static_undef_global() {
2854; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
2855; IS__TUNIT____-LABEL: define {{[^@]+}}@read_static_undef_global
2856; IS__TUNIT____-SAME: () #[[ATTR3]] {
2857; IS__TUNIT____-NEXT:    ret i32 7
2858;
2859; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
2860; IS__CGSCC____-LABEL: define {{[^@]+}}@read_static_undef_global
2861; IS__CGSCC____-SAME: () #[[ATTR2]] {
2862; IS__CGSCC____-NEXT:    ret i32 7
2863;
2864  %l = load i32, i32* @Gstatic_undef_int2
2865  ret i32 %l
2866}
2867
2868define i32 @single_read_of_static_global() {
2869; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
2870; IS__TUNIT____-LABEL: define {{[^@]+}}@single_read_of_static_global
2871; IS__TUNIT____-SAME: () #[[ATTR3]] {
2872; IS__TUNIT____-NEXT:    ret i32 0
2873;
2874; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
2875; IS__CGSCC____-LABEL: define {{[^@]+}}@single_read_of_static_global
2876; IS__CGSCC____-SAME: () #[[ATTR2]] {
2877; IS__CGSCC____-NEXT:    ret i32 0
2878;
2879  %l = load i32, i32* @Gstatic_int3
2880  ret i32 %l
2881}
2882
2883define i8 @phi_store() {
2884; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone
2885; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@phi_store
2886; IS__TUNIT_OPM-SAME: () #[[ATTR8:[0-9]+]] {
2887; IS__TUNIT_OPM-NEXT:  entry:
2888; IS__TUNIT_OPM-NEXT:    [[A:%.*]] = alloca i16, align 2
2889; IS__TUNIT_OPM-NEXT:    [[B:%.*]] = bitcast i16* [[A]] to i8*
2890; IS__TUNIT_OPM-NEXT:    br label [[LOOP:%.*]]
2891; IS__TUNIT_OPM:       loop:
2892; IS__TUNIT_OPM-NEXT:    [[P:%.*]] = phi i8* [ [[B]], [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
2893; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
2894; IS__TUNIT_OPM-NEXT:    [[G]] = getelementptr i8, i8* [[P]], i64 1
2895; IS__TUNIT_OPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
2896; IS__TUNIT_OPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 2
2897; IS__TUNIT_OPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
2898; IS__TUNIT_OPM:       end:
2899; IS__TUNIT_OPM-NEXT:    [[S:%.*]] = getelementptr i8, i8* [[B]], i64 1
2900; IS__TUNIT_OPM-NEXT:    [[L:%.*]] = load i8, i8* [[S]], align 1
2901; IS__TUNIT_OPM-NEXT:    ret i8 [[L]]
2902;
2903; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
2904; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@phi_store
2905; IS__TUNIT_NPM-SAME: () #[[ATTR3]] {
2906; IS__TUNIT_NPM-NEXT:  entry:
2907; IS__TUNIT_NPM-NEXT:    [[A:%.*]] = alloca i16, align 2
2908; IS__TUNIT_NPM-NEXT:    [[B:%.*]] = bitcast i16* [[A]] to i8*
2909; IS__TUNIT_NPM-NEXT:    br label [[LOOP:%.*]]
2910; IS__TUNIT_NPM:       loop:
2911; IS__TUNIT_NPM-NEXT:    [[P:%.*]] = phi i8* [ [[B]], [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
2912; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
2913; IS__TUNIT_NPM-NEXT:    [[G]] = getelementptr i8, i8* [[P]], i64 1
2914; IS__TUNIT_NPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
2915; IS__TUNIT_NPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 2
2916; IS__TUNIT_NPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
2917; IS__TUNIT_NPM:       end:
2918; IS__TUNIT_NPM-NEXT:    [[S:%.*]] = getelementptr i8, i8* [[B]], i64 1
2919; IS__TUNIT_NPM-NEXT:    [[L:%.*]] = load i8, i8* [[S]], align 1
2920; IS__TUNIT_NPM-NEXT:    ret i8 [[L]]
2921;
2922; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone
2923; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@phi_store
2924; IS__CGSCC_OPM-SAME: () #[[ATTR8:[0-9]+]] {
2925; IS__CGSCC_OPM-NEXT:  entry:
2926; IS__CGSCC_OPM-NEXT:    [[A:%.*]] = alloca i16, align 2
2927; IS__CGSCC_OPM-NEXT:    [[B:%.*]] = bitcast i16* [[A]] to i8*
2928; IS__CGSCC_OPM-NEXT:    br label [[LOOP:%.*]]
2929; IS__CGSCC_OPM:       loop:
2930; IS__CGSCC_OPM-NEXT:    [[P:%.*]] = phi i8* [ [[B]], [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
2931; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
2932; IS__CGSCC_OPM-NEXT:    [[G]] = getelementptr i8, i8* [[P]], i64 1
2933; IS__CGSCC_OPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
2934; IS__CGSCC_OPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 2
2935; IS__CGSCC_OPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
2936; IS__CGSCC_OPM:       end:
2937; IS__CGSCC_OPM-NEXT:    [[S:%.*]] = getelementptr i8, i8* [[B]], i64 1
2938; IS__CGSCC_OPM-NEXT:    [[L:%.*]] = load i8, i8* [[S]], align 1
2939; IS__CGSCC_OPM-NEXT:    ret i8 [[L]]
2940;
2941; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
2942; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi_store
2943; IS__CGSCC_NPM-SAME: () #[[ATTR2]] {
2944; IS__CGSCC_NPM-NEXT:  entry:
2945; IS__CGSCC_NPM-NEXT:    [[A:%.*]] = alloca i16, align 2
2946; IS__CGSCC_NPM-NEXT:    [[B:%.*]] = bitcast i16* [[A]] to i8*
2947; IS__CGSCC_NPM-NEXT:    br label [[LOOP:%.*]]
2948; IS__CGSCC_NPM:       loop:
2949; IS__CGSCC_NPM-NEXT:    [[P:%.*]] = phi i8* [ [[B]], [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
2950; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
2951; IS__CGSCC_NPM-NEXT:    [[G]] = getelementptr i8, i8* [[P]], i64 1
2952; IS__CGSCC_NPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
2953; IS__CGSCC_NPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 2
2954; IS__CGSCC_NPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
2955; IS__CGSCC_NPM:       end:
2956; IS__CGSCC_NPM-NEXT:    [[S:%.*]] = getelementptr i8, i8* [[B]], i64 1
2957; IS__CGSCC_NPM-NEXT:    [[L:%.*]] = load i8, i8* [[S]], align 1
2958; IS__CGSCC_NPM-NEXT:    ret i8 [[L]]
2959;
2960entry:
2961  %a = alloca i16
2962  %b = bitcast i16* %a to i8*
2963  br label %loop
2964loop:
2965  %p = phi i8* [%b, %entry], [%g, %loop]
2966  %i = phi i8 [0, %entry], [%o, %loop]
2967  store i8 1, i8* %p
2968  %g = getelementptr i8, i8* %p, i64 1
2969  %o = add nsw i8 %i, 1
2970  %c = icmp eq i8 %o, 2
2971  br i1 %c, label %end, label %loop
2972end:
2973  %s = getelementptr i8, i8* %b, i64 1
2974  %l = load i8, i8* %s
2975  ret i8 %l
2976}
2977
2978; FIXME: This function returns 1.
2979define i8 @phi_no_store_1() {
2980; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind
2981; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@phi_no_store_1
2982; IS__TUNIT_OPM-SAME: () #[[ATTR2]] {
2983; IS__TUNIT_OPM-NEXT:  entry:
2984; IS__TUNIT_OPM-NEXT:    br label [[LOOP:%.*]]
2985; IS__TUNIT_OPM:       loop:
2986; IS__TUNIT_OPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a1 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
2987; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
2988; IS__TUNIT_OPM-NEXT:    [[G]] = getelementptr i8, i8* [[P]], i64 1
2989; IS__TUNIT_OPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
2990; IS__TUNIT_OPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 3
2991; IS__TUNIT_OPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
2992; IS__TUNIT_OPM:       end:
2993; IS__TUNIT_OPM-NEXT:    [[L11:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 2), align 2
2994; IS__TUNIT_OPM-NEXT:    [[L12:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 3), align 1
2995; IS__TUNIT_OPM-NEXT:    [[ADD:%.*]] = add i8 [[L11]], [[L12]]
2996; IS__TUNIT_OPM-NEXT:    ret i8 [[ADD]]
2997;
2998; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
2999; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@phi_no_store_1
3000; IS__TUNIT_NPM-SAME: () #[[ATTR2]] {
3001; IS__TUNIT_NPM-NEXT:  entry:
3002; IS__TUNIT_NPM-NEXT:    br label [[LOOP:%.*]]
3003; IS__TUNIT_NPM:       loop:
3004; IS__TUNIT_NPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a1 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
3005; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
3006; IS__TUNIT_NPM-NEXT:    [[G]] = getelementptr i8, i8* [[P]], i64 1
3007; IS__TUNIT_NPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
3008; IS__TUNIT_NPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 3
3009; IS__TUNIT_NPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
3010; IS__TUNIT_NPM:       end:
3011; IS__TUNIT_NPM-NEXT:    [[L11:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 2), align 2
3012; IS__TUNIT_NPM-NEXT:    [[L12:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 3), align 1
3013; IS__TUNIT_NPM-NEXT:    [[ADD:%.*]] = add i8 [[L11]], [[L12]]
3014; IS__TUNIT_NPM-NEXT:    ret i8 [[ADD]]
3015;
3016; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind
3017; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@phi_no_store_1
3018; IS__CGSCC_OPM-SAME: () #[[ATTR9:[0-9]+]] {
3019; IS__CGSCC_OPM-NEXT:  entry:
3020; IS__CGSCC_OPM-NEXT:    br label [[LOOP:%.*]]
3021; IS__CGSCC_OPM:       loop:
3022; IS__CGSCC_OPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a1 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
3023; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
3024; IS__CGSCC_OPM-NEXT:    [[G]] = getelementptr i8, i8* [[P]], i64 1
3025; IS__CGSCC_OPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
3026; IS__CGSCC_OPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 3
3027; IS__CGSCC_OPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
3028; IS__CGSCC_OPM:       end:
3029; IS__CGSCC_OPM-NEXT:    [[L11:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 2), align 2
3030; IS__CGSCC_OPM-NEXT:    [[L12:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 3), align 1
3031; IS__CGSCC_OPM-NEXT:    [[ADD:%.*]] = add i8 [[L11]], [[L12]]
3032; IS__CGSCC_OPM-NEXT:    ret i8 [[ADD]]
3033;
3034; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
3035; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi_no_store_1
3036; IS__CGSCC_NPM-SAME: () #[[ATTR5]] {
3037; IS__CGSCC_NPM-NEXT:  entry:
3038; IS__CGSCC_NPM-NEXT:    br label [[LOOP:%.*]]
3039; IS__CGSCC_NPM:       loop:
3040; IS__CGSCC_NPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a1 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
3041; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
3042; IS__CGSCC_NPM-NEXT:    [[G]] = getelementptr i8, i8* [[P]], i64 1
3043; IS__CGSCC_NPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
3044; IS__CGSCC_NPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 3
3045; IS__CGSCC_NPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
3046; IS__CGSCC_NPM:       end:
3047; IS__CGSCC_NPM-NEXT:    [[L11:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 2), align 2
3048; IS__CGSCC_NPM-NEXT:    [[L12:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 3), align 1
3049; IS__CGSCC_NPM-NEXT:    [[ADD:%.*]] = add i8 [[L11]], [[L12]]
3050; IS__CGSCC_NPM-NEXT:    ret i8 [[ADD]]
3051;
3052entry:
3053  %b = bitcast i32* @a1 to i8*
3054  br label %loop
3055loop:
3056  %p = phi i8* [%b, %entry], [%g, %loop]
3057  %i = phi i8 [0, %entry], [%o, %loop]
3058  store i8 1, i8* %p
3059  %g = getelementptr i8, i8* %p, i64 1
3060  %o = add nsw i8 %i, 1
3061  %c = icmp eq i8 %o, 3
3062  br i1 %c, label %end, label %loop
3063end:
3064  %s11 = getelementptr i8, i8* %b, i64 2
3065  %l11 = load i8, i8* %s11
3066  %s12 = getelementptr i8, i8* %b, i64 3
3067  %l12 = load i8, i8* %s12
3068  %add = add i8 %l11, %l12
3069  ret i8 %add
3070}
3071
3072; FIXME: This function returns 1.
3073define i8 @phi_no_store_2() {
3074; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind
3075; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@phi_no_store_2
3076; IS__TUNIT_OPM-SAME: () #[[ATTR2]] {
3077; IS__TUNIT_OPM-NEXT:  entry:
3078; IS__TUNIT_OPM-NEXT:    br label [[LOOP:%.*]]
3079; IS__TUNIT_OPM:       loop:
3080; IS__TUNIT_OPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), [[LOOP]] ]
3081; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
3082; IS__TUNIT_OPM-NEXT:    store i8 1, i8* [[P]], align 2
3083; IS__TUNIT_OPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
3084; IS__TUNIT_OPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 7
3085; IS__TUNIT_OPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
3086; IS__TUNIT_OPM:       end:
3087; IS__TUNIT_OPM-NEXT:    [[L21:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), align 2
3088; IS__TUNIT_OPM-NEXT:    [[ADD:%.*]] = add i8 [[L21]], 0
3089; IS__TUNIT_OPM-NEXT:    ret i8 [[ADD]]
3090;
3091; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
3092; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@phi_no_store_2
3093; IS__TUNIT_NPM-SAME: () #[[ATTR2]] {
3094; IS__TUNIT_NPM-NEXT:  entry:
3095; IS__TUNIT_NPM-NEXT:    br label [[LOOP:%.*]]
3096; IS__TUNIT_NPM:       loop:
3097; IS__TUNIT_NPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), [[LOOP]] ]
3098; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
3099; IS__TUNIT_NPM-NEXT:    store i8 1, i8* [[P]], align 2
3100; IS__TUNIT_NPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
3101; IS__TUNIT_NPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 7
3102; IS__TUNIT_NPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
3103; IS__TUNIT_NPM:       end:
3104; IS__TUNIT_NPM-NEXT:    [[L21:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), align 2
3105; IS__TUNIT_NPM-NEXT:    ret i8 [[L21]]
3106;
3107; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind
3108; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@phi_no_store_2
3109; IS__CGSCC_OPM-SAME: () #[[ATTR9]] {
3110; IS__CGSCC_OPM-NEXT:  entry:
3111; IS__CGSCC_OPM-NEXT:    br label [[LOOP:%.*]]
3112; IS__CGSCC_OPM:       loop:
3113; IS__CGSCC_OPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), [[LOOP]] ]
3114; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
3115; IS__CGSCC_OPM-NEXT:    store i8 1, i8* [[P]], align 2
3116; IS__CGSCC_OPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
3117; IS__CGSCC_OPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 7
3118; IS__CGSCC_OPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
3119; IS__CGSCC_OPM:       end:
3120; IS__CGSCC_OPM-NEXT:    [[L21:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), align 2
3121; IS__CGSCC_OPM-NEXT:    [[ADD:%.*]] = add i8 [[L21]], 0
3122; IS__CGSCC_OPM-NEXT:    ret i8 [[ADD]]
3123;
3124; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
3125; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi_no_store_2
3126; IS__CGSCC_NPM-SAME: () #[[ATTR5]] {
3127; IS__CGSCC_NPM-NEXT:  entry:
3128; IS__CGSCC_NPM-NEXT:    br label [[LOOP:%.*]]
3129; IS__CGSCC_NPM:       loop:
3130; IS__CGSCC_NPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), [[LOOP]] ]
3131; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
3132; IS__CGSCC_NPM-NEXT:    store i8 1, i8* [[P]], align 2
3133; IS__CGSCC_NPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
3134; IS__CGSCC_NPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 7
3135; IS__CGSCC_NPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
3136; IS__CGSCC_NPM:       end:
3137; IS__CGSCC_NPM-NEXT:    [[L21:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), align 2
3138; IS__CGSCC_NPM-NEXT:    ret i8 [[L21]]
3139;
3140entry:
3141  %b = bitcast i32* @a2 to i8*
3142  br label %loop
3143loop:
3144  %p = phi i8* [%b, %entry], [%g, %loop]
3145  %i = phi i8 [0, %entry], [%o, %loop]
3146  store i8 1, i8* %p
3147  %g = getelementptr i8, i8* %b, i64 2
3148  %o = add nsw i8 %i, 1
3149  %c = icmp eq i8 %o, 7
3150  br i1 %c, label %end, label %loop
3151end:
3152  %s21 = getelementptr i8, i8* %b, i64 2
3153  %l21 = load i8, i8* %s21
3154  %s22 = getelementptr i8, i8* %b, i64 3
3155  %l22 = load i8, i8* %s22
3156  %add = add i8 %l21, %l22
3157  ret i8 %add
3158}
3159
3160define i8 @phi_no_store_3() {
3161; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind writeonly
3162; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@phi_no_store_3
3163; IS__TUNIT_OPM-SAME: () #[[ATTR6]] {
3164; IS__TUNIT_OPM-NEXT:  entry:
3165; IS__TUNIT_OPM-NEXT:    br label [[LOOP:%.*]]
3166; IS__TUNIT_OPM:       loop:
3167; IS__TUNIT_OPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a3 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 2), [[LOOP]] ]
3168; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
3169; IS__TUNIT_OPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
3170; IS__TUNIT_OPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 7
3171; IS__TUNIT_OPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
3172; IS__TUNIT_OPM:       end:
3173; IS__TUNIT_OPM-NEXT:    ret i8 1
3174;
3175; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly
3176; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@phi_no_store_3
3177; IS__TUNIT_NPM-SAME: () #[[ATTR4]] {
3178; IS__TUNIT_NPM-NEXT:  entry:
3179; IS__TUNIT_NPM-NEXT:    br label [[LOOP:%.*]]
3180; IS__TUNIT_NPM:       loop:
3181; IS__TUNIT_NPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a3 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 2), [[LOOP]] ]
3182; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
3183; IS__TUNIT_NPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
3184; IS__TUNIT_NPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 7
3185; IS__TUNIT_NPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
3186; IS__TUNIT_NPM:       end:
3187; IS__TUNIT_NPM-NEXT:    ret i8 1
3188;
3189; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind writeonly
3190; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@phi_no_store_3
3191; IS__CGSCC_OPM-SAME: () #[[ATTR10:[0-9]+]] {
3192; IS__CGSCC_OPM-NEXT:  entry:
3193; IS__CGSCC_OPM-NEXT:    br label [[LOOP:%.*]]
3194; IS__CGSCC_OPM:       loop:
3195; IS__CGSCC_OPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a3 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 2), [[LOOP]] ]
3196; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
3197; IS__CGSCC_OPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
3198; IS__CGSCC_OPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 7
3199; IS__CGSCC_OPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
3200; IS__CGSCC_OPM:       end:
3201; IS__CGSCC_OPM-NEXT:    ret i8 1
3202;
3203; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
3204; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi_no_store_3
3205; IS__CGSCC_NPM-SAME: () #[[ATTR4]] {
3206; IS__CGSCC_NPM-NEXT:  entry:
3207; IS__CGSCC_NPM-NEXT:    br label [[LOOP:%.*]]
3208; IS__CGSCC_NPM:       loop:
3209; IS__CGSCC_NPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a3 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 2), [[LOOP]] ]
3210; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
3211; IS__CGSCC_NPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
3212; IS__CGSCC_NPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 7
3213; IS__CGSCC_NPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
3214; IS__CGSCC_NPM:       end:
3215; IS__CGSCC_NPM-NEXT:    ret i8 1
3216;
3217entry:
3218  %b = bitcast i32* @a3 to i8*
3219  %s30 = getelementptr i8, i8* %b, i64 3
3220  store i8 0, i8* %s30
3221  br label %loop
3222loop:
3223  %p = phi i8* [%b, %entry], [%g, %loop]
3224  %i = phi i8 [0, %entry], [%o, %loop]
3225  store i8 1, i8* %p
3226  %g = getelementptr i8, i8* %b, i64 2
3227  %o = add nsw i8 %i, 1
3228  %c = icmp eq i8 %o, 7
3229  br i1 %c, label %end, label %loop
3230end:
3231  %s31 = getelementptr i8, i8* %b, i64 2
3232  %l31 = load i8, i8* %s31
3233  %s32 = getelementptr i8, i8* %b, i64 3
3234  %l32 = load i8, i8* %s32
3235  %add = add i8 %l31, %l32
3236  ret i8 %add
3237}
3238
3239define i8 @cast_and_load_1() {
3240; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn
3241; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@cast_and_load_1
3242; IS__TUNIT_OPM-SAME: () #[[ATTR4]] {
3243; IS__TUNIT_OPM-NEXT:    store i32 42, i32* @bytes1, align 4
3244; IS__TUNIT_OPM-NEXT:    [[L:%.*]] = load i8, i8* bitcast (i32* @bytes1 to i8*), align 4
3245; IS__TUNIT_OPM-NEXT:    ret i8 [[L]]
3246;
3247; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
3248; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@cast_and_load_1
3249; IS__TUNIT_NPM-SAME: () #[[ATTR2]] {
3250; IS__TUNIT_NPM-NEXT:    store i32 42, i32* @bytes1, align 4
3251; IS__TUNIT_NPM-NEXT:    [[L:%.*]] = load i8, i8* bitcast (i32* @bytes1 to i8*), align 4
3252; IS__TUNIT_NPM-NEXT:    ret i8 [[L]]
3253;
3254; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn
3255; IS__CGSCC____-LABEL: define {{[^@]+}}@cast_and_load_1
3256; IS__CGSCC____-SAME: () #[[ATTR5]] {
3257; IS__CGSCC____-NEXT:    store i32 42, i32* @bytes1, align 4
3258; IS__CGSCC____-NEXT:    [[L:%.*]] = load i8, i8* bitcast (i32* @bytes1 to i8*), align 4
3259; IS__CGSCC____-NEXT:    ret i8 [[L]]
3260;
3261  store i32 42, i32* @bytes1
3262  %bc = bitcast i32* @bytes1 to i8*
3263  %l = load i8, i8* %bc
3264  ret i8 %l
3265}
3266
3267define i64 @cast_and_load_2() {
3268; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn
3269; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@cast_and_load_2
3270; IS__TUNIT_OPM-SAME: () #[[ATTR4]] {
3271; IS__TUNIT_OPM-NEXT:    store i32 42, i32* @bytes2, align 4
3272; IS__TUNIT_OPM-NEXT:    [[L:%.*]] = load i64, i64* bitcast (i32* @bytes2 to i64*), align 4
3273; IS__TUNIT_OPM-NEXT:    ret i64 [[L]]
3274;
3275; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
3276; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@cast_and_load_2
3277; IS__TUNIT_NPM-SAME: () #[[ATTR2]] {
3278; IS__TUNIT_NPM-NEXT:    store i32 42, i32* @bytes2, align 4
3279; IS__TUNIT_NPM-NEXT:    [[L:%.*]] = load i64, i64* bitcast (i32* @bytes2 to i64*), align 4
3280; IS__TUNIT_NPM-NEXT:    ret i64 [[L]]
3281;
3282; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn
3283; IS__CGSCC____-LABEL: define {{[^@]+}}@cast_and_load_2
3284; IS__CGSCC____-SAME: () #[[ATTR5]] {
3285; IS__CGSCC____-NEXT:    store i32 42, i32* @bytes2, align 4
3286; IS__CGSCC____-NEXT:    [[L:%.*]] = load i64, i64* bitcast (i32* @bytes2 to i64*), align 4
3287; IS__CGSCC____-NEXT:    ret i64 [[L]]
3288;
3289  store i32 42, i32* @bytes2
3290  %bc = bitcast i32* @bytes2 to i64*
3291  %l = load i64, i64* %bc
3292  ret i64 %l
3293}
3294
3295define void @recursive_load_store(i64 %N, i32 %v) {
3296; IS__TUNIT____: Function Attrs: nofree nosync nounwind writeonly
3297; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_load_store
3298; IS__TUNIT____-SAME: (i64 [[N:%.*]], i32 [[V:%.*]]) #[[ATTR6:[0-9]+]] {
3299; IS__TUNIT____-NEXT:  entry:
3300; IS__TUNIT____-NEXT:    br label [[FOR_COND:%.*]]
3301; IS__TUNIT____:       for.cond:
3302; IS__TUNIT____-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_BODY:%.*]] ], [ 0, [[ENTRY:%.*]] ]
3303; IS__TUNIT____-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], [[N]]
3304; IS__TUNIT____-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY]], label [[FOR_END:%.*]]
3305; IS__TUNIT____:       for.body:
3306; IS__TUNIT____-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
3307; IS__TUNIT____-NEXT:    br label [[FOR_COND]]
3308; IS__TUNIT____:       for.end:
3309; IS__TUNIT____-NEXT:    ret void
3310;
3311; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind writeonly
3312; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@recursive_load_store
3313; IS__CGSCC_OPM-SAME: (i64 [[N:%.*]], i32 [[V:%.*]]) #[[ATTR10]] {
3314; IS__CGSCC_OPM-NEXT:  entry:
3315; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND:%.*]]
3316; IS__CGSCC_OPM:       for.cond:
3317; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_BODY:%.*]] ], [ 0, [[ENTRY:%.*]] ]
3318; IS__CGSCC_OPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], [[N]]
3319; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY]], label [[FOR_END:%.*]]
3320; IS__CGSCC_OPM:       for.body:
3321; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
3322; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND]]
3323; IS__CGSCC_OPM:       for.end:
3324; IS__CGSCC_OPM-NEXT:    ret void
3325;
3326; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind writeonly
3327; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@recursive_load_store
3328; IS__CGSCC_NPM-SAME: (i64 [[N:%.*]], i32 [[V:%.*]]) #[[ATTR8:[0-9]+]] {
3329; IS__CGSCC_NPM-NEXT:  entry:
3330; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND:%.*]]
3331; IS__CGSCC_NPM:       for.cond:
3332; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_BODY:%.*]] ], [ 0, [[ENTRY:%.*]] ]
3333; IS__CGSCC_NPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], [[N]]
3334; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY]], label [[FOR_END:%.*]]
3335; IS__CGSCC_NPM:       for.body:
3336; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
3337; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND]]
3338; IS__CGSCC_NPM:       for.end:
3339; IS__CGSCC_NPM-NEXT:    ret void
3340;
3341entry:
3342  store i32 %v, i32* @rec_storage
3343  br label %for.cond
3344
3345for.cond:
3346  %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
3347  %exitcond = icmp ne i64 %indvars.iv, %N
3348  br i1 %exitcond, label %for.body, label %for.end
3349
3350for.body:
3351  %ll = load i32, i32* @rec_storage
3352  store i32 %ll, i32* @rec_storage
3353  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
3354  br label %for.cond
3355
3356for.end:
3357  %lr = load i32, i32* @rec_storage
3358  store i32 %lr, i32* @rec_storage
3359  ret void
3360}
3361
3362!llvm.module.flags = !{!0, !1}
3363!llvm.ident = !{!2}
3364
3365!0 = !{i32 1, !"wchar_size", i32 4}
3366!1 = !{i32 7, !"uwtable", i32 1}
3367!2 = !{!"clang version 13.0.0"}
3368!3 = !{!4, !4, i64 0}
3369!4 = !{!"int", !5, i64 0}
3370!5 = !{!"omnipotent char", !6, i64 0}
3371!6 = !{!"Simple C/C++ TBAA"}
3372!7 = !{!8, !9, i64 12}
3373!8 = !{!"S", !4, i64 0, !4, i64 4, !4, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}
3374!9 = !{!"float", !5, i64 0}
3375!10 = !{!8, !9, i64 16}
3376!11 = !{!8, !9, i64 20}
3377!12 = !{!8, !4, i64 0}
3378!13 = !{!8, !4, i64 4}
3379!14 = !{!8, !4, i64 8}
3380!15 = !{!5, !5, i64 0}
3381!16 = distinct !{!16, !17}
3382!17 = !{!"llvm.loop.mustprogress"}
3383!18 = !{!9, !9, i64 0}
3384!19 = distinct !{!19, !17}
3385!20 = !{!21, !21, i64 0}
3386!21 = !{!"long long", !5, i64 0}
3387!22 = distinct !{!22, !17}
3388!23 = distinct !{!23, !17}
3389!24 = distinct !{!24, !17}
3390!25 = distinct !{!25, !17}
3391!26 = distinct !{!26, !17}
3392!27 = distinct !{!27, !17}
3393!28 = distinct !{!28, !17}
3394!29 = distinct !{!29, !17}
3395!30 = distinct !{!30, !17}
3396!31 = distinct !{!31, !17}
3397;.
3398; IS__TUNIT_OPM: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind willreturn writeonly }
3399; IS__TUNIT_OPM: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind willreturn }
3400; IS__TUNIT_OPM: attributes #[[ATTR2]] = { nofree nosync nounwind }
3401; IS__TUNIT_OPM: attributes #[[ATTR3]] = { nofree nosync nounwind readnone willreturn }
3402; IS__TUNIT_OPM: attributes #[[ATTR4]] = { nofree nosync nounwind willreturn }
3403; IS__TUNIT_OPM: attributes #[[ATTR5]] = { nofree nosync nounwind willreturn writeonly }
3404; IS__TUNIT_OPM: attributes #[[ATTR6]] = { nofree nosync nounwind writeonly }
3405; IS__TUNIT_OPM: attributes #[[ATTR7]] = { nofree nosync nounwind readonly willreturn }
3406; IS__TUNIT_OPM: attributes #[[ATTR8]] = { nofree nosync nounwind readnone }
3407; IS__TUNIT_OPM: attributes #[[ATTR9]] = { willreturn }
3408;.
3409; IS__TUNIT_NPM: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind willreturn writeonly }
3410; IS__TUNIT_NPM: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind willreturn }
3411; IS__TUNIT_NPM: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn }
3412; IS__TUNIT_NPM: attributes #[[ATTR3]] = { nofree nosync nounwind readnone willreturn }
3413; IS__TUNIT_NPM: attributes #[[ATTR4]] = { nofree nosync nounwind willreturn writeonly }
3414; IS__TUNIT_NPM: attributes #[[ATTR5]] = { nofree nosync nounwind readonly willreturn }
3415; IS__TUNIT_NPM: attributes #[[ATTR6]] = { nofree nosync nounwind writeonly }
3416; IS__TUNIT_NPM: attributes #[[ATTR7]] = { willreturn }
3417;.
3418; IS__CGSCC_OPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
3419; IS__CGSCC_OPM: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind willreturn }
3420; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn }
3421; IS__CGSCC_OPM: attributes #[[ATTR3]] = { nofree nosync nounwind willreturn }
3422; IS__CGSCC_OPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind willreturn writeonly }
3423; IS__CGSCC_OPM: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind willreturn }
3424; IS__CGSCC_OPM: attributes #[[ATTR6]] = { argmemonly nofree norecurse nosync nounwind willreturn }
3425; IS__CGSCC_OPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind readonly willreturn }
3426; IS__CGSCC_OPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind readnone }
3427; IS__CGSCC_OPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind }
3428; IS__CGSCC_OPM: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind writeonly }
3429; IS__CGSCC_OPM: attributes #[[ATTR11]] = { willreturn }
3430; IS__CGSCC_OPM: attributes #[[ATTR12]] = { nounwind willreturn writeonly }
3431; IS__CGSCC_OPM: attributes #[[ATTR13]] = { nounwind writeonly }
3432;.
3433; IS__CGSCC_NPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
3434; IS__CGSCC_NPM: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind willreturn }
3435; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn }
3436; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nofree nosync nounwind willreturn }
3437; IS__CGSCC_NPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind willreturn writeonly }
3438; IS__CGSCC_NPM: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind willreturn }
3439; IS__CGSCC_NPM: attributes #[[ATTR6]] = { argmemonly nofree norecurse nosync nounwind willreturn }
3440; IS__CGSCC_NPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind readonly willreturn }
3441; IS__CGSCC_NPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind writeonly }
3442; IS__CGSCC_NPM: attributes #[[ATTR9]] = { willreturn }
3443; IS__CGSCC_NPM: attributes #[[ATTR10]] = { nounwind willreturn writeonly }
3444; IS__CGSCC_NPM: attributes #[[ATTR11]] = { nounwind writeonly }
3445;.
3446; IS__TUNIT____: [[META0:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
3447; IS__TUNIT____: [[META1:![0-9]+]] = !{i32 7, !"uwtable", i32 1}
3448; IS__TUNIT____: [[META2:![0-9]+]] = !{!"clang version 13.0.0"}
3449; IS__TUNIT____: [[TBAA3]] = !{!4, !4, i64 0}
3450; IS__TUNIT____: [[META4:![0-9]+]] = !{!"int", !5, i64 0}
3451; IS__TUNIT____: [[META5:![0-9]+]] = !{!"omnipotent char", !6, i64 0}
3452; IS__TUNIT____: [[META6:![0-9]+]] = !{!"Simple C/C++ TBAA"}
3453; IS__TUNIT____: [[META7:![0-9]+]] = !{!8, !9, i64 12}
3454; IS__TUNIT____: [[META8:![0-9]+]] = !{!"S", !4, i64 0, !4, i64 4, !4, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}
3455; IS__TUNIT____: [[META9:![0-9]+]] = !{!"float", !5, i64 0}
3456; IS__TUNIT____: [[META10:![0-9]+]] = !{!8, !9, i64 16}
3457; IS__TUNIT____: [[META11:![0-9]+]] = !{!8, !9, i64 20}
3458; IS__TUNIT____: [[META12:![0-9]+]] = !{!8, !4, i64 0}
3459; IS__TUNIT____: [[META13:![0-9]+]] = !{!8, !4, i64 4}
3460; IS__TUNIT____: [[META14:![0-9]+]] = !{!8, !4, i64 8}
3461; IS__TUNIT____: [[META15:![0-9]+]] = distinct !{!15, !16}
3462; IS__TUNIT____: [[META16:![0-9]+]] = !{!"llvm.loop.mustprogress"}
3463; IS__TUNIT____: [[META17:![0-9]+]] = distinct !{!17, !16}
3464; IS__TUNIT____: [[META18:![0-9]+]] = distinct !{!18, !16}
3465; IS__TUNIT____: [[META19:![0-9]+]] = !{!5, !5, i64 0}
3466; IS__TUNIT____: [[META20:![0-9]+]] = distinct !{!20, !16}
3467; IS__TUNIT____: [[META21:![0-9]+]] = distinct !{!21, !16}
3468; IS__TUNIT____: [[META22:![0-9]+]] = distinct !{!22, !16}
3469; IS__TUNIT____: [[META23:![0-9]+]] = distinct !{!23, !16}
3470; IS__TUNIT____: [[META24:![0-9]+]] = distinct !{!24, !16}
3471; IS__TUNIT____: [[META25:![0-9]+]] = distinct !{!25, !16}
3472; IS__TUNIT____: [[META26:![0-9]+]] = !{!9, !9, i64 0}
3473; IS__TUNIT____: [[META27:![0-9]+]] = distinct !{!27, !16}
3474; IS__TUNIT____: [[META28:![0-9]+]] = !{!29, !29, i64 0}
3475; IS__TUNIT____: [[META29:![0-9]+]] = !{!"long long", !5, i64 0}
3476; IS__TUNIT____: [[META30:![0-9]+]] = distinct !{!30, !16}
3477; IS__TUNIT____: [[META31:![0-9]+]] = distinct !{!31, !16}
3478;.
3479; IS__CGSCC____: [[META0:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
3480; IS__CGSCC____: [[META1:![0-9]+]] = !{i32 7, !"uwtable", i32 1}
3481; IS__CGSCC____: [[META2:![0-9]+]] = !{!"clang version 13.0.0"}
3482; IS__CGSCC____: [[TBAA3]] = !{!4, !4, i64 0}
3483; IS__CGSCC____: [[META4:![0-9]+]] = !{!"int", !5, i64 0}
3484; IS__CGSCC____: [[META5:![0-9]+]] = !{!"omnipotent char", !6, i64 0}
3485; IS__CGSCC____: [[META6:![0-9]+]] = !{!"Simple C/C++ TBAA"}
3486; IS__CGSCC____: [[META7:![0-9]+]] = !{!8, !9, i64 12}
3487; IS__CGSCC____: [[META8:![0-9]+]] = !{!"S", !4, i64 0, !4, i64 4, !4, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}
3488; IS__CGSCC____: [[META9:![0-9]+]] = !{!"float", !5, i64 0}
3489; IS__CGSCC____: [[META10:![0-9]+]] = !{!8, !9, i64 16}
3490; IS__CGSCC____: [[META11:![0-9]+]] = !{!8, !9, i64 20}
3491; IS__CGSCC____: [[META12:![0-9]+]] = !{!8, !4, i64 0}
3492; IS__CGSCC____: [[META13:![0-9]+]] = !{!8, !4, i64 4}
3493; IS__CGSCC____: [[META14:![0-9]+]] = !{!8, !4, i64 8}
3494; IS__CGSCC____: [[META15:![0-9]+]] = !{!5, !5, i64 0}
3495; IS__CGSCC____: [[META16:![0-9]+]] = distinct !{!16, !17}
3496; IS__CGSCC____: [[META17:![0-9]+]] = !{!"llvm.loop.mustprogress"}
3497; IS__CGSCC____: [[META18:![0-9]+]] = !{!9, !9, i64 0}
3498; IS__CGSCC____: [[META19:![0-9]+]] = distinct !{!19, !17}
3499; IS__CGSCC____: [[META20:![0-9]+]] = !{!21, !21, i64 0}
3500; IS__CGSCC____: [[META21:![0-9]+]] = !{!"long long", !5, i64 0}
3501; IS__CGSCC____: [[META22:![0-9]+]] = distinct !{!22, !17}
3502; IS__CGSCC____: [[META23:![0-9]+]] = distinct !{!23, !17}
3503; IS__CGSCC____: [[META24:![0-9]+]] = distinct !{!24, !17}
3504; IS__CGSCC____: [[META25:![0-9]+]] = distinct !{!25, !17}
3505; IS__CGSCC____: [[META26:![0-9]+]] = distinct !{!26, !17}
3506; IS__CGSCC____: [[META27:![0-9]+]] = distinct !{!27, !17}
3507; IS__CGSCC____: [[META28:![0-9]+]] = distinct !{!28, !17}
3508; IS__CGSCC____: [[META29:![0-9]+]] = distinct !{!29, !17}
3509; IS__CGSCC____: [[META30:![0-9]+]] = distinct !{!30, !17}
3510; IS__CGSCC____: [[META31:![0-9]+]] = distinct !{!31, !17}
3511;.
3512