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