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=50 -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=50 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM 4; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM 5; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM 6; 7%struct.S = type { i32, i32, i32, float, float, float } 8 9@globalBytes = global [1024 x i8] zeroinitializer, align 16 10@Gint1 = global i32 zeroinitializer, align 4 11@Gint2 = global i32 zeroinitializer, align 4 12@Gstatic_int1 = internal global i32 zeroinitializer, align 4 13@Gstatic_int2 = internal global i32 zeroinitializer, align 4 14@Gstatic_int3 = internal global i32 zeroinitializer, align 4 15@Gstatic_undef_int1 = internal global i32 undef, align 4 16@Gstatic_undef_int2 = internal global i32 undef, align 4 17@GI1 = internal global i32 undef, align 4 18@GI2 = internal global i32 undef, align 4 19@Gs1 = internal global %struct.S undef, align 4 20@Gs2 = internal global %struct.S zeroinitializer, align 4 21@GBytes = internal global [1024 x i8] zeroinitializer, align 16 22@Flag0 = global i32 0, align 4 23@Flag1 = internal global i32 undef, align 4 24@Flag2 = internal global i32 undef, align 4 25@Flag3 = internal global i32 zeroinitializer, align 4 26@a1 = internal global i32 zeroinitializer 27@a2 = internal global i32 zeroinitializer 28@a3 = internal global i32 undef 29@bytes1 = internal global i32 undef 30@bytes2 = internal global i32 undef 31@rec_storage = internal global i32 undef 32 33;. 34; CHECK: @[[GLOBALBYTES:[a-zA-Z0-9_$"\\.-]+]] = global [1024 x i8] zeroinitializer, align 16 35; CHECK: @[[GINT1:[a-zA-Z0-9_$"\\.-]+]] = global i32 0, align 4 36; CHECK: @[[GINT2:[a-zA-Z0-9_$"\\.-]+]] = global i32 0, align 4 37; CHECK: @[[GSTATIC_INT1:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 0, align 4 38; CHECK: @[[GSTATIC_INT2:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 0, align 4 39; CHECK: @[[GSTATIC_INT3:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 0, align 4 40; CHECK: @[[GSTATIC_UNDEF_INT1:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef, align 4 41; CHECK: @[[GSTATIC_UNDEF_INT2:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef, align 4 42; CHECK: @[[GI1:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef, align 4 43; CHECK: @[[GI2:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef, align 4 44; CHECK: @[[GS1:[a-zA-Z0-9_$"\\.-]+]] = internal global [[STRUCT_S:%.*]] undef, align 4 45; CHECK: @[[GS2:[a-zA-Z0-9_$"\\.-]+]] = internal global [[STRUCT_S:%.*]] zeroinitializer, align 4 46; CHECK: @[[GBYTES:[a-zA-Z0-9_$"\\.-]+]] = internal global [1024 x i8] zeroinitializer, align 16 47; CHECK: @[[FLAG0:[a-zA-Z0-9_$"\\.-]+]] = global i32 0, align 4 48; CHECK: @[[FLAG1:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef, align 4 49; CHECK: @[[FLAG2:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef, align 4 50; CHECK: @[[FLAG3:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 0, align 4 51; CHECK: @[[A1:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 0 52; CHECK: @[[A2:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 0 53; CHECK: @[[A3:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef 54; CHECK: @[[BYTES1:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef 55; CHECK: @[[BYTES2:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef 56; CHECK: @[[REC_STORAGE:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef 57; CHECK: @[[GLOBAL:[a-zA-Z0-9_$"\\.-]+]] = internal global [[STRUCT_STY:%.*]] zeroinitializer, align 8 58;. 59define void @write_arg(i32* %p, i32 %v) { 60; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly 61; CHECK-LABEL: define {{[^@]+}}@write_arg 62; CHECK-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P:%.*]], i32 [[V:%.*]]) #[[ATTR0:[0-9]+]] { 63; CHECK-NEXT: entry: 64; CHECK-NEXT: store i32 [[V]], i32* [[P]], align 4, !tbaa [[TBAA3:![0-9]+]] 65; CHECK-NEXT: ret void 66; 67entry: 68 store i32 %v, i32* %p, align 4, !tbaa !3 69 ret void 70} 71 72define void @write_random(i32* %p) { 73; CHECK-LABEL: define {{[^@]+}}@write_random 74; CHECK-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) { 75; CHECK-NEXT: entry: 76; CHECK-NEXT: [[CALL:%.*]] = call i32 (...) @random() 77; CHECK-NEXT: store i32 [[CALL]], i32* [[P]], align 4, !tbaa [[TBAA3]] 78; CHECK-NEXT: ret void 79; 80entry: 81 %call = call i32 (...) @random() 82 store i32 %call, i32* %p, align 4, !tbaa !3 83 ret void 84} 85 86declare i32 @random(...) 87 88; struct S local_alloca_simplifiable_1(void) { 89; struct S s; 90; s.f1 = 1.1; 91; s.f2 = 2.2; 92; s.f3 = 3.3; 93; write_arg(&s.i1, 1); 94; write_arg(&s.i2, 2); 95; write_arg(&s.i3, 3); 96; struct S r; 97; r.f1 = s.f1; 98; r.f2 = s.f2 * 2; 99; r.f3 = s.f3 + s.f1; 100; r.i1 = s.i1; 101; r.i2 = s.i2 * 2; 102; r.i3 = s.i3 + s.i1; 103; return r; 104; } 105define void @local_alloca_simplifiable_1(%struct.S* noalias sret(%struct.S) align 4 %agg.result) { 106; IS__TUNIT_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn 107; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1 108; IS__TUNIT_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] { 109; IS__TUNIT_OPM-NEXT: entry: 110; IS__TUNIT_OPM-NEXT: [[S:%.*]] = alloca [[STRUCT_S]], align 4 111; IS__TUNIT_OPM-NEXT: [[I:%.*]] = bitcast %struct.S* [[S]] to i8* 112; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR13:[0-9]+]] 113; IS__TUNIT_OPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 114; IS__TUNIT_OPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4 115; IS__TUNIT_OPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 116; IS__TUNIT_OPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 117; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR14:[0-9]+]] 118; IS__TUNIT_OPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 119; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR14]] 120; IS__TUNIT_OPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 121; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR14]] 122; IS__TUNIT_OPM-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 123; IS__TUNIT_OPM-NEXT: store float 0x3FF19999A0000000, float* [[F12]], align 4, !tbaa [[TBAA7:![0-9]+]] 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 0x40119999A0000000, float* [[F24]], align 4, !tbaa [[TBAA10:![0-9]+]] 126; IS__TUNIT_OPM-NEXT: [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5 127; IS__TUNIT_OPM-NEXT: store float 0x40119999A0000000, float* [[F37]], align 4, !tbaa [[TBAA11:![0-9]+]] 128; IS__TUNIT_OPM-NEXT: [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0 129; IS__TUNIT_OPM-NEXT: store i32 1, i32* [[I19]], align 4, !tbaa [[TBAA12:![0-9]+]] 130; IS__TUNIT_OPM-NEXT: [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1 131; IS__TUNIT_OPM-NEXT: store i32 4, i32* [[I212]], align 4, !tbaa [[TBAA13:![0-9]+]] 132; IS__TUNIT_OPM-NEXT: [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2 133; IS__TUNIT_OPM-NEXT: store i32 4, i32* [[I316]], align 4, !tbaa [[TBAA14:![0-9]+]] 134; IS__TUNIT_OPM-NEXT: [[I12:%.*]] = bitcast %struct.S* [[S]] to i8* 135; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR13]] 136; IS__TUNIT_OPM-NEXT: ret void 137; 138; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn 139; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1 140; IS__TUNIT_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] { 141; IS__TUNIT_NPM-NEXT: entry: 142; IS__TUNIT_NPM-NEXT: [[S:%.*]] = alloca [[STRUCT_S]], align 4 143; IS__TUNIT_NPM-NEXT: [[I:%.*]] = bitcast %struct.S* [[S]] to i8* 144; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR12:[0-9]+]] 145; IS__TUNIT_NPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 146; IS__TUNIT_NPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4 147; IS__TUNIT_NPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 148; IS__TUNIT_NPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 149; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR13:[0-9]+]] 150; IS__TUNIT_NPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 151; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR13]] 152; IS__TUNIT_NPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 153; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR13]] 154; IS__TUNIT_NPM-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 155; IS__TUNIT_NPM-NEXT: store float 0x3FF19999A0000000, float* [[F12]], align 4, !tbaa [[TBAA7:![0-9]+]] 156; IS__TUNIT_NPM-NEXT: [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4 157; IS__TUNIT_NPM-NEXT: store float 0x40119999A0000000, float* [[F24]], align 4, !tbaa [[TBAA10:![0-9]+]] 158; IS__TUNIT_NPM-NEXT: [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5 159; IS__TUNIT_NPM-NEXT: store float 0x40119999A0000000, float* [[F37]], align 4, !tbaa [[TBAA11:![0-9]+]] 160; IS__TUNIT_NPM-NEXT: [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0 161; IS__TUNIT_NPM-NEXT: store i32 1, i32* [[I19]], align 4, !tbaa [[TBAA12:![0-9]+]] 162; IS__TUNIT_NPM-NEXT: [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1 163; IS__TUNIT_NPM-NEXT: store i32 4, i32* [[I212]], align 4, !tbaa [[TBAA13:![0-9]+]] 164; IS__TUNIT_NPM-NEXT: [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2 165; IS__TUNIT_NPM-NEXT: store i32 4, i32* [[I316]], align 4, !tbaa [[TBAA14:![0-9]+]] 166; IS__TUNIT_NPM-NEXT: [[I12:%.*]] = bitcast %struct.S* [[S]] to i8* 167; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR12]] 168; IS__TUNIT_NPM-NEXT: ret void 169; 170; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn 171; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1 172; IS__CGSCC_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] { 173; IS__CGSCC_OPM-NEXT: entry: 174; IS__CGSCC_OPM-NEXT: [[S:%.*]] = alloca [[STRUCT_S]], align 4 175; IS__CGSCC_OPM-NEXT: [[I:%.*]] = bitcast %struct.S* [[S]] to i8* 176; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR15:[0-9]+]] 177; IS__CGSCC_OPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 178; IS__CGSCC_OPM-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7:![0-9]+]] 179; IS__CGSCC_OPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4 180; IS__CGSCC_OPM-NEXT: store float 0x40019999A0000000, float* [[F2]], align 4, !tbaa [[TBAA10:![0-9]+]] 181; IS__CGSCC_OPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 182; IS__CGSCC_OPM-NEXT: store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11:![0-9]+]] 183; IS__CGSCC_OPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 184; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR16:[0-9]+]] 185; IS__CGSCC_OPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 186; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR16]] 187; IS__CGSCC_OPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 188; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR16]] 189; IS__CGSCC_OPM-NEXT: [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 190; IS__CGSCC_OPM-NEXT: [[I4:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]] 191; IS__CGSCC_OPM-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 192; IS__CGSCC_OPM-NEXT: store float [[I4]], float* [[F12]], align 4, !tbaa [[TBAA7]] 193; IS__CGSCC_OPM-NEXT: [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4 194; IS__CGSCC_OPM-NEXT: [[I5:%.*]] = load float, float* [[F23]], align 4, !tbaa [[TBAA10]] 195; IS__CGSCC_OPM-NEXT: [[MUL:%.*]] = fmul float [[I5]], 2.000000e+00 196; IS__CGSCC_OPM-NEXT: [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4 197; IS__CGSCC_OPM-NEXT: store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]] 198; IS__CGSCC_OPM-NEXT: [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 199; IS__CGSCC_OPM-NEXT: [[I6:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]] 200; IS__CGSCC_OPM-NEXT: [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 201; IS__CGSCC_OPM-NEXT: [[I7:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]] 202; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = fadd float [[I6]], [[I7]] 203; IS__CGSCC_OPM-NEXT: [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5 204; IS__CGSCC_OPM-NEXT: store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]] 205; IS__CGSCC_OPM-NEXT: [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 206; IS__CGSCC_OPM-NEXT: [[I8:%.*]] = load i32, i32* [[I18]], align 4, !tbaa [[TBAA12:![0-9]+]] 207; IS__CGSCC_OPM-NEXT: [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0 208; IS__CGSCC_OPM-NEXT: store i32 [[I8]], i32* [[I19]], align 4, !tbaa [[TBAA12]] 209; IS__CGSCC_OPM-NEXT: [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 210; IS__CGSCC_OPM-NEXT: [[I9:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13:![0-9]+]] 211; IS__CGSCC_OPM-NEXT: [[MUL11:%.*]] = shl nsw i32 [[I9]], 1 212; IS__CGSCC_OPM-NEXT: [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1 213; IS__CGSCC_OPM-NEXT: store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]] 214; IS__CGSCC_OPM-NEXT: [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 215; IS__CGSCC_OPM-NEXT: [[I10:%.*]] = load i32, i32* [[I313]], align 4, !tbaa [[TBAA14:![0-9]+]] 216; IS__CGSCC_OPM-NEXT: [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 217; IS__CGSCC_OPM-NEXT: [[I11:%.*]] = load i32, i32* [[I114]], align 4, !tbaa [[TBAA12]] 218; IS__CGSCC_OPM-NEXT: [[ADD15:%.*]] = add nsw i32 [[I10]], [[I11]] 219; IS__CGSCC_OPM-NEXT: [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2 220; IS__CGSCC_OPM-NEXT: store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]] 221; IS__CGSCC_OPM-NEXT: [[I12:%.*]] = bitcast %struct.S* [[S]] to i8* 222; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR15]] 223; IS__CGSCC_OPM-NEXT: ret void 224; 225; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn 226; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1 227; IS__CGSCC_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] { 228; IS__CGSCC_NPM-NEXT: entry: 229; IS__CGSCC_NPM-NEXT: [[S:%.*]] = alloca [[STRUCT_S]], align 4 230; IS__CGSCC_NPM-NEXT: [[I:%.*]] = bitcast %struct.S* [[S]] to i8* 231; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR14:[0-9]+]] 232; IS__CGSCC_NPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 233; IS__CGSCC_NPM-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7:![0-9]+]] 234; IS__CGSCC_NPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4 235; IS__CGSCC_NPM-NEXT: store float 0x40019999A0000000, float* [[F2]], align 4, !tbaa [[TBAA10:![0-9]+]] 236; IS__CGSCC_NPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 237; IS__CGSCC_NPM-NEXT: store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11:![0-9]+]] 238; IS__CGSCC_NPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 239; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR15:[0-9]+]] 240; IS__CGSCC_NPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 241; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR15]] 242; IS__CGSCC_NPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 243; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR15]] 244; IS__CGSCC_NPM-NEXT: [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 245; IS__CGSCC_NPM-NEXT: [[I4:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]] 246; IS__CGSCC_NPM-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 247; IS__CGSCC_NPM-NEXT: store float [[I4]], float* [[F12]], align 4, !tbaa [[TBAA7]] 248; IS__CGSCC_NPM-NEXT: [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4 249; IS__CGSCC_NPM-NEXT: [[I5:%.*]] = load float, float* [[F23]], align 4, !tbaa [[TBAA10]] 250; IS__CGSCC_NPM-NEXT: [[MUL:%.*]] = fmul float [[I5]], 2.000000e+00 251; IS__CGSCC_NPM-NEXT: [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4 252; IS__CGSCC_NPM-NEXT: store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]] 253; IS__CGSCC_NPM-NEXT: [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 254; IS__CGSCC_NPM-NEXT: [[I6:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]] 255; IS__CGSCC_NPM-NEXT: [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 256; IS__CGSCC_NPM-NEXT: [[I7:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]] 257; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = fadd float [[I6]], [[I7]] 258; IS__CGSCC_NPM-NEXT: [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5 259; IS__CGSCC_NPM-NEXT: store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]] 260; IS__CGSCC_NPM-NEXT: [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 261; IS__CGSCC_NPM-NEXT: [[I8:%.*]] = load i32, i32* [[I18]], align 4, !tbaa [[TBAA12:![0-9]+]] 262; IS__CGSCC_NPM-NEXT: [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0 263; IS__CGSCC_NPM-NEXT: store i32 [[I8]], i32* [[I19]], align 4, !tbaa [[TBAA12]] 264; IS__CGSCC_NPM-NEXT: [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 265; IS__CGSCC_NPM-NEXT: [[I9:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13:![0-9]+]] 266; IS__CGSCC_NPM-NEXT: [[MUL11:%.*]] = shl nsw i32 [[I9]], 1 267; IS__CGSCC_NPM-NEXT: [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1 268; IS__CGSCC_NPM-NEXT: store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]] 269; IS__CGSCC_NPM-NEXT: [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 270; IS__CGSCC_NPM-NEXT: [[I10:%.*]] = load i32, i32* [[I313]], align 4, !tbaa [[TBAA14:![0-9]+]] 271; IS__CGSCC_NPM-NEXT: [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 272; IS__CGSCC_NPM-NEXT: [[I11:%.*]] = load i32, i32* [[I114]], align 4, !tbaa [[TBAA12]] 273; IS__CGSCC_NPM-NEXT: [[ADD15:%.*]] = add nsw i32 [[I10]], [[I11]] 274; IS__CGSCC_NPM-NEXT: [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2 275; IS__CGSCC_NPM-NEXT: store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]] 276; IS__CGSCC_NPM-NEXT: [[I12:%.*]] = bitcast %struct.S* [[S]] to i8* 277; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR14]] 278; IS__CGSCC_NPM-NEXT: ret void 279; 280entry: 281 %s = alloca %struct.S, align 4 282 %i = bitcast %struct.S* %s to i8* 283 call void @llvm.lifetime.start.p0i8(i64 24, i8* nonnull %i) 284 %f1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 3 285 store float 0x3FF19999A0000000, float* %f1, align 4, !tbaa !7 286 %f2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 4 287 store float 0x40019999A0000000, float* %f2, align 4, !tbaa !10 288 %f3 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 5 289 store float 0x400A666660000000, float* %f3, align 4, !tbaa !11 290 %i1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0 291 call void @write_arg(i32* nonnull %i1, i32 1) 292 %i2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1 293 call void @write_arg(i32* nonnull %i2, i32 2) 294 %i3 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 2 295 call void @write_arg(i32* nonnull %i3, i32 3) 296 %f11 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 3 297 %i4 = load float, float* %f11, align 4, !tbaa !7 298 %f12 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 3 299 store float %i4, float* %f12, align 4, !tbaa !7 300 %f23 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 4 301 %i5 = load float, float* %f23, align 4, !tbaa !10 302 %mul = fmul float %i5, 2.000000e+00 303 %f24 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 4 304 store float %mul, float* %f24, align 4, !tbaa !10 305 %f35 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 5 306 %i6 = load float, float* %f35, align 4, !tbaa !11 307 %f16 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 3 308 %i7 = load float, float* %f16, align 4, !tbaa !7 309 %add = fadd float %i6, %i7 310 %f37 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 5 311 store float %add, float* %f37, align 4, !tbaa !11 312 %i18 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0 313 %i8 = load i32, i32* %i18, align 4, !tbaa !12 314 %i19 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 0 315 store i32 %i8, i32* %i19, align 4, !tbaa !12 316 %i210 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1 317 %i9 = load i32, i32* %i210, align 4, !tbaa !13 318 %mul11 = shl nsw i32 %i9, 1 319 %i212 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 1 320 store i32 %mul11, i32* %i212, align 4, !tbaa !13 321 %i313 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 2 322 %i10 = load i32, i32* %i313, align 4, !tbaa !14 323 %i114 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0 324 %i11 = load i32, i32* %i114, align 4, !tbaa !12 325 %add15 = add nsw i32 %i10, %i11 326 %i316 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 2 327 store i32 %add15, i32* %i316, align 4, !tbaa !14 328 %i12 = bitcast %struct.S* %s to i8* 329 call void @llvm.lifetime.end.p0i8(i64 24, i8* nonnull %i12) 330 ret void 331} 332 333declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) 334 335declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) 336 337; void local_alloca_simplifiable_2(void) { 338; char Bytes[1024]; 339; for (int i = 0; i < 100; ++i) 340; Bytes[i * 10] = 0; 341; for (int i = 0; i < 10; ++i) 342; ((float *)Bytes)[i * 10 + 1] = 0; 343; for (int i = 0; i < 20; ++i) 344; ((long long int *)Bytes)[i * 10 + 2] = 0; 345; Bytes[1023] = 0; 346; write_arg((int *)&Bytes[500], 0); 347; struct S R; 348; for (int i = 0; i < 1024; ++i) 349; globalBytes[i] = Bytes[i]; 350; } 351; 352define void @local_alloca_simplifiable_2() { 353; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind 354; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_2 355; IS__TUNIT_OPM-SAME: () #[[ATTR3:[0-9]+]] { 356; IS__TUNIT_OPM-NEXT: entry: 357; IS__TUNIT_OPM-NEXT: [[BYTES:%.*]] = alloca [1024 x i8], align 16 358; IS__TUNIT_OPM-NEXT: [[I:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0 359; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]]) 360; IS__TUNIT_OPM-NEXT: br label [[FOR_COND:%.*]] 361; IS__TUNIT_OPM: for.cond: 362; IS__TUNIT_OPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ] 363; IS__TUNIT_OPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100 364; IS__TUNIT_OPM-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]] 365; IS__TUNIT_OPM: for.cond.cleanup: 366; IS__TUNIT_OPM-NEXT: br label [[FOR_END:%.*]] 367; IS__TUNIT_OPM: for.body: 368; IS__TUNIT_OPM-NEXT: [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10 369; IS__TUNIT_OPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[I15]] 370; IS__TUNIT_OPM-NEXT: store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15:![0-9]+]] 371; IS__TUNIT_OPM-NEXT: br label [[FOR_INC]] 372; IS__TUNIT_OPM: for.inc: 373; IS__TUNIT_OPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1 374; IS__TUNIT_OPM-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP16:![0-9]+]] 375; IS__TUNIT_OPM: for.end: 376; IS__TUNIT_OPM-NEXT: br label [[FOR_COND2:%.*]] 377; IS__TUNIT_OPM: for.cond2: 378; IS__TUNIT_OPM-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ] 379; IS__TUNIT_OPM-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10 380; IS__TUNIT_OPM-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]] 381; IS__TUNIT_OPM: for.cond.cleanup4: 382; IS__TUNIT_OPM-NEXT: br label [[FOR_END11:%.*]] 383; IS__TUNIT_OPM: for.body5: 384; IS__TUNIT_OPM-NEXT: [[I16:%.*]] = bitcast [1024 x i8]* [[BYTES]] to float* 385; IS__TUNIT_OPM-NEXT: [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10 386; IS__TUNIT_OPM-NEXT: [[I18:%.*]] = or i64 [[I17]], 1 387; IS__TUNIT_OPM-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I16]], i64 [[I18]] 388; IS__TUNIT_OPM-NEXT: store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18:![0-9]+]] 389; IS__TUNIT_OPM-NEXT: br label [[FOR_INC9]] 390; IS__TUNIT_OPM: for.inc9: 391; IS__TUNIT_OPM-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1 392; IS__TUNIT_OPM-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP19:![0-9]+]] 393; IS__TUNIT_OPM: for.end11: 394; IS__TUNIT_OPM-NEXT: br label [[FOR_COND13:%.*]] 395; IS__TUNIT_OPM: for.cond13: 396; IS__TUNIT_OPM-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC22:%.*]] ], [ 0, [[FOR_END11]] ] 397; IS__TUNIT_OPM-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20 398; IS__TUNIT_OPM-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]] 399; IS__TUNIT_OPM: for.cond.cleanup15: 400; IS__TUNIT_OPM-NEXT: br label [[FOR_END24:%.*]] 401; IS__TUNIT_OPM: for.body16: 402; IS__TUNIT_OPM-NEXT: [[I19:%.*]] = bitcast [1024 x i8]* [[BYTES]] to i64* 403; IS__TUNIT_OPM-NEXT: [[I20:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10 404; IS__TUNIT_OPM-NEXT: [[I21:%.*]] = add nuw nsw i64 [[I20]], 2 405; IS__TUNIT_OPM-NEXT: [[ARRAYIDX21:%.*]] = getelementptr inbounds i64, i64* [[I19]], i64 [[I21]] 406; IS__TUNIT_OPM-NEXT: store i64 0, i64* [[ARRAYIDX21]], align 16, !tbaa [[TBAA20:![0-9]+]] 407; IS__TUNIT_OPM-NEXT: br label [[FOR_INC22]] 408; IS__TUNIT_OPM: for.inc22: 409; IS__TUNIT_OPM-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1 410; IS__TUNIT_OPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP22:![0-9]+]] 411; IS__TUNIT_OPM: for.end24: 412; IS__TUNIT_OPM-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 1023 413; IS__TUNIT_OPM-NEXT: store i8 0, i8* [[ARRAYIDX25]], align 1, !tbaa [[TBAA15]] 414; IS__TUNIT_OPM-NEXT: [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500 415; IS__TUNIT_OPM-NEXT: [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32* 416; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(524) [[I22]], i32 noundef 0) #[[ATTR15:[0-9]+]] 417; IS__TUNIT_OPM-NEXT: br label [[FOR_COND28:%.*]] 418; IS__TUNIT_OPM: for.cond28: 419; IS__TUNIT_OPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ] 420; IS__TUNIT_OPM-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024 421; IS__TUNIT_OPM-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY31:%.*]], label [[FOR_COND_CLEANUP30:%.*]] 422; IS__TUNIT_OPM: for.cond.cleanup30: 423; IS__TUNIT_OPM-NEXT: br label [[FOR_END38:%.*]] 424; IS__TUNIT_OPM: for.body31: 425; IS__TUNIT_OPM-NEXT: [[ARRAYIDX33:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[INDVARS_IV12]] 426; IS__TUNIT_OPM-NEXT: [[I23:%.*]] = load i8, i8* [[ARRAYIDX33]], align 1, !tbaa [[TBAA15]] 427; IS__TUNIT_OPM-NEXT: [[ARRAYIDX35:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]] 428; IS__TUNIT_OPM-NEXT: store i8 [[I23]], i8* [[ARRAYIDX35]], align 1, !tbaa [[TBAA15]] 429; IS__TUNIT_OPM-NEXT: br label [[FOR_INC36]] 430; IS__TUNIT_OPM: for.inc36: 431; IS__TUNIT_OPM-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1 432; IS__TUNIT_OPM-NEXT: br label [[FOR_COND28]], !llvm.loop [[LOOP23:![0-9]+]] 433; IS__TUNIT_OPM: for.end38: 434; IS__TUNIT_OPM-NEXT: [[I24:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0 435; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I24]]) 436; IS__TUNIT_OPM-NEXT: ret void 437; 438; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn 439; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_2 440; IS__TUNIT_NPM-SAME: () #[[ATTR3:[0-9]+]] { 441; IS__TUNIT_NPM-NEXT: entry: 442; IS__TUNIT_NPM-NEXT: [[BYTES:%.*]] = alloca [1024 x i8], align 16 443; IS__TUNIT_NPM-NEXT: [[I:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0 444; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]]) #[[ATTR12]] 445; IS__TUNIT_NPM-NEXT: br label [[FOR_COND:%.*]] 446; IS__TUNIT_NPM: for.cond: 447; IS__TUNIT_NPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ] 448; IS__TUNIT_NPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100 449; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]] 450; IS__TUNIT_NPM: for.cond.cleanup: 451; IS__TUNIT_NPM-NEXT: br label [[FOR_END:%.*]] 452; IS__TUNIT_NPM: for.body: 453; IS__TUNIT_NPM-NEXT: [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10 454; IS__TUNIT_NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[I15]] 455; IS__TUNIT_NPM-NEXT: store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15:![0-9]+]] 456; IS__TUNIT_NPM-NEXT: br label [[FOR_INC]] 457; IS__TUNIT_NPM: for.inc: 458; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1 459; IS__TUNIT_NPM-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP16:![0-9]+]] 460; IS__TUNIT_NPM: for.end: 461; IS__TUNIT_NPM-NEXT: br label [[FOR_COND2:%.*]] 462; IS__TUNIT_NPM: for.cond2: 463; IS__TUNIT_NPM-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ] 464; IS__TUNIT_NPM-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10 465; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]] 466; IS__TUNIT_NPM: for.cond.cleanup4: 467; IS__TUNIT_NPM-NEXT: br label [[FOR_END11:%.*]] 468; IS__TUNIT_NPM: for.body5: 469; IS__TUNIT_NPM-NEXT: [[I16:%.*]] = bitcast [1024 x i8]* [[BYTES]] to float* 470; IS__TUNIT_NPM-NEXT: [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10 471; IS__TUNIT_NPM-NEXT: [[I18:%.*]] = or i64 [[I17]], 1 472; IS__TUNIT_NPM-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I16]], i64 [[I18]] 473; IS__TUNIT_NPM-NEXT: store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18:![0-9]+]] 474; IS__TUNIT_NPM-NEXT: br label [[FOR_INC9]] 475; IS__TUNIT_NPM: for.inc9: 476; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1 477; IS__TUNIT_NPM-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP19:![0-9]+]] 478; IS__TUNIT_NPM: for.end11: 479; IS__TUNIT_NPM-NEXT: br label [[FOR_COND13:%.*]] 480; IS__TUNIT_NPM: for.cond13: 481; IS__TUNIT_NPM-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC22:%.*]] ], [ 0, [[FOR_END11]] ] 482; IS__TUNIT_NPM-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20 483; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]] 484; IS__TUNIT_NPM: for.cond.cleanup15: 485; IS__TUNIT_NPM-NEXT: br label [[FOR_END24:%.*]] 486; IS__TUNIT_NPM: for.body16: 487; IS__TUNIT_NPM-NEXT: [[I19:%.*]] = bitcast [1024 x i8]* [[BYTES]] to i64* 488; IS__TUNIT_NPM-NEXT: [[I20:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10 489; IS__TUNIT_NPM-NEXT: [[I21:%.*]] = add nuw nsw i64 [[I20]], 2 490; IS__TUNIT_NPM-NEXT: [[ARRAYIDX21:%.*]] = getelementptr inbounds i64, i64* [[I19]], i64 [[I21]] 491; IS__TUNIT_NPM-NEXT: store i64 0, i64* [[ARRAYIDX21]], align 16, !tbaa [[TBAA20:![0-9]+]] 492; IS__TUNIT_NPM-NEXT: br label [[FOR_INC22]] 493; IS__TUNIT_NPM: for.inc22: 494; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1 495; IS__TUNIT_NPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP22:![0-9]+]] 496; IS__TUNIT_NPM: for.end24: 497; IS__TUNIT_NPM-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 1023 498; IS__TUNIT_NPM-NEXT: store i8 0, i8* [[ARRAYIDX25]], align 1, !tbaa [[TBAA15]] 499; IS__TUNIT_NPM-NEXT: [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500 500; IS__TUNIT_NPM-NEXT: [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32* 501; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(524) [[I22]], i32 noundef 0) #[[ATTR13]] 502; IS__TUNIT_NPM-NEXT: br label [[FOR_COND28:%.*]] 503; IS__TUNIT_NPM: for.cond28: 504; IS__TUNIT_NPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ] 505; IS__TUNIT_NPM-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024 506; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY31:%.*]], label [[FOR_COND_CLEANUP30:%.*]] 507; IS__TUNIT_NPM: for.cond.cleanup30: 508; IS__TUNIT_NPM-NEXT: br label [[FOR_END38:%.*]] 509; IS__TUNIT_NPM: for.body31: 510; IS__TUNIT_NPM-NEXT: [[ARRAYIDX33:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[INDVARS_IV12]] 511; IS__TUNIT_NPM-NEXT: [[I23:%.*]] = load i8, i8* [[ARRAYIDX33]], align 1, !tbaa [[TBAA15]] 512; IS__TUNIT_NPM-NEXT: [[ARRAYIDX35:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]] 513; IS__TUNIT_NPM-NEXT: store i8 [[I23]], i8* [[ARRAYIDX35]], align 1, !tbaa [[TBAA15]] 514; IS__TUNIT_NPM-NEXT: br label [[FOR_INC36]] 515; IS__TUNIT_NPM: for.inc36: 516; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1 517; IS__TUNIT_NPM-NEXT: br label [[FOR_COND28]], !llvm.loop [[LOOP23:![0-9]+]] 518; IS__TUNIT_NPM: for.end38: 519; IS__TUNIT_NPM-NEXT: [[I24:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0 520; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I24]]) #[[ATTR12]] 521; IS__TUNIT_NPM-NEXT: ret void 522; 523; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_2() { 524; IS__CGSCC_OPM-NEXT: entry: 525; IS__CGSCC_OPM-NEXT: [[BYTES:%.*]] = alloca [1024 x i8], align 16 526; IS__CGSCC_OPM-NEXT: [[I:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0 527; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]]) 528; IS__CGSCC_OPM-NEXT: br label [[FOR_COND:%.*]] 529; IS__CGSCC_OPM: for.cond: 530; IS__CGSCC_OPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ] 531; IS__CGSCC_OPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100 532; IS__CGSCC_OPM-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]] 533; IS__CGSCC_OPM: for.cond.cleanup: 534; IS__CGSCC_OPM-NEXT: br label [[FOR_END:%.*]] 535; IS__CGSCC_OPM: for.body: 536; IS__CGSCC_OPM-NEXT: [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10 537; IS__CGSCC_OPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[I15]] 538; IS__CGSCC_OPM-NEXT: store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15:![0-9]+]] 539; IS__CGSCC_OPM-NEXT: br label [[FOR_INC]] 540; IS__CGSCC_OPM: for.inc: 541; IS__CGSCC_OPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1 542; IS__CGSCC_OPM-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP16:![0-9]+]] 543; IS__CGSCC_OPM: for.end: 544; IS__CGSCC_OPM-NEXT: br label [[FOR_COND2:%.*]] 545; IS__CGSCC_OPM: for.cond2: 546; IS__CGSCC_OPM-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ] 547; IS__CGSCC_OPM-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10 548; IS__CGSCC_OPM-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]] 549; IS__CGSCC_OPM: for.cond.cleanup4: 550; IS__CGSCC_OPM-NEXT: br label [[FOR_END11:%.*]] 551; IS__CGSCC_OPM: for.body5: 552; IS__CGSCC_OPM-NEXT: [[I16:%.*]] = bitcast [1024 x i8]* [[BYTES]] to float* 553; IS__CGSCC_OPM-NEXT: [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10 554; IS__CGSCC_OPM-NEXT: [[I18:%.*]] = or i64 [[I17]], 1 555; IS__CGSCC_OPM-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I16]], i64 [[I18]] 556; IS__CGSCC_OPM-NEXT: store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18:![0-9]+]] 557; IS__CGSCC_OPM-NEXT: br label [[FOR_INC9]] 558; IS__CGSCC_OPM: for.inc9: 559; IS__CGSCC_OPM-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1 560; IS__CGSCC_OPM-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP19:![0-9]+]] 561; IS__CGSCC_OPM: for.end11: 562; IS__CGSCC_OPM-NEXT: br label [[FOR_COND13:%.*]] 563; IS__CGSCC_OPM: for.cond13: 564; IS__CGSCC_OPM-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC22:%.*]] ], [ 0, [[FOR_END11]] ] 565; IS__CGSCC_OPM-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20 566; IS__CGSCC_OPM-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]] 567; IS__CGSCC_OPM: for.cond.cleanup15: 568; IS__CGSCC_OPM-NEXT: br label [[FOR_END24:%.*]] 569; IS__CGSCC_OPM: for.body16: 570; IS__CGSCC_OPM-NEXT: [[I19:%.*]] = bitcast [1024 x i8]* [[BYTES]] to i64* 571; IS__CGSCC_OPM-NEXT: [[I20:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10 572; IS__CGSCC_OPM-NEXT: [[I21:%.*]] = add nuw nsw i64 [[I20]], 2 573; IS__CGSCC_OPM-NEXT: [[ARRAYIDX21:%.*]] = getelementptr inbounds i64, i64* [[I19]], i64 [[I21]] 574; IS__CGSCC_OPM-NEXT: store i64 0, i64* [[ARRAYIDX21]], align 16, !tbaa [[TBAA20:![0-9]+]] 575; IS__CGSCC_OPM-NEXT: br label [[FOR_INC22]] 576; IS__CGSCC_OPM: for.inc22: 577; IS__CGSCC_OPM-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1 578; IS__CGSCC_OPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP22:![0-9]+]] 579; IS__CGSCC_OPM: for.end24: 580; IS__CGSCC_OPM-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 1023 581; IS__CGSCC_OPM-NEXT: store i8 0, i8* [[ARRAYIDX25]], align 1, !tbaa [[TBAA15]] 582; IS__CGSCC_OPM-NEXT: [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500 583; IS__CGSCC_OPM-NEXT: [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32* 584; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I22]], i32 noundef 0) #[[ATTR17:[0-9]+]] 585; IS__CGSCC_OPM-NEXT: br label [[FOR_COND28:%.*]] 586; IS__CGSCC_OPM: for.cond28: 587; IS__CGSCC_OPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ] 588; IS__CGSCC_OPM-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024 589; IS__CGSCC_OPM-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY31:%.*]], label [[FOR_COND_CLEANUP30:%.*]] 590; IS__CGSCC_OPM: for.cond.cleanup30: 591; IS__CGSCC_OPM-NEXT: br label [[FOR_END38:%.*]] 592; IS__CGSCC_OPM: for.body31: 593; IS__CGSCC_OPM-NEXT: [[ARRAYIDX33:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[INDVARS_IV12]] 594; IS__CGSCC_OPM-NEXT: [[I23:%.*]] = load i8, i8* [[ARRAYIDX33]], align 1, !tbaa [[TBAA15]] 595; IS__CGSCC_OPM-NEXT: [[ARRAYIDX35:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]] 596; IS__CGSCC_OPM-NEXT: store i8 [[I23]], i8* [[ARRAYIDX35]], align 1, !tbaa [[TBAA15]] 597; IS__CGSCC_OPM-NEXT: br label [[FOR_INC36]] 598; IS__CGSCC_OPM: for.inc36: 599; IS__CGSCC_OPM-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1 600; IS__CGSCC_OPM-NEXT: br label [[FOR_COND28]], !llvm.loop [[LOOP23:![0-9]+]] 601; IS__CGSCC_OPM: for.end38: 602; IS__CGSCC_OPM-NEXT: [[I24:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0 603; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nofree noundef nonnull align 16 dereferenceable(1024) [[I24]]) 604; IS__CGSCC_OPM-NEXT: ret void 605; 606; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_2() { 607; IS__CGSCC_NPM-NEXT: entry: 608; IS__CGSCC_NPM-NEXT: [[BYTES:%.*]] = alloca [1024 x i8], align 16 609; IS__CGSCC_NPM-NEXT: [[I:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0 610; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]]) #[[ATTR14]] 611; IS__CGSCC_NPM-NEXT: br label [[FOR_COND:%.*]] 612; IS__CGSCC_NPM: for.cond: 613; IS__CGSCC_NPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ] 614; IS__CGSCC_NPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100 615; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]] 616; IS__CGSCC_NPM: for.cond.cleanup: 617; IS__CGSCC_NPM-NEXT: br label [[FOR_END:%.*]] 618; IS__CGSCC_NPM: for.body: 619; IS__CGSCC_NPM-NEXT: [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10 620; IS__CGSCC_NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[I15]] 621; IS__CGSCC_NPM-NEXT: store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15:![0-9]+]] 622; IS__CGSCC_NPM-NEXT: br label [[FOR_INC]] 623; IS__CGSCC_NPM: for.inc: 624; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1 625; IS__CGSCC_NPM-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP16:![0-9]+]] 626; IS__CGSCC_NPM: for.end: 627; IS__CGSCC_NPM-NEXT: br label [[FOR_COND2:%.*]] 628; IS__CGSCC_NPM: for.cond2: 629; IS__CGSCC_NPM-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ] 630; IS__CGSCC_NPM-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10 631; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]] 632; IS__CGSCC_NPM: for.cond.cleanup4: 633; IS__CGSCC_NPM-NEXT: br label [[FOR_END11:%.*]] 634; IS__CGSCC_NPM: for.body5: 635; IS__CGSCC_NPM-NEXT: [[I16:%.*]] = bitcast [1024 x i8]* [[BYTES]] to float* 636; IS__CGSCC_NPM-NEXT: [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10 637; IS__CGSCC_NPM-NEXT: [[I18:%.*]] = or i64 [[I17]], 1 638; IS__CGSCC_NPM-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I16]], i64 [[I18]] 639; IS__CGSCC_NPM-NEXT: store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18:![0-9]+]] 640; IS__CGSCC_NPM-NEXT: br label [[FOR_INC9]] 641; IS__CGSCC_NPM: for.inc9: 642; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1 643; IS__CGSCC_NPM-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP19:![0-9]+]] 644; IS__CGSCC_NPM: for.end11: 645; IS__CGSCC_NPM-NEXT: br label [[FOR_COND13:%.*]] 646; IS__CGSCC_NPM: for.cond13: 647; IS__CGSCC_NPM-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC22:%.*]] ], [ 0, [[FOR_END11]] ] 648; IS__CGSCC_NPM-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20 649; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]] 650; IS__CGSCC_NPM: for.cond.cleanup15: 651; IS__CGSCC_NPM-NEXT: br label [[FOR_END24:%.*]] 652; IS__CGSCC_NPM: for.body16: 653; IS__CGSCC_NPM-NEXT: [[I19:%.*]] = bitcast [1024 x i8]* [[BYTES]] to i64* 654; IS__CGSCC_NPM-NEXT: [[I20:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10 655; IS__CGSCC_NPM-NEXT: [[I21:%.*]] = add nuw nsw i64 [[I20]], 2 656; IS__CGSCC_NPM-NEXT: [[ARRAYIDX21:%.*]] = getelementptr inbounds i64, i64* [[I19]], i64 [[I21]] 657; IS__CGSCC_NPM-NEXT: store i64 0, i64* [[ARRAYIDX21]], align 16, !tbaa [[TBAA20:![0-9]+]] 658; IS__CGSCC_NPM-NEXT: br label [[FOR_INC22]] 659; IS__CGSCC_NPM: for.inc22: 660; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1 661; IS__CGSCC_NPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP22:![0-9]+]] 662; IS__CGSCC_NPM: for.end24: 663; IS__CGSCC_NPM-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 1023 664; IS__CGSCC_NPM-NEXT: store i8 0, i8* [[ARRAYIDX25]], align 1, !tbaa [[TBAA15]] 665; IS__CGSCC_NPM-NEXT: [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500 666; IS__CGSCC_NPM-NEXT: [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32* 667; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I22]], i32 noundef 0) #[[ATTR16:[0-9]+]] 668; IS__CGSCC_NPM-NEXT: br label [[FOR_COND28:%.*]] 669; IS__CGSCC_NPM: for.cond28: 670; IS__CGSCC_NPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ] 671; IS__CGSCC_NPM-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024 672; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY31:%.*]], label [[FOR_COND_CLEANUP30:%.*]] 673; IS__CGSCC_NPM: for.cond.cleanup30: 674; IS__CGSCC_NPM-NEXT: br label [[FOR_END38:%.*]] 675; IS__CGSCC_NPM: for.body31: 676; IS__CGSCC_NPM-NEXT: [[ARRAYIDX33:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[INDVARS_IV12]] 677; IS__CGSCC_NPM-NEXT: [[I23:%.*]] = load i8, i8* [[ARRAYIDX33]], align 1, !tbaa [[TBAA15]] 678; IS__CGSCC_NPM-NEXT: [[ARRAYIDX35:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]] 679; IS__CGSCC_NPM-NEXT: store i8 [[I23]], i8* [[ARRAYIDX35]], align 1, !tbaa [[TBAA15]] 680; IS__CGSCC_NPM-NEXT: br label [[FOR_INC36]] 681; IS__CGSCC_NPM: for.inc36: 682; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1 683; IS__CGSCC_NPM-NEXT: br label [[FOR_COND28]], !llvm.loop [[LOOP23:![0-9]+]] 684; IS__CGSCC_NPM: for.end38: 685; IS__CGSCC_NPM-NEXT: [[I24:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0 686; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nofree noundef nonnull align 16 dereferenceable(1024) [[I24]]) 687; IS__CGSCC_NPM-NEXT: ret void 688; 689entry: 690 %Bytes = alloca [1024 x i8], align 16 691 %i = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 0 692 call void @llvm.lifetime.start.p0i8(i64 1024, i8* nonnull %i) 693 br label %for.cond 694 695for.cond: ; preds = %for.inc, %entry 696 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ] 697 %exitcond = icmp ne i64 %indvars.iv, 100 698 br i1 %exitcond, label %for.body, label %for.cond.cleanup 699 700for.cond.cleanup: ; preds = %for.cond 701 br label %for.end 702 703for.body: ; preds = %for.cond 704 %i15 = mul nuw nsw i64 %indvars.iv, 10 705 %arrayidx = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 %i15 706 store i8 0, i8* %arrayidx, align 2, !tbaa !15 707 br label %for.inc 708 709for.inc: ; preds = %for.body 710 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 711 br label %for.cond, !llvm.loop !16 712 713for.end: ; preds = %for.cond.cleanup 714 br label %for.cond2 715 716for.cond2: ; preds = %for.inc9, %for.end 717 %indvars.iv2 = phi i64 [ %indvars.iv.next3, %for.inc9 ], [ 0, %for.end ] 718 %exitcond6 = icmp ne i64 %indvars.iv2, 10 719 br i1 %exitcond6, label %for.body5, label %for.cond.cleanup4 720 721for.cond.cleanup4: ; preds = %for.cond2 722 br label %for.end11 723 724for.body5: ; preds = %for.cond2 725 %i16 = bitcast [1024 x i8]* %Bytes to float* 726 %i17 = mul nuw nsw i64 %indvars.iv2, 10 727 %i18 = or i64 %i17, 1 728 %arrayidx8 = getelementptr inbounds float, float* %i16, i64 %i18 729 store float 0.000000e+00, float* %arrayidx8, align 4, !tbaa !18 730 br label %for.inc9 731 732for.inc9: ; preds = %for.body5 733 %indvars.iv.next3 = add nuw nsw i64 %indvars.iv2, 1 734 br label %for.cond2, !llvm.loop !19 735 736for.end11: ; preds = %for.cond.cleanup4 737 br label %for.cond13 738 739for.cond13: ; preds = %for.inc22, %for.end11 740 %indvars.iv7 = phi i64 [ %indvars.iv.next8, %for.inc22 ], [ 0, %for.end11 ] 741 %exitcond11 = icmp ne i64 %indvars.iv7, 20 742 br i1 %exitcond11, label %for.body16, label %for.cond.cleanup15 743 744for.cond.cleanup15: ; preds = %for.cond13 745 br label %for.end24 746 747for.body16: ; preds = %for.cond13 748 %i19 = bitcast [1024 x i8]* %Bytes to i64* 749 %i20 = mul nuw nsw i64 %indvars.iv7, 10 750 %i21 = add nuw nsw i64 %i20, 2 751 %arrayidx21 = getelementptr inbounds i64, i64* %i19, i64 %i21 752 store i64 0, i64* %arrayidx21, align 16, !tbaa !20 753 br label %for.inc22 754 755for.inc22: ; preds = %for.body16 756 %indvars.iv.next8 = add nuw nsw i64 %indvars.iv7, 1 757 br label %for.cond13, !llvm.loop !22 758 759for.end24: ; preds = %for.cond.cleanup15 760 %arrayidx25 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 1023 761 store i8 0, i8* %arrayidx25, align 1, !tbaa !15 762 %arrayidx26 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 500 763 %i22 = bitcast i8* %arrayidx26 to i32* 764 call void @write_arg(i32* nonnull %i22, i32 0) 765 br label %for.cond28 766 767for.cond28: ; preds = %for.inc36, %for.end24 768 %indvars.iv12 = phi i64 [ %indvars.iv.next13, %for.inc36 ], [ 0, %for.end24 ] 769 %exitcond14 = icmp ne i64 %indvars.iv12, 1024 770 br i1 %exitcond14, label %for.body31, label %for.cond.cleanup30 771 772for.cond.cleanup30: ; preds = %for.cond28 773 br label %for.end38 774 775for.body31: ; preds = %for.cond28 776 %arrayidx33 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 %indvars.iv12 777 %i23 = load i8, i8* %arrayidx33, align 1, !tbaa !15 778 %arrayidx35 = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 %indvars.iv12 779 store i8 %i23, i8* %arrayidx35, align 1, !tbaa !15 780 br label %for.inc36 781 782for.inc36: ; preds = %for.body31 783 %indvars.iv.next13 = add nuw nsw i64 %indvars.iv12, 1 784 br label %for.cond28, !llvm.loop !23 785 786for.end38: ; preds = %for.cond.cleanup30 787 %i24 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 0 788 call void @llvm.lifetime.end.p0i8(i64 1024, i8* nonnull %i24) 789 ret void 790} 791 792; int local_alloca_simplifiable_3() { 793; int A = 1; 794; // split 795; A = 2; 796; return A; 797; } 798; 799define i32 @local_alloca_simplifiable_3() { 800; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 801; IS__TUNIT____-LABEL: define {{[^@]+}}@local_alloca_simplifiable_3 802; IS__TUNIT____-SAME: () #[[ATTR4:[0-9]+]] { 803; IS__TUNIT____-NEXT: [[A:%.*]] = alloca i32, align 4 804; IS__TUNIT____-NEXT: store i32 1, i32* [[A]], align 4 805; IS__TUNIT____-NEXT: br label [[SPLIT:%.*]] 806; IS__TUNIT____: split: 807; IS__TUNIT____-NEXT: store i32 2, i32* [[A]], align 4 808; IS__TUNIT____-NEXT: [[L:%.*]] = load i32, i32* [[A]], align 4 809; IS__TUNIT____-NEXT: ret i32 [[L]] 810; 811; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 812; IS__CGSCC____-LABEL: define {{[^@]+}}@local_alloca_simplifiable_3 813; IS__CGSCC____-SAME: () #[[ATTR3:[0-9]+]] { 814; IS__CGSCC____-NEXT: [[A:%.*]] = alloca i32, align 4 815; IS__CGSCC____-NEXT: store i32 1, i32* [[A]], align 4 816; IS__CGSCC____-NEXT: br label [[SPLIT:%.*]] 817; IS__CGSCC____: split: 818; IS__CGSCC____-NEXT: store i32 2, i32* [[A]], align 4 819; IS__CGSCC____-NEXT: [[L:%.*]] = load i32, i32* [[A]], align 4 820; IS__CGSCC____-NEXT: ret i32 [[L]] 821; 822 %A = alloca i32, align 4 823 store i32 1, i32* %A 824 br label %split 825split: 826 store i32 2, i32* %A 827 %l = load i32, i32* %A, align 4 828 ret i32 %l 829} 830; int local_alloca_simplifiable_4() { 831; int A; 832; return A; 833; } 834; 835define i32 @local_alloca_simplifiable_4() { 836; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 837; IS__TUNIT____-LABEL: define {{[^@]+}}@local_alloca_simplifiable_4 838; IS__TUNIT____-SAME: () #[[ATTR4]] { 839; IS__TUNIT____-NEXT: ret i32 undef 840; 841; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 842; IS__CGSCC____-LABEL: define {{[^@]+}}@local_alloca_simplifiable_4 843; IS__CGSCC____-SAME: () #[[ATTR3]] { 844; IS__CGSCC____-NEXT: ret i32 undef 845; 846 %A = alloca i32, align 4 847 %l = load i32, i32* %A, align 4 848 ret i32 %l 849} 850 851; static int GI1 __attribute__((loader_uninitialized)); 852; int multi_obj_simplifiable_1(int cnd) { 853; int L = GI1 = 5; 854; int *p = cnd ? &GI1 : &L; 855; return *p; 856; } 857define i32 @multi_obj_simplifiable_1(i32 %cnd) { 858; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn 859; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1 860; IS__TUNIT_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR5:[0-9]+]] { 861; IS__TUNIT_OPM-NEXT: entry: 862; IS__TUNIT_OPM-NEXT: [[L:%.*]] = alloca i32, align 4 863; IS__TUNIT_OPM-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8* 864; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR13]] 865; IS__TUNIT_OPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0 866; IS__TUNIT_OPM-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]] 867; IS__TUNIT_OPM: cond.true: 868; IS__TUNIT_OPM-NEXT: br label [[COND_END:%.*]] 869; IS__TUNIT_OPM: cond.false: 870; IS__TUNIT_OPM-NEXT: br label [[COND_END]] 871; IS__TUNIT_OPM: cond.end: 872; IS__TUNIT_OPM-NEXT: [[I2:%.*]] = bitcast i32* [[L]] to i8* 873; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR13]] 874; IS__TUNIT_OPM-NEXT: ret i32 5 875; 876; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn 877; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1 878; IS__TUNIT_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR3]] { 879; IS__TUNIT_NPM-NEXT: entry: 880; IS__TUNIT_NPM-NEXT: [[L:%.*]] = alloca i32, align 4 881; IS__TUNIT_NPM-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8* 882; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR12]] 883; IS__TUNIT_NPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0 884; IS__TUNIT_NPM-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]] 885; IS__TUNIT_NPM: cond.true: 886; IS__TUNIT_NPM-NEXT: br label [[COND_END:%.*]] 887; IS__TUNIT_NPM: cond.false: 888; IS__TUNIT_NPM-NEXT: br label [[COND_END]] 889; IS__TUNIT_NPM: cond.end: 890; IS__TUNIT_NPM-NEXT: [[I2:%.*]] = bitcast i32* [[L]] to i8* 891; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR12]] 892; IS__TUNIT_NPM-NEXT: ret i32 5 893; 894; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn 895; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1 896; IS__CGSCC_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR4:[0-9]+]] { 897; IS__CGSCC_OPM-NEXT: entry: 898; IS__CGSCC_OPM-NEXT: [[L:%.*]] = alloca i32, align 4 899; IS__CGSCC_OPM-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8* 900; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR15]] 901; IS__CGSCC_OPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0 902; IS__CGSCC_OPM-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]] 903; IS__CGSCC_OPM: cond.true: 904; IS__CGSCC_OPM-NEXT: br label [[COND_END:%.*]] 905; IS__CGSCC_OPM: cond.false: 906; IS__CGSCC_OPM-NEXT: br label [[COND_END]] 907; IS__CGSCC_OPM: cond.end: 908; IS__CGSCC_OPM-NEXT: [[I2:%.*]] = bitcast i32* [[L]] to i8* 909; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR15]] 910; IS__CGSCC_OPM-NEXT: ret i32 5 911; 912; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn 913; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1 914; IS__CGSCC_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR4:[0-9]+]] { 915; IS__CGSCC_NPM-NEXT: entry: 916; IS__CGSCC_NPM-NEXT: [[L:%.*]] = alloca i32, align 4 917; IS__CGSCC_NPM-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8* 918; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR14]] 919; IS__CGSCC_NPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0 920; IS__CGSCC_NPM-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]] 921; IS__CGSCC_NPM: cond.true: 922; IS__CGSCC_NPM-NEXT: br label [[COND_END:%.*]] 923; IS__CGSCC_NPM: cond.false: 924; IS__CGSCC_NPM-NEXT: br label [[COND_END]] 925; IS__CGSCC_NPM: cond.end: 926; IS__CGSCC_NPM-NEXT: [[I2:%.*]] = bitcast i32* [[L]] to i8* 927; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR14]] 928; IS__CGSCC_NPM-NEXT: ret i32 5 929; 930entry: 931 %L = alloca i32, align 4 932 %i = bitcast i32* %L to i8* 933 call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %i) 934 store i32 5, i32* @GI1, align 4, !tbaa !3 935 store i32 5, i32* %L, align 4, !tbaa !3 936 %tobool.not = icmp eq i32 %cnd, 0 937 br i1 %tobool.not, label %cond.false, label %cond.true 938 939cond.true: ; preds = %entry 940 br label %cond.end 941 942cond.false: ; preds = %entry 943 br label %cond.end 944 945cond.end: ; preds = %cond.false, %cond.true 946 %cond = phi i32* [ @GI1, %cond.true ], [ %L, %cond.false ] 947 %i1 = load i32, i32* %cond, align 4, !tbaa !3 948 %i2 = bitcast i32* %L to i8* 949 call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %i2) 950 ret i32 %i1 951} 952 953; static int GI2 __attribute__((loader_uninitialized)); 954; int multi_obj_simplifiable_2(int cnd) { 955; int L; 956; int *p = cnd ? &GI2 : &L; 957; *p = 5; 958; return *p; 959; } 960; 961define i32 @multi_obj_simplifiable_2(i32 %cnd) { 962; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn 963; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2 964; IS__TUNIT_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR5]] { 965; IS__TUNIT_OPM-NEXT: entry: 966; IS__TUNIT_OPM-NEXT: [[L:%.*]] = alloca i32, align 4 967; IS__TUNIT_OPM-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8* 968; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR13]] 969; IS__TUNIT_OPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0 970; IS__TUNIT_OPM-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]] 971; IS__TUNIT_OPM: cond.true: 972; IS__TUNIT_OPM-NEXT: br label [[COND_END:%.*]] 973; IS__TUNIT_OPM: cond.false: 974; IS__TUNIT_OPM-NEXT: br label [[COND_END]] 975; IS__TUNIT_OPM: cond.end: 976; IS__TUNIT_OPM-NEXT: [[I1:%.*]] = bitcast i32* [[L]] to i8* 977; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR13]] 978; IS__TUNIT_OPM-NEXT: ret i32 5 979; 980; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn 981; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2 982; IS__TUNIT_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR3]] { 983; IS__TUNIT_NPM-NEXT: entry: 984; IS__TUNIT_NPM-NEXT: [[L:%.*]] = alloca i32, align 4 985; IS__TUNIT_NPM-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8* 986; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR12]] 987; IS__TUNIT_NPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0 988; IS__TUNIT_NPM-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]] 989; IS__TUNIT_NPM: cond.true: 990; IS__TUNIT_NPM-NEXT: br label [[COND_END:%.*]] 991; IS__TUNIT_NPM: cond.false: 992; IS__TUNIT_NPM-NEXT: br label [[COND_END]] 993; IS__TUNIT_NPM: cond.end: 994; IS__TUNIT_NPM-NEXT: [[I1:%.*]] = bitcast i32* [[L]] to i8* 995; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR12]] 996; IS__TUNIT_NPM-NEXT: ret i32 5 997; 998; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn 999; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2 1000; IS__CGSCC_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR4]] { 1001; IS__CGSCC_OPM-NEXT: entry: 1002; IS__CGSCC_OPM-NEXT: [[L:%.*]] = alloca i32, align 4 1003; IS__CGSCC_OPM-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8* 1004; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR15]] 1005; IS__CGSCC_OPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0 1006; IS__CGSCC_OPM-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]] 1007; IS__CGSCC_OPM: cond.true: 1008; IS__CGSCC_OPM-NEXT: br label [[COND_END:%.*]] 1009; IS__CGSCC_OPM: cond.false: 1010; IS__CGSCC_OPM-NEXT: br label [[COND_END]] 1011; IS__CGSCC_OPM: cond.end: 1012; IS__CGSCC_OPM-NEXT: [[I1:%.*]] = bitcast i32* [[L]] to i8* 1013; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR15]] 1014; IS__CGSCC_OPM-NEXT: ret i32 5 1015; 1016; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn 1017; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2 1018; IS__CGSCC_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR4]] { 1019; IS__CGSCC_NPM-NEXT: entry: 1020; IS__CGSCC_NPM-NEXT: [[L:%.*]] = alloca i32, align 4 1021; IS__CGSCC_NPM-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8* 1022; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR14]] 1023; IS__CGSCC_NPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0 1024; IS__CGSCC_NPM-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]] 1025; IS__CGSCC_NPM: cond.true: 1026; IS__CGSCC_NPM-NEXT: br label [[COND_END:%.*]] 1027; IS__CGSCC_NPM: cond.false: 1028; IS__CGSCC_NPM-NEXT: br label [[COND_END]] 1029; IS__CGSCC_NPM: cond.end: 1030; IS__CGSCC_NPM-NEXT: [[I1:%.*]] = bitcast i32* [[L]] to i8* 1031; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR14]] 1032; IS__CGSCC_NPM-NEXT: ret i32 5 1033; 1034entry: 1035 %L = alloca i32, align 4 1036 %i = bitcast i32* %L to i8* 1037 call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %i) 1038 %tobool.not = icmp eq i32 %cnd, 0 1039 br i1 %tobool.not, label %cond.false, label %cond.true 1040 1041cond.true: ; preds = %entry 1042 br label %cond.end 1043 1044cond.false: ; preds = %entry 1045 br label %cond.end 1046 1047cond.end: ; preds = %cond.false, %cond.true 1048 %cond = phi i32* [ @GI2, %cond.true ], [ %L, %cond.false ] 1049 store i32 5, i32* %cond, align 4, !tbaa !3 1050 %i1 = bitcast i32* %L to i8* 1051 %l = load i32, i32* %cond, align 4, !tbaa !3 1052 call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %i1) 1053 ret i32 %l 1054} 1055 1056; static struct S Gs __attribute__((loader_uninitialized)); 1057; struct S static_global_simplifiable_1(void) { 1058; Gs.f1 = 1.1; 1059; Gs.f2 = 2.2; 1060; Gs.f3 = 3.3; 1061; write_arg(&Gs.i1, 1); 1062; write_arg(&Gs.i2, 2); 1063; write_arg(&Gs.i3, 3); 1064; struct S r; 1065; r.f1 = Gs.f1; 1066; r.f2 = Gs.f2 * 2; 1067; r.f3 = Gs.f3 + Gs.f1; 1068; r.i1 = Gs.i1; 1069; r.i2 = Gs.i2 * 2; 1070; r.i3 = Gs.i3 + Gs.i1; 1071; return r; 1072; } 1073; 1074define void @static_global_simplifiable_1(%struct.S* noalias sret(%struct.S) align 4 %agg.result) { 1075; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly 1076; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@static_global_simplifiable_1 1077; IS__TUNIT_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR6:[0-9]+]] { 1078; IS__TUNIT_OPM-NEXT: entry: 1079; 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) #[[ATTR14]] 1080; 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) #[[ATTR14]] 1081; 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) #[[ATTR14]] 1082; IS__TUNIT_OPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 1083; IS__TUNIT_OPM-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]] 1084; IS__TUNIT_OPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4 1085; IS__TUNIT_OPM-NEXT: store float 0x40119999A0000000, float* [[F2]], align 4, !tbaa [[TBAA10]] 1086; IS__TUNIT_OPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5 1087; IS__TUNIT_OPM-NEXT: store float 0x40119999A0000000, float* [[F3]], align 4, !tbaa [[TBAA11]] 1088; IS__TUNIT_OPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0 1089; IS__TUNIT_OPM-NEXT: store i32 1, i32* [[I1]], align 4, !tbaa [[TBAA12]] 1090; IS__TUNIT_OPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1 1091; IS__TUNIT_OPM-NEXT: store i32 4, i32* [[I2]], align 4, !tbaa [[TBAA13]] 1092; IS__TUNIT_OPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2 1093; IS__TUNIT_OPM-NEXT: store i32 4, i32* [[I3]], align 4, !tbaa [[TBAA14]] 1094; IS__TUNIT_OPM-NEXT: ret void 1095; 1096; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly 1097; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_1 1098; IS__TUNIT_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR5:[0-9]+]] { 1099; IS__TUNIT_NPM-NEXT: entry: 1100; 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) #[[ATTR13]] 1101; 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) #[[ATTR13]] 1102; 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) #[[ATTR13]] 1103; IS__TUNIT_NPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 1104; IS__TUNIT_NPM-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]] 1105; IS__TUNIT_NPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4 1106; IS__TUNIT_NPM-NEXT: store float 0x40119999A0000000, float* [[F2]], align 4, !tbaa [[TBAA10]] 1107; IS__TUNIT_NPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5 1108; IS__TUNIT_NPM-NEXT: store float 0x40119999A0000000, float* [[F3]], align 4, !tbaa [[TBAA11]] 1109; IS__TUNIT_NPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0 1110; IS__TUNIT_NPM-NEXT: store i32 1, i32* [[I1]], align 4, !tbaa [[TBAA12]] 1111; IS__TUNIT_NPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1 1112; IS__TUNIT_NPM-NEXT: store i32 4, i32* [[I2]], align 4, !tbaa [[TBAA13]] 1113; IS__TUNIT_NPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2 1114; IS__TUNIT_NPM-NEXT: store i32 4, i32* [[I3]], align 4, !tbaa [[TBAA14]] 1115; IS__TUNIT_NPM-NEXT: ret void 1116; 1117; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind willreturn 1118; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@static_global_simplifiable_1 1119; IS__CGSCC_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR5:[0-9]+]] { 1120; IS__CGSCC_OPM-NEXT: entry: 1121; IS__CGSCC_OPM-NEXT: store float 0x3FF19999A0000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]] 1122; IS__CGSCC_OPM-NEXT: store float 0x40019999A0000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 4), align 4, !tbaa [[TBAA10]] 1123; IS__CGSCC_OPM-NEXT: store float 0x400A666660000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 5), align 4, !tbaa [[TBAA11]] 1124; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), i32 noundef 1) #[[ATTR16]] 1125; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), i32 noundef 2) #[[ATTR16]] 1126; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), i32 noundef 3) #[[ATTR16]] 1127; IS__CGSCC_OPM-NEXT: [[I:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]] 1128; IS__CGSCC_OPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 1129; IS__CGSCC_OPM-NEXT: store float [[I]], float* [[F1]], align 4, !tbaa [[TBAA7]] 1130; IS__CGSCC_OPM-NEXT: [[I4:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 4), align 4, !tbaa [[TBAA10]] 1131; IS__CGSCC_OPM-NEXT: [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00 1132; IS__CGSCC_OPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4 1133; IS__CGSCC_OPM-NEXT: store float [[MUL]], float* [[F2]], align 4, !tbaa [[TBAA10]] 1134; IS__CGSCC_OPM-NEXT: [[I5:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 5), align 4, !tbaa [[TBAA11]] 1135; IS__CGSCC_OPM-NEXT: [[I6:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]] 1136; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = fadd float [[I5]], [[I6]] 1137; IS__CGSCC_OPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5 1138; IS__CGSCC_OPM-NEXT: store float [[ADD]], float* [[F3]], align 4, !tbaa [[TBAA11]] 1139; IS__CGSCC_OPM-NEXT: [[I7:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 0), align 4, !tbaa [[TBAA12]] 1140; IS__CGSCC_OPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0 1141; IS__CGSCC_OPM-NEXT: store i32 [[I7]], i32* [[I1]], align 4, !tbaa [[TBAA12]] 1142; IS__CGSCC_OPM-NEXT: [[I8:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), align 4, !tbaa [[TBAA13]] 1143; IS__CGSCC_OPM-NEXT: [[MUL1:%.*]] = shl nsw i32 [[I8]], 1 1144; IS__CGSCC_OPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1 1145; IS__CGSCC_OPM-NEXT: store i32 [[MUL1]], i32* [[I2]], align 4, !tbaa [[TBAA13]] 1146; IS__CGSCC_OPM-NEXT: [[I9:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), align 4, !tbaa [[TBAA14]] 1147; IS__CGSCC_OPM-NEXT: [[I10:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 0), align 4, !tbaa [[TBAA12]] 1148; IS__CGSCC_OPM-NEXT: [[ADD2:%.*]] = add nsw i32 [[I9]], [[I10]] 1149; IS__CGSCC_OPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2 1150; IS__CGSCC_OPM-NEXT: store i32 [[ADD2]], i32* [[I3]], align 4, !tbaa [[TBAA14]] 1151; IS__CGSCC_OPM-NEXT: ret void 1152; 1153; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn 1154; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_1 1155; IS__CGSCC_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR5:[0-9]+]] { 1156; IS__CGSCC_NPM-NEXT: entry: 1157; IS__CGSCC_NPM-NEXT: store float 0x3FF19999A0000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]] 1158; IS__CGSCC_NPM-NEXT: store float 0x40019999A0000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 4), align 4, !tbaa [[TBAA10]] 1159; IS__CGSCC_NPM-NEXT: store float 0x400A666660000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 5), align 4, !tbaa [[TBAA11]] 1160; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), i32 noundef 1) #[[ATTR15]] 1161; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), i32 noundef 2) #[[ATTR15]] 1162; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), i32 noundef 3) #[[ATTR15]] 1163; IS__CGSCC_NPM-NEXT: [[I:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]] 1164; IS__CGSCC_NPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 1165; IS__CGSCC_NPM-NEXT: store float [[I]], float* [[F1]], align 4, !tbaa [[TBAA7]] 1166; IS__CGSCC_NPM-NEXT: [[I4:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 4), align 4, !tbaa [[TBAA10]] 1167; IS__CGSCC_NPM-NEXT: [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00 1168; IS__CGSCC_NPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4 1169; IS__CGSCC_NPM-NEXT: store float [[MUL]], float* [[F2]], align 4, !tbaa [[TBAA10]] 1170; IS__CGSCC_NPM-NEXT: [[I5:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 5), align 4, !tbaa [[TBAA11]] 1171; IS__CGSCC_NPM-NEXT: [[I6:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]] 1172; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = fadd float [[I5]], [[I6]] 1173; IS__CGSCC_NPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5 1174; IS__CGSCC_NPM-NEXT: store float [[ADD]], float* [[F3]], align 4, !tbaa [[TBAA11]] 1175; IS__CGSCC_NPM-NEXT: [[I7:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 0), align 4, !tbaa [[TBAA12]] 1176; IS__CGSCC_NPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0 1177; IS__CGSCC_NPM-NEXT: store i32 [[I7]], i32* [[I1]], align 4, !tbaa [[TBAA12]] 1178; IS__CGSCC_NPM-NEXT: [[I8:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), align 4, !tbaa [[TBAA13]] 1179; IS__CGSCC_NPM-NEXT: [[MUL1:%.*]] = shl nsw i32 [[I8]], 1 1180; IS__CGSCC_NPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1 1181; IS__CGSCC_NPM-NEXT: store i32 [[MUL1]], i32* [[I2]], align 4, !tbaa [[TBAA13]] 1182; IS__CGSCC_NPM-NEXT: [[I9:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), align 4, !tbaa [[TBAA14]] 1183; IS__CGSCC_NPM-NEXT: [[I10:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 0), align 4, !tbaa [[TBAA12]] 1184; IS__CGSCC_NPM-NEXT: [[ADD2:%.*]] = add nsw i32 [[I9]], [[I10]] 1185; IS__CGSCC_NPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2 1186; IS__CGSCC_NPM-NEXT: store i32 [[ADD2]], i32* [[I3]], align 4, !tbaa [[TBAA14]] 1187; IS__CGSCC_NPM-NEXT: ret void 1188; 1189entry: 1190 store float 0x3FF19999A0000000, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa !7 1191 store float 0x40019999A0000000, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 4), align 4, !tbaa !10 1192 store float 0x400A666660000000, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 5), align 4, !tbaa !11 1193 call void @write_arg(i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 0), i32 1) 1194 call void @write_arg(i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 1), i32 2) 1195 call void @write_arg(i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 2), i32 3) 1196 %i = load float, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa !7 1197 %f1 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 3 1198 store float %i, float* %f1, align 4, !tbaa !7 1199 %i4 = load float, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 4), align 4, !tbaa !10 1200 %mul = fmul float %i4, 2.000000e+00 1201 %f2 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 4 1202 store float %mul, float* %f2, align 4, !tbaa !10 1203 %i5 = load float, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 5), align 4, !tbaa !11 1204 %i6 = load float, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa !7 1205 %add = fadd float %i5, %i6 1206 %f3 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 5 1207 store float %add, float* %f3, align 4, !tbaa !11 1208 %i7 = load i32, i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 0), align 4, !tbaa !12 1209 %i1 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 0 1210 store i32 %i7, i32* %i1, align 4, !tbaa !12 1211 %i8 = load i32, i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 1), align 4, !tbaa !13 1212 %mul1 = shl nsw i32 %i8, 1 1213 %i2 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 1 1214 store i32 %mul1, i32* %i2, align 4, !tbaa !13 1215 %i9 = load i32, i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 2), align 4, !tbaa !14 1216 %i10 = load i32, i32* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 0), align 4, !tbaa !12 1217 %add2 = add nsw i32 %i9, %i10 1218 %i3 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 2 1219 store i32 %add2, i32* %i3, align 4, !tbaa !14 1220 ret void 1221} 1222 1223; static char GBytes[1024]; 1224; void static_global_simplifiable_2(void) { 1225; for (int i = 0; i < 100; ++i) 1226; GBytes[i * 10] = 0; 1227; for (int i = 0; i < 10; ++i) 1228; ((float *)GBytes)[i * 10 + 1] = 0; 1229; for (int i = 0; i < 20; ++i) 1230; ((long long int *)GBytes)[i * 10 + 2] = 0; 1231; GBytes[1023] = 0; 1232; write_arg((int *)&GBytes[500], 0); 1233; struct S R; 1234; for (int i = 0; i < 1024; ++i) 1235; globalBytes[i] = GBytes[i]; 1236; } 1237; 1238define void @static_global_simplifiable_2() { 1239; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind 1240; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@static_global_simplifiable_2 1241; IS__TUNIT_OPM-SAME: () #[[ATTR3]] { 1242; IS__TUNIT_OPM-NEXT: entry: 1243; IS__TUNIT_OPM-NEXT: br label [[FOR_COND:%.*]] 1244; IS__TUNIT_OPM: for.cond: 1245; IS__TUNIT_OPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ] 1246; IS__TUNIT_OPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100 1247; IS__TUNIT_OPM-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]] 1248; IS__TUNIT_OPM: for.cond.cleanup: 1249; IS__TUNIT_OPM-NEXT: br label [[FOR_END:%.*]] 1250; IS__TUNIT_OPM: for.body: 1251; IS__TUNIT_OPM-NEXT: [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10 1252; IS__TUNIT_OPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[I]] 1253; IS__TUNIT_OPM-NEXT: store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15]] 1254; IS__TUNIT_OPM-NEXT: br label [[FOR_INC]] 1255; IS__TUNIT_OPM: for.inc: 1256; IS__TUNIT_OPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1 1257; IS__TUNIT_OPM-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP24:![0-9]+]] 1258; IS__TUNIT_OPM: for.end: 1259; IS__TUNIT_OPM-NEXT: br label [[FOR_COND2:%.*]] 1260; IS__TUNIT_OPM: for.cond2: 1261; IS__TUNIT_OPM-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ] 1262; IS__TUNIT_OPM-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10 1263; IS__TUNIT_OPM-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]] 1264; IS__TUNIT_OPM: for.cond.cleanup4: 1265; IS__TUNIT_OPM-NEXT: br label [[FOR_END11:%.*]] 1266; IS__TUNIT_OPM: for.body5: 1267; IS__TUNIT_OPM-NEXT: [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10 1268; IS__TUNIT_OPM-NEXT: [[I16:%.*]] = or i64 [[I15]], 1 1269; IS__TUNIT_OPM-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 [[I16]] 1270; IS__TUNIT_OPM-NEXT: store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]] 1271; IS__TUNIT_OPM-NEXT: br label [[FOR_INC9]] 1272; IS__TUNIT_OPM: for.inc9: 1273; IS__TUNIT_OPM-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1 1274; IS__TUNIT_OPM-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP25:![0-9]+]] 1275; IS__TUNIT_OPM: for.end11: 1276; IS__TUNIT_OPM-NEXT: br label [[FOR_COND13:%.*]] 1277; IS__TUNIT_OPM: for.cond13: 1278; IS__TUNIT_OPM-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ] 1279; IS__TUNIT_OPM-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20 1280; IS__TUNIT_OPM-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]] 1281; IS__TUNIT_OPM: for.cond.cleanup15: 1282; IS__TUNIT_OPM-NEXT: br label [[FOR_END23:%.*]] 1283; IS__TUNIT_OPM: for.body16: 1284; IS__TUNIT_OPM-NEXT: [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10 1285; IS__TUNIT_OPM-NEXT: [[I18:%.*]] = add nuw nsw i64 [[I17]], 2 1286; IS__TUNIT_OPM-NEXT: [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 [[I18]] 1287; IS__TUNIT_OPM-NEXT: store i64 0, i64* [[ARRAYIDX20]], align 16, !tbaa [[TBAA20]] 1288; IS__TUNIT_OPM-NEXT: br label [[FOR_INC21]] 1289; IS__TUNIT_OPM: for.inc21: 1290; IS__TUNIT_OPM-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1 1291; IS__TUNIT_OPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP26:![0-9]+]] 1292; IS__TUNIT_OPM: for.end23: 1293; 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]] 1294; 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) #[[ATTR15]] 1295; IS__TUNIT_OPM-NEXT: br label [[FOR_COND25:%.*]] 1296; IS__TUNIT_OPM: for.cond25: 1297; IS__TUNIT_OPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ] 1298; IS__TUNIT_OPM-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024 1299; IS__TUNIT_OPM-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY28:%.*]], label [[FOR_COND_CLEANUP27:%.*]] 1300; IS__TUNIT_OPM: for.cond.cleanup27: 1301; IS__TUNIT_OPM-NEXT: br label [[FOR_END35:%.*]] 1302; IS__TUNIT_OPM: for.body28: 1303; IS__TUNIT_OPM-NEXT: [[ARRAYIDX30:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[INDVARS_IV12]] 1304; IS__TUNIT_OPM-NEXT: [[I19:%.*]] = load i8, i8* [[ARRAYIDX30]], align 1, !tbaa [[TBAA15]] 1305; IS__TUNIT_OPM-NEXT: [[ARRAYIDX32:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]] 1306; IS__TUNIT_OPM-NEXT: store i8 [[I19]], i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]] 1307; IS__TUNIT_OPM-NEXT: br label [[FOR_INC33]] 1308; IS__TUNIT_OPM: for.inc33: 1309; IS__TUNIT_OPM-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1 1310; IS__TUNIT_OPM-NEXT: br label [[FOR_COND25]], !llvm.loop [[LOOP27:![0-9]+]] 1311; IS__TUNIT_OPM: for.end35: 1312; IS__TUNIT_OPM-NEXT: ret void 1313; 1314; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn 1315; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_2 1316; IS__TUNIT_NPM-SAME: () #[[ATTR3]] { 1317; IS__TUNIT_NPM-NEXT: entry: 1318; IS__TUNIT_NPM-NEXT: br label [[FOR_COND:%.*]] 1319; IS__TUNIT_NPM: for.cond: 1320; IS__TUNIT_NPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ] 1321; IS__TUNIT_NPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100 1322; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]] 1323; IS__TUNIT_NPM: for.cond.cleanup: 1324; IS__TUNIT_NPM-NEXT: br label [[FOR_END:%.*]] 1325; IS__TUNIT_NPM: for.body: 1326; IS__TUNIT_NPM-NEXT: [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10 1327; IS__TUNIT_NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[I]] 1328; IS__TUNIT_NPM-NEXT: store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15]] 1329; IS__TUNIT_NPM-NEXT: br label [[FOR_INC]] 1330; IS__TUNIT_NPM: for.inc: 1331; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1 1332; IS__TUNIT_NPM-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP24:![0-9]+]] 1333; IS__TUNIT_NPM: for.end: 1334; IS__TUNIT_NPM-NEXT: br label [[FOR_COND2:%.*]] 1335; IS__TUNIT_NPM: for.cond2: 1336; IS__TUNIT_NPM-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ] 1337; IS__TUNIT_NPM-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10 1338; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]] 1339; IS__TUNIT_NPM: for.cond.cleanup4: 1340; IS__TUNIT_NPM-NEXT: br label [[FOR_END11:%.*]] 1341; IS__TUNIT_NPM: for.body5: 1342; IS__TUNIT_NPM-NEXT: [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10 1343; IS__TUNIT_NPM-NEXT: [[I16:%.*]] = or i64 [[I15]], 1 1344; IS__TUNIT_NPM-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 [[I16]] 1345; IS__TUNIT_NPM-NEXT: store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]] 1346; IS__TUNIT_NPM-NEXT: br label [[FOR_INC9]] 1347; IS__TUNIT_NPM: for.inc9: 1348; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1 1349; IS__TUNIT_NPM-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP25:![0-9]+]] 1350; IS__TUNIT_NPM: for.end11: 1351; IS__TUNIT_NPM-NEXT: br label [[FOR_COND13:%.*]] 1352; IS__TUNIT_NPM: for.cond13: 1353; IS__TUNIT_NPM-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ] 1354; IS__TUNIT_NPM-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20 1355; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]] 1356; IS__TUNIT_NPM: for.cond.cleanup15: 1357; IS__TUNIT_NPM-NEXT: br label [[FOR_END23:%.*]] 1358; IS__TUNIT_NPM: for.body16: 1359; IS__TUNIT_NPM-NEXT: [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10 1360; IS__TUNIT_NPM-NEXT: [[I18:%.*]] = add nuw nsw i64 [[I17]], 2 1361; IS__TUNIT_NPM-NEXT: [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 [[I18]] 1362; IS__TUNIT_NPM-NEXT: store i64 0, i64* [[ARRAYIDX20]], align 16, !tbaa [[TBAA20]] 1363; IS__TUNIT_NPM-NEXT: br label [[FOR_INC21]] 1364; IS__TUNIT_NPM: for.inc21: 1365; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1 1366; IS__TUNIT_NPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP26:![0-9]+]] 1367; IS__TUNIT_NPM: for.end23: 1368; 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]] 1369; 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) #[[ATTR13]] 1370; IS__TUNIT_NPM-NEXT: br label [[FOR_COND25:%.*]] 1371; IS__TUNIT_NPM: for.cond25: 1372; IS__TUNIT_NPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ] 1373; IS__TUNIT_NPM-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024 1374; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY28:%.*]], label [[FOR_COND_CLEANUP27:%.*]] 1375; IS__TUNIT_NPM: for.cond.cleanup27: 1376; IS__TUNIT_NPM-NEXT: br label [[FOR_END35:%.*]] 1377; IS__TUNIT_NPM: for.body28: 1378; IS__TUNIT_NPM-NEXT: [[ARRAYIDX30:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[INDVARS_IV12]] 1379; IS__TUNIT_NPM-NEXT: [[I19:%.*]] = load i8, i8* [[ARRAYIDX30]], align 1, !tbaa [[TBAA15]] 1380; IS__TUNIT_NPM-NEXT: [[ARRAYIDX32:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]] 1381; IS__TUNIT_NPM-NEXT: store i8 [[I19]], i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]] 1382; IS__TUNIT_NPM-NEXT: br label [[FOR_INC33]] 1383; IS__TUNIT_NPM: for.inc33: 1384; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1 1385; IS__TUNIT_NPM-NEXT: br label [[FOR_COND25]], !llvm.loop [[LOOP27:![0-9]+]] 1386; IS__TUNIT_NPM: for.end35: 1387; IS__TUNIT_NPM-NEXT: ret void 1388; 1389; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@static_global_simplifiable_2() { 1390; IS__CGSCC_OPM-NEXT: entry: 1391; IS__CGSCC_OPM-NEXT: br label [[FOR_COND:%.*]] 1392; IS__CGSCC_OPM: for.cond: 1393; IS__CGSCC_OPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ] 1394; IS__CGSCC_OPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100 1395; IS__CGSCC_OPM-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]] 1396; IS__CGSCC_OPM: for.cond.cleanup: 1397; IS__CGSCC_OPM-NEXT: br label [[FOR_END:%.*]] 1398; IS__CGSCC_OPM: for.body: 1399; IS__CGSCC_OPM-NEXT: [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10 1400; IS__CGSCC_OPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[I]] 1401; IS__CGSCC_OPM-NEXT: store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15]] 1402; IS__CGSCC_OPM-NEXT: br label [[FOR_INC]] 1403; IS__CGSCC_OPM: for.inc: 1404; IS__CGSCC_OPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1 1405; IS__CGSCC_OPM-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP24:![0-9]+]] 1406; IS__CGSCC_OPM: for.end: 1407; IS__CGSCC_OPM-NEXT: br label [[FOR_COND2:%.*]] 1408; IS__CGSCC_OPM: for.cond2: 1409; IS__CGSCC_OPM-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ] 1410; IS__CGSCC_OPM-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10 1411; IS__CGSCC_OPM-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]] 1412; IS__CGSCC_OPM: for.cond.cleanup4: 1413; IS__CGSCC_OPM-NEXT: br label [[FOR_END11:%.*]] 1414; IS__CGSCC_OPM: for.body5: 1415; IS__CGSCC_OPM-NEXT: [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10 1416; IS__CGSCC_OPM-NEXT: [[I16:%.*]] = or i64 [[I15]], 1 1417; IS__CGSCC_OPM-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 [[I16]] 1418; IS__CGSCC_OPM-NEXT: store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]] 1419; IS__CGSCC_OPM-NEXT: br label [[FOR_INC9]] 1420; IS__CGSCC_OPM: for.inc9: 1421; IS__CGSCC_OPM-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1 1422; IS__CGSCC_OPM-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP25:![0-9]+]] 1423; IS__CGSCC_OPM: for.end11: 1424; IS__CGSCC_OPM-NEXT: br label [[FOR_COND13:%.*]] 1425; IS__CGSCC_OPM: for.cond13: 1426; IS__CGSCC_OPM-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ] 1427; IS__CGSCC_OPM-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20 1428; IS__CGSCC_OPM-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]] 1429; IS__CGSCC_OPM: for.cond.cleanup15: 1430; IS__CGSCC_OPM-NEXT: br label [[FOR_END23:%.*]] 1431; IS__CGSCC_OPM: for.body16: 1432; IS__CGSCC_OPM-NEXT: [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10 1433; IS__CGSCC_OPM-NEXT: [[I18:%.*]] = add nuw nsw i64 [[I17]], 2 1434; IS__CGSCC_OPM-NEXT: [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 [[I18]] 1435; IS__CGSCC_OPM-NEXT: store i64 0, i64* [[ARRAYIDX20]], align 16, !tbaa [[TBAA20]] 1436; IS__CGSCC_OPM-NEXT: br label [[FOR_INC21]] 1437; IS__CGSCC_OPM: for.inc21: 1438; IS__CGSCC_OPM-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1 1439; IS__CGSCC_OPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP26:![0-9]+]] 1440; IS__CGSCC_OPM: for.end23: 1441; IS__CGSCC_OPM-NEXT: store i8 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 1023), align 1, !tbaa [[TBAA15]] 1442; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR17]] 1443; IS__CGSCC_OPM-NEXT: br label [[FOR_COND25:%.*]] 1444; IS__CGSCC_OPM: for.cond25: 1445; IS__CGSCC_OPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ] 1446; IS__CGSCC_OPM-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024 1447; IS__CGSCC_OPM-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY28:%.*]], label [[FOR_COND_CLEANUP27:%.*]] 1448; IS__CGSCC_OPM: for.cond.cleanup27: 1449; IS__CGSCC_OPM-NEXT: br label [[FOR_END35:%.*]] 1450; IS__CGSCC_OPM: for.body28: 1451; IS__CGSCC_OPM-NEXT: [[ARRAYIDX30:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[INDVARS_IV12]] 1452; IS__CGSCC_OPM-NEXT: [[I19:%.*]] = load i8, i8* [[ARRAYIDX30]], align 1, !tbaa [[TBAA15]] 1453; IS__CGSCC_OPM-NEXT: [[ARRAYIDX32:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]] 1454; IS__CGSCC_OPM-NEXT: store i8 [[I19]], i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]] 1455; IS__CGSCC_OPM-NEXT: br label [[FOR_INC33]] 1456; IS__CGSCC_OPM: for.inc33: 1457; IS__CGSCC_OPM-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1 1458; IS__CGSCC_OPM-NEXT: br label [[FOR_COND25]], !llvm.loop [[LOOP27:![0-9]+]] 1459; IS__CGSCC_OPM: for.end35: 1460; IS__CGSCC_OPM-NEXT: ret void 1461; 1462; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_2() { 1463; IS__CGSCC_NPM-NEXT: entry: 1464; IS__CGSCC_NPM-NEXT: br label [[FOR_COND:%.*]] 1465; IS__CGSCC_NPM: for.cond: 1466; IS__CGSCC_NPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ] 1467; IS__CGSCC_NPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100 1468; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]] 1469; IS__CGSCC_NPM: for.cond.cleanup: 1470; IS__CGSCC_NPM-NEXT: br label [[FOR_END:%.*]] 1471; IS__CGSCC_NPM: for.body: 1472; IS__CGSCC_NPM-NEXT: [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10 1473; IS__CGSCC_NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[I]] 1474; IS__CGSCC_NPM-NEXT: store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15]] 1475; IS__CGSCC_NPM-NEXT: br label [[FOR_INC]] 1476; IS__CGSCC_NPM: for.inc: 1477; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1 1478; IS__CGSCC_NPM-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP24:![0-9]+]] 1479; IS__CGSCC_NPM: for.end: 1480; IS__CGSCC_NPM-NEXT: br label [[FOR_COND2:%.*]] 1481; IS__CGSCC_NPM: for.cond2: 1482; IS__CGSCC_NPM-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ] 1483; IS__CGSCC_NPM-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10 1484; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]] 1485; IS__CGSCC_NPM: for.cond.cleanup4: 1486; IS__CGSCC_NPM-NEXT: br label [[FOR_END11:%.*]] 1487; IS__CGSCC_NPM: for.body5: 1488; IS__CGSCC_NPM-NEXT: [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10 1489; IS__CGSCC_NPM-NEXT: [[I16:%.*]] = or i64 [[I15]], 1 1490; IS__CGSCC_NPM-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 [[I16]] 1491; IS__CGSCC_NPM-NEXT: store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]] 1492; IS__CGSCC_NPM-NEXT: br label [[FOR_INC9]] 1493; IS__CGSCC_NPM: for.inc9: 1494; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1 1495; IS__CGSCC_NPM-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP25:![0-9]+]] 1496; IS__CGSCC_NPM: for.end11: 1497; IS__CGSCC_NPM-NEXT: br label [[FOR_COND13:%.*]] 1498; IS__CGSCC_NPM: for.cond13: 1499; IS__CGSCC_NPM-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ] 1500; IS__CGSCC_NPM-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20 1501; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]] 1502; IS__CGSCC_NPM: for.cond.cleanup15: 1503; IS__CGSCC_NPM-NEXT: br label [[FOR_END23:%.*]] 1504; IS__CGSCC_NPM: for.body16: 1505; IS__CGSCC_NPM-NEXT: [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10 1506; IS__CGSCC_NPM-NEXT: [[I18:%.*]] = add nuw nsw i64 [[I17]], 2 1507; IS__CGSCC_NPM-NEXT: [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 [[I18]] 1508; IS__CGSCC_NPM-NEXT: store i64 0, i64* [[ARRAYIDX20]], align 16, !tbaa [[TBAA20]] 1509; IS__CGSCC_NPM-NEXT: br label [[FOR_INC21]] 1510; IS__CGSCC_NPM: for.inc21: 1511; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1 1512; IS__CGSCC_NPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP26:![0-9]+]] 1513; IS__CGSCC_NPM: for.end23: 1514; IS__CGSCC_NPM-NEXT: store i8 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 1023), align 1, !tbaa [[TBAA15]] 1515; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR16]] 1516; IS__CGSCC_NPM-NEXT: br label [[FOR_COND25:%.*]] 1517; IS__CGSCC_NPM: for.cond25: 1518; IS__CGSCC_NPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ] 1519; IS__CGSCC_NPM-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024 1520; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY28:%.*]], label [[FOR_COND_CLEANUP27:%.*]] 1521; IS__CGSCC_NPM: for.cond.cleanup27: 1522; IS__CGSCC_NPM-NEXT: br label [[FOR_END35:%.*]] 1523; IS__CGSCC_NPM: for.body28: 1524; IS__CGSCC_NPM-NEXT: [[ARRAYIDX30:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[INDVARS_IV12]] 1525; IS__CGSCC_NPM-NEXT: [[I19:%.*]] = load i8, i8* [[ARRAYIDX30]], align 1, !tbaa [[TBAA15]] 1526; IS__CGSCC_NPM-NEXT: [[ARRAYIDX32:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]] 1527; IS__CGSCC_NPM-NEXT: store i8 [[I19]], i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]] 1528; IS__CGSCC_NPM-NEXT: br label [[FOR_INC33]] 1529; IS__CGSCC_NPM: for.inc33: 1530; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1 1531; IS__CGSCC_NPM-NEXT: br label [[FOR_COND25]], !llvm.loop [[LOOP27:![0-9]+]] 1532; IS__CGSCC_NPM: for.end35: 1533; IS__CGSCC_NPM-NEXT: ret void 1534; 1535entry: 1536 br label %for.cond 1537 1538for.cond: ; preds = %for.inc, %entry 1539 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ] 1540 %exitcond = icmp ne i64 %indvars.iv, 100 1541 br i1 %exitcond, label %for.body, label %for.cond.cleanup 1542 1543for.cond.cleanup: ; preds = %for.cond 1544 br label %for.end 1545 1546for.body: ; preds = %for.cond 1547 %i = mul nuw nsw i64 %indvars.iv, 10 1548 %arrayidx = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 %i 1549 store i8 0, i8* %arrayidx, align 2, !tbaa !15 1550 br label %for.inc 1551 1552for.inc: ; preds = %for.body 1553 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 1554 br label %for.cond, !llvm.loop !24 1555 1556for.end: ; preds = %for.cond.cleanup 1557 br label %for.cond2 1558 1559for.cond2: ; preds = %for.inc9, %for.end 1560 %indvars.iv2 = phi i64 [ %indvars.iv.next3, %for.inc9 ], [ 0, %for.end ] 1561 %exitcond6 = icmp ne i64 %indvars.iv2, 10 1562 br i1 %exitcond6, label %for.body5, label %for.cond.cleanup4 1563 1564for.cond.cleanup4: ; preds = %for.cond2 1565 br label %for.end11 1566 1567for.body5: ; preds = %for.cond2 1568 %i15 = mul nuw nsw i64 %indvars.iv2, 10 1569 %i16 = or i64 %i15, 1 1570 %arrayidx8 = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 %i16 1571 store float 0.000000e+00, float* %arrayidx8, align 4, !tbaa !18 1572 br label %for.inc9 1573 1574for.inc9: ; preds = %for.body5 1575 %indvars.iv.next3 = add nuw nsw i64 %indvars.iv2, 1 1576 br label %for.cond2, !llvm.loop !25 1577 1578for.end11: ; preds = %for.cond.cleanup4 1579 br label %for.cond13 1580 1581for.cond13: ; preds = %for.inc21, %for.end11 1582 %indvars.iv7 = phi i64 [ %indvars.iv.next8, %for.inc21 ], [ 0, %for.end11 ] 1583 %exitcond11 = icmp ne i64 %indvars.iv7, 20 1584 br i1 %exitcond11, label %for.body16, label %for.cond.cleanup15 1585 1586for.cond.cleanup15: ; preds = %for.cond13 1587 br label %for.end23 1588 1589for.body16: ; preds = %for.cond13 1590 %i17 = mul nuw nsw i64 %indvars.iv7, 10 1591 %i18 = add nuw nsw i64 %i17, 2 1592 %arrayidx20 = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 %i18 1593 store i64 0, i64* %arrayidx20, align 16, !tbaa !20 1594 br label %for.inc21 1595 1596for.inc21: ; preds = %for.body16 1597 %indvars.iv.next8 = add nuw nsw i64 %indvars.iv7, 1 1598 br label %for.cond13, !llvm.loop !26 1599 1600for.end23: ; preds = %for.cond.cleanup15 1601 store i8 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 1023), align 1, !tbaa !15 1602 call void @write_arg(i32* bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 0) 1603 br label %for.cond25 1604 1605for.cond25: ; preds = %for.inc33, %for.end23 1606 %indvars.iv12 = phi i64 [ %indvars.iv.next13, %for.inc33 ], [ 0, %for.end23 ] 1607 %exitcond14 = icmp ne i64 %indvars.iv12, 1024 1608 br i1 %exitcond14, label %for.body28, label %for.cond.cleanup27 1609 1610for.cond.cleanup27: ; preds = %for.cond25 1611 br label %for.end35 1612 1613for.body28: ; preds = %for.cond25 1614 %arrayidx30 = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 %indvars.iv12 1615 %i19 = load i8, i8* %arrayidx30, align 1, !tbaa !15 1616 %arrayidx32 = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 %indvars.iv12 1617 store i8 %i19, i8* %arrayidx32, align 1, !tbaa !15 1618 br label %for.inc33 1619 1620for.inc33: ; preds = %for.body28 1621 %indvars.iv.next13 = add nuw nsw i64 %indvars.iv12, 1 1622 br label %for.cond25, !llvm.loop !27 1623 1624for.end35: ; preds = %for.cond.cleanup27 1625 ret void 1626} 1627 1628; static int Flag3; 1629; int static_global_simplifiable_3() { 1630; Flag3 = 1; 1631; return Flag3; 1632; } 1633define i32 @static_global_simplifiable_3() { 1634; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn 1635; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@static_global_simplifiable_3 1636; IS__TUNIT_OPM-SAME: () #[[ATTR5]] { 1637; IS__TUNIT_OPM-NEXT: store i32 1, i32* @Flag3, align 4, !tbaa [[TBAA3]] 1638; IS__TUNIT_OPM-NEXT: [[I:%.*]] = load i32, i32* @Flag3, align 4, !tbaa [[TBAA3]] 1639; IS__TUNIT_OPM-NEXT: ret i32 [[I]] 1640; 1641; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn 1642; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_3 1643; IS__TUNIT_NPM-SAME: () #[[ATTR3]] { 1644; IS__TUNIT_NPM-NEXT: store i32 1, i32* @Flag3, align 4, !tbaa [[TBAA3]] 1645; IS__TUNIT_NPM-NEXT: [[I:%.*]] = load i32, i32* @Flag3, align 4, !tbaa [[TBAA3]] 1646; IS__TUNIT_NPM-NEXT: ret i32 [[I]] 1647; 1648; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn 1649; IS__CGSCC____-LABEL: define {{[^@]+}}@static_global_simplifiable_3 1650; IS__CGSCC____-SAME: () #[[ATTR4:[0-9]+]] { 1651; IS__CGSCC____-NEXT: store i32 1, i32* @Flag3, align 4, !tbaa [[TBAA3]] 1652; IS__CGSCC____-NEXT: [[I:%.*]] = load i32, i32* @Flag3, align 4, !tbaa [[TBAA3]] 1653; IS__CGSCC____-NEXT: ret i32 [[I]] 1654; 1655 store i32 1, i32* @Flag3, align 4, !tbaa !3 1656 %i = load i32, i32* @Flag3, align 4, !tbaa !3 1657 ret i32 %i 1658} 1659 1660; struct S noalias_arg_simplifiable_1(struct S s) { 1661; s.f1 = 1.1; 1662; s.f2 = 2.2; 1663; s.f3 = 3.3; 1664; write_arg(&s.i1, 1); 1665; write_arg(&s.i2, 2); 1666; write_arg(&s.i3, 3); 1667; struct S r; 1668; r.f1 = s.f1; 1669; r.f2 = s.f2 * 2; 1670; r.f3 = s.f3 + s.f1; 1671; r.i1 = s.i1; 1672; r.i2 = s.i2 * 2; 1673; r.i3 = s.i3 + s.i1; 1674; return r; 1675; } 1676; 1677define void @noalias_arg_simplifiable_1(%struct.S* noalias sret(%struct.S) align 4 %agg.result, %struct.S* byval(%struct.S) align 8 %s) { 1678; IS__TUNIT_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn 1679; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1 1680; 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]] { 1681; IS__TUNIT_OPM-NEXT: entry: 1682; IS__TUNIT_OPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 1683; IS__TUNIT_OPM-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]] 1684; IS__TUNIT_OPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4 1685; IS__TUNIT_OPM-NEXT: store float 0x40019999A0000000, float* [[F2]], align 8, !tbaa [[TBAA10]] 1686; IS__TUNIT_OPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 1687; IS__TUNIT_OPM-NEXT: store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]] 1688; IS__TUNIT_OPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 1689; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR14]] 1690; IS__TUNIT_OPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 1691; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR14]] 1692; IS__TUNIT_OPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 1693; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR14]] 1694; IS__TUNIT_OPM-NEXT: [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 1695; IS__TUNIT_OPM-NEXT: [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]] 1696; IS__TUNIT_OPM-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 1697; IS__TUNIT_OPM-NEXT: store float [[I]], float* [[F12]], align 4, !tbaa [[TBAA7]] 1698; IS__TUNIT_OPM-NEXT: [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4 1699; IS__TUNIT_OPM-NEXT: [[I4:%.*]] = load float, float* [[F23]], align 8, !tbaa [[TBAA10]] 1700; IS__TUNIT_OPM-NEXT: [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00 1701; IS__TUNIT_OPM-NEXT: [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4 1702; IS__TUNIT_OPM-NEXT: store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]] 1703; IS__TUNIT_OPM-NEXT: [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 1704; IS__TUNIT_OPM-NEXT: [[I5:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]] 1705; IS__TUNIT_OPM-NEXT: [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 1706; IS__TUNIT_OPM-NEXT: [[I6:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]] 1707; IS__TUNIT_OPM-NEXT: [[ADD:%.*]] = fadd float [[I5]], [[I6]] 1708; IS__TUNIT_OPM-NEXT: [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5 1709; IS__TUNIT_OPM-NEXT: store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]] 1710; IS__TUNIT_OPM-NEXT: [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 1711; IS__TUNIT_OPM-NEXT: [[I7:%.*]] = load i32, i32* [[I18]], align 8, !tbaa [[TBAA12]] 1712; IS__TUNIT_OPM-NEXT: [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0 1713; IS__TUNIT_OPM-NEXT: store i32 [[I7]], i32* [[I19]], align 4, !tbaa [[TBAA12]] 1714; IS__TUNIT_OPM-NEXT: [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 1715; IS__TUNIT_OPM-NEXT: [[I8:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13]] 1716; IS__TUNIT_OPM-NEXT: [[MUL11:%.*]] = shl nsw i32 [[I8]], 1 1717; IS__TUNIT_OPM-NEXT: [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1 1718; IS__TUNIT_OPM-NEXT: store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]] 1719; IS__TUNIT_OPM-NEXT: [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 1720; IS__TUNIT_OPM-NEXT: [[I9:%.*]] = load i32, i32* [[I313]], align 8, !tbaa [[TBAA14]] 1721; IS__TUNIT_OPM-NEXT: [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 1722; IS__TUNIT_OPM-NEXT: [[I10:%.*]] = load i32, i32* [[I114]], align 8, !tbaa [[TBAA12]] 1723; IS__TUNIT_OPM-NEXT: [[ADD15:%.*]] = add nsw i32 [[I9]], [[I10]] 1724; IS__TUNIT_OPM-NEXT: [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2 1725; IS__TUNIT_OPM-NEXT: store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]] 1726; IS__TUNIT_OPM-NEXT: ret void 1727; 1728; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn 1729; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1 1730; 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]] { 1731; IS__TUNIT_NPM-NEXT: entry: 1732; IS__TUNIT_NPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 1733; IS__TUNIT_NPM-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]] 1734; IS__TUNIT_NPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4 1735; IS__TUNIT_NPM-NEXT: store float 0x40019999A0000000, float* [[F2]], align 8, !tbaa [[TBAA10]] 1736; IS__TUNIT_NPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 1737; IS__TUNIT_NPM-NEXT: store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]] 1738; IS__TUNIT_NPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 1739; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR13]] 1740; IS__TUNIT_NPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 1741; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR13]] 1742; IS__TUNIT_NPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 1743; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR13]] 1744; IS__TUNIT_NPM-NEXT: [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 1745; IS__TUNIT_NPM-NEXT: [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]] 1746; IS__TUNIT_NPM-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 1747; IS__TUNIT_NPM-NEXT: store float [[I]], float* [[F12]], align 4, !tbaa [[TBAA7]] 1748; IS__TUNIT_NPM-NEXT: [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4 1749; IS__TUNIT_NPM-NEXT: [[I4:%.*]] = load float, float* [[F23]], align 8, !tbaa [[TBAA10]] 1750; IS__TUNIT_NPM-NEXT: [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00 1751; IS__TUNIT_NPM-NEXT: [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4 1752; IS__TUNIT_NPM-NEXT: store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]] 1753; IS__TUNIT_NPM-NEXT: [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 1754; IS__TUNIT_NPM-NEXT: [[I5:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]] 1755; IS__TUNIT_NPM-NEXT: [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 1756; IS__TUNIT_NPM-NEXT: [[I6:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]] 1757; IS__TUNIT_NPM-NEXT: [[ADD:%.*]] = fadd float [[I5]], [[I6]] 1758; IS__TUNIT_NPM-NEXT: [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5 1759; IS__TUNIT_NPM-NEXT: store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]] 1760; IS__TUNIT_NPM-NEXT: [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 1761; IS__TUNIT_NPM-NEXT: [[I7:%.*]] = load i32, i32* [[I18]], align 8, !tbaa [[TBAA12]] 1762; IS__TUNIT_NPM-NEXT: [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0 1763; IS__TUNIT_NPM-NEXT: store i32 [[I7]], i32* [[I19]], align 4, !tbaa [[TBAA12]] 1764; IS__TUNIT_NPM-NEXT: [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 1765; IS__TUNIT_NPM-NEXT: [[I8:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13]] 1766; IS__TUNIT_NPM-NEXT: [[MUL11:%.*]] = shl nsw i32 [[I8]], 1 1767; IS__TUNIT_NPM-NEXT: [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1 1768; IS__TUNIT_NPM-NEXT: store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]] 1769; IS__TUNIT_NPM-NEXT: [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 1770; IS__TUNIT_NPM-NEXT: [[I9:%.*]] = load i32, i32* [[I313]], align 8, !tbaa [[TBAA14]] 1771; IS__TUNIT_NPM-NEXT: [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 1772; IS__TUNIT_NPM-NEXT: [[I10:%.*]] = load i32, i32* [[I114]], align 8, !tbaa [[TBAA12]] 1773; IS__TUNIT_NPM-NEXT: [[ADD15:%.*]] = add nsw i32 [[I9]], [[I10]] 1774; IS__TUNIT_NPM-NEXT: [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2 1775; IS__TUNIT_NPM-NEXT: store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]] 1776; IS__TUNIT_NPM-NEXT: ret void 1777; 1778; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn 1779; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1 1780; IS__CGSCC_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]], %struct.S* noalias nocapture nofree nonnull byval([[STRUCT_S]]) align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR1]] { 1781; IS__CGSCC_OPM-NEXT: entry: 1782; IS__CGSCC_OPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 1783; IS__CGSCC_OPM-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]] 1784; IS__CGSCC_OPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4 1785; IS__CGSCC_OPM-NEXT: store float 0x40019999A0000000, float* [[F2]], align 8, !tbaa [[TBAA10]] 1786; IS__CGSCC_OPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 1787; IS__CGSCC_OPM-NEXT: store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]] 1788; IS__CGSCC_OPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 1789; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR16]] 1790; IS__CGSCC_OPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 1791; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR16]] 1792; IS__CGSCC_OPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 1793; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR16]] 1794; IS__CGSCC_OPM-NEXT: [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 1795; IS__CGSCC_OPM-NEXT: [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]] 1796; IS__CGSCC_OPM-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 1797; IS__CGSCC_OPM-NEXT: store float [[I]], float* [[F12]], align 4, !tbaa [[TBAA7]] 1798; IS__CGSCC_OPM-NEXT: [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4 1799; IS__CGSCC_OPM-NEXT: [[I4:%.*]] = load float, float* [[F23]], align 8, !tbaa [[TBAA10]] 1800; IS__CGSCC_OPM-NEXT: [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00 1801; IS__CGSCC_OPM-NEXT: [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4 1802; IS__CGSCC_OPM-NEXT: store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]] 1803; IS__CGSCC_OPM-NEXT: [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 1804; IS__CGSCC_OPM-NEXT: [[I5:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]] 1805; IS__CGSCC_OPM-NEXT: [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 1806; IS__CGSCC_OPM-NEXT: [[I6:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]] 1807; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = fadd float [[I5]], [[I6]] 1808; IS__CGSCC_OPM-NEXT: [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5 1809; IS__CGSCC_OPM-NEXT: store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]] 1810; IS__CGSCC_OPM-NEXT: [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 1811; IS__CGSCC_OPM-NEXT: [[I7:%.*]] = load i32, i32* [[I18]], align 8, !tbaa [[TBAA12]] 1812; IS__CGSCC_OPM-NEXT: [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0 1813; IS__CGSCC_OPM-NEXT: store i32 [[I7]], i32* [[I19]], align 4, !tbaa [[TBAA12]] 1814; IS__CGSCC_OPM-NEXT: [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 1815; IS__CGSCC_OPM-NEXT: [[I8:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13]] 1816; IS__CGSCC_OPM-NEXT: [[MUL11:%.*]] = shl nsw i32 [[I8]], 1 1817; IS__CGSCC_OPM-NEXT: [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1 1818; IS__CGSCC_OPM-NEXT: store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]] 1819; IS__CGSCC_OPM-NEXT: [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 1820; IS__CGSCC_OPM-NEXT: [[I9:%.*]] = load i32, i32* [[I313]], align 8, !tbaa [[TBAA14]] 1821; IS__CGSCC_OPM-NEXT: [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 1822; IS__CGSCC_OPM-NEXT: [[I10:%.*]] = load i32, i32* [[I114]], align 8, !tbaa [[TBAA12]] 1823; IS__CGSCC_OPM-NEXT: [[ADD15:%.*]] = add nsw i32 [[I9]], [[I10]] 1824; IS__CGSCC_OPM-NEXT: [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2 1825; IS__CGSCC_OPM-NEXT: store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]] 1826; IS__CGSCC_OPM-NEXT: ret void 1827; 1828; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn 1829; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1 1830; IS__CGSCC_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]], %struct.S* noalias nocapture nofree nonnull byval([[STRUCT_S]]) align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR1]] { 1831; IS__CGSCC_NPM-NEXT: entry: 1832; IS__CGSCC_NPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 1833; IS__CGSCC_NPM-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]] 1834; IS__CGSCC_NPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4 1835; IS__CGSCC_NPM-NEXT: store float 0x40019999A0000000, float* [[F2]], align 8, !tbaa [[TBAA10]] 1836; IS__CGSCC_NPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 1837; IS__CGSCC_NPM-NEXT: store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]] 1838; IS__CGSCC_NPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 1839; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR15]] 1840; IS__CGSCC_NPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 1841; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR15]] 1842; IS__CGSCC_NPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 1843; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR15]] 1844; IS__CGSCC_NPM-NEXT: [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 1845; IS__CGSCC_NPM-NEXT: [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]] 1846; IS__CGSCC_NPM-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 1847; IS__CGSCC_NPM-NEXT: store float [[I]], float* [[F12]], align 4, !tbaa [[TBAA7]] 1848; IS__CGSCC_NPM-NEXT: [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4 1849; IS__CGSCC_NPM-NEXT: [[I4:%.*]] = load float, float* [[F23]], align 8, !tbaa [[TBAA10]] 1850; IS__CGSCC_NPM-NEXT: [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00 1851; IS__CGSCC_NPM-NEXT: [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4 1852; IS__CGSCC_NPM-NEXT: store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]] 1853; IS__CGSCC_NPM-NEXT: [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 1854; IS__CGSCC_NPM-NEXT: [[I5:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]] 1855; IS__CGSCC_NPM-NEXT: [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 1856; IS__CGSCC_NPM-NEXT: [[I6:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]] 1857; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = fadd float [[I5]], [[I6]] 1858; IS__CGSCC_NPM-NEXT: [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5 1859; IS__CGSCC_NPM-NEXT: store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]] 1860; IS__CGSCC_NPM-NEXT: [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 1861; IS__CGSCC_NPM-NEXT: [[I7:%.*]] = load i32, i32* [[I18]], align 8, !tbaa [[TBAA12]] 1862; IS__CGSCC_NPM-NEXT: [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0 1863; IS__CGSCC_NPM-NEXT: store i32 [[I7]], i32* [[I19]], align 4, !tbaa [[TBAA12]] 1864; IS__CGSCC_NPM-NEXT: [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 1865; IS__CGSCC_NPM-NEXT: [[I8:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13]] 1866; IS__CGSCC_NPM-NEXT: [[MUL11:%.*]] = shl nsw i32 [[I8]], 1 1867; IS__CGSCC_NPM-NEXT: [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1 1868; IS__CGSCC_NPM-NEXT: store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]] 1869; IS__CGSCC_NPM-NEXT: [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 1870; IS__CGSCC_NPM-NEXT: [[I9:%.*]] = load i32, i32* [[I313]], align 8, !tbaa [[TBAA14]] 1871; IS__CGSCC_NPM-NEXT: [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 1872; IS__CGSCC_NPM-NEXT: [[I10:%.*]] = load i32, i32* [[I114]], align 8, !tbaa [[TBAA12]] 1873; IS__CGSCC_NPM-NEXT: [[ADD15:%.*]] = add nsw i32 [[I9]], [[I10]] 1874; IS__CGSCC_NPM-NEXT: [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2 1875; IS__CGSCC_NPM-NEXT: store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]] 1876; IS__CGSCC_NPM-NEXT: ret void 1877; 1878entry: 1879 %f1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 3 1880 store float 0x3FF19999A0000000, float* %f1, align 4, !tbaa !7 1881 %f2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 4 1882 store float 0x40019999A0000000, float* %f2, align 8, !tbaa !10 1883 %f3 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 5 1884 store float 0x400A666660000000, float* %f3, align 4, !tbaa !11 1885 %i1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0 1886 call void @write_arg(i32* nonnull %i1, i32 1) 1887 %i2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1 1888 call void @write_arg(i32* nonnull %i2, i32 2) 1889 %i3 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 2 1890 call void @write_arg(i32* nonnull %i3, i32 3) 1891 %f11 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 3 1892 %i = load float, float* %f11, align 4, !tbaa !7 1893 %f12 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 3 1894 store float %i, float* %f12, align 4, !tbaa !7 1895 %f23 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 4 1896 %i4 = load float, float* %f23, align 8, !tbaa !10 1897 %mul = fmul float %i4, 2.000000e+00 1898 %f24 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 4 1899 store float %mul, float* %f24, align 4, !tbaa !10 1900 %f35 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 5 1901 %i5 = load float, float* %f35, align 4, !tbaa !11 1902 %f16 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 3 1903 %i6 = load float, float* %f16, align 4, !tbaa !7 1904 %add = fadd float %i5, %i6 1905 %f37 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 5 1906 store float %add, float* %f37, align 4, !tbaa !11 1907 %i18 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0 1908 %i7 = load i32, i32* %i18, align 8, !tbaa !12 1909 %i19 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 0 1910 store i32 %i7, i32* %i19, align 4, !tbaa !12 1911 %i210 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1 1912 %i8 = load i32, i32* %i210, align 4, !tbaa !13 1913 %mul11 = shl nsw i32 %i8, 1 1914 %i212 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 1 1915 store i32 %mul11, i32* %i212, align 4, !tbaa !13 1916 %i313 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 2 1917 %i9 = load i32, i32* %i313, align 8, !tbaa !14 1918 %i114 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0 1919 %i10 = load i32, i32* %i114, align 8, !tbaa !12 1920 %add15 = add nsw i32 %i9, %i10 1921 %i316 = getelementptr inbounds %struct.S, %struct.S* %agg.result, i64 0, i32 2 1922 store i32 %add15, i32* %i316, align 4, !tbaa !14 1923 ret void 1924} 1925 1926; void noalias_arg_simplifiable_2(char Bytes[1024]) { 1927; for (int i = 0; i < 100; ++i) 1928; Bytes[i * 10] = 0; 1929; for (int i = 0; i < 10; ++i) 1930; ((float *)Bytes)[i * 10 + 1] = 0; 1931; for (int i = 0; i < 20; ++i) 1932; ((long long int *)Bytes)[i * 10 + 2] = 0; 1933; Bytes[1023] = 0; 1934; write_arg((int *)&Bytes[500], 0); 1935; struct S R; 1936; for (int i = 0; i < 1024; ++i) 1937; globalBytes[i] = Bytes[i]; 1938; } 1939; 1940define void @noalias_arg_simplifiable_2(i8* %Bytes) { 1941; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind 1942; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_2 1943; IS__TUNIT_OPM-SAME: (i8* nocapture nofree [[BYTES:%.*]]) #[[ATTR3]] { 1944; IS__TUNIT_OPM-NEXT: entry: 1945; IS__TUNIT_OPM-NEXT: br label [[FOR_COND:%.*]] 1946; IS__TUNIT_OPM: for.cond: 1947; IS__TUNIT_OPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ] 1948; IS__TUNIT_OPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100 1949; IS__TUNIT_OPM-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]] 1950; IS__TUNIT_OPM: for.cond.cleanup: 1951; IS__TUNIT_OPM-NEXT: br label [[FOR_END:%.*]] 1952; IS__TUNIT_OPM: for.body: 1953; IS__TUNIT_OPM-NEXT: [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10 1954; IS__TUNIT_OPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[I]] 1955; IS__TUNIT_OPM-NEXT: store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA15]] 1956; IS__TUNIT_OPM-NEXT: br label [[FOR_INC]] 1957; IS__TUNIT_OPM: for.inc: 1958; IS__TUNIT_OPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1 1959; IS__TUNIT_OPM-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP28:![0-9]+]] 1960; IS__TUNIT_OPM: for.end: 1961; IS__TUNIT_OPM-NEXT: br label [[FOR_COND2:%.*]] 1962; IS__TUNIT_OPM: for.cond2: 1963; IS__TUNIT_OPM-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ] 1964; IS__TUNIT_OPM-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10 1965; IS__TUNIT_OPM-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]] 1966; IS__TUNIT_OPM: for.cond.cleanup4: 1967; IS__TUNIT_OPM-NEXT: br label [[FOR_END11:%.*]] 1968; IS__TUNIT_OPM: for.body5: 1969; IS__TUNIT_OPM-NEXT: [[I15:%.*]] = bitcast i8* [[BYTES]] to float* 1970; IS__TUNIT_OPM-NEXT: [[I16:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10 1971; IS__TUNIT_OPM-NEXT: [[I17:%.*]] = or i64 [[I16]], 1 1972; IS__TUNIT_OPM-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I15]], i64 [[I17]] 1973; IS__TUNIT_OPM-NEXT: store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]] 1974; IS__TUNIT_OPM-NEXT: br label [[FOR_INC9]] 1975; IS__TUNIT_OPM: for.inc9: 1976; IS__TUNIT_OPM-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1 1977; IS__TUNIT_OPM-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP29:![0-9]+]] 1978; IS__TUNIT_OPM: for.end11: 1979; IS__TUNIT_OPM-NEXT: br label [[FOR_COND13:%.*]] 1980; IS__TUNIT_OPM: for.cond13: 1981; IS__TUNIT_OPM-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ] 1982; IS__TUNIT_OPM-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20 1983; IS__TUNIT_OPM-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]] 1984; IS__TUNIT_OPM: for.cond.cleanup15: 1985; IS__TUNIT_OPM-NEXT: br label [[FOR_END23:%.*]] 1986; IS__TUNIT_OPM: for.body16: 1987; IS__TUNIT_OPM-NEXT: [[I18:%.*]] = bitcast i8* [[BYTES]] to i64* 1988; IS__TUNIT_OPM-NEXT: [[I19:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10 1989; IS__TUNIT_OPM-NEXT: [[I20:%.*]] = add nuw nsw i64 [[I19]], 2 1990; IS__TUNIT_OPM-NEXT: [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* [[I18]], i64 [[I20]] 1991; IS__TUNIT_OPM-NEXT: store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA20]] 1992; IS__TUNIT_OPM-NEXT: br label [[FOR_INC21]] 1993; IS__TUNIT_OPM: for.inc21: 1994; IS__TUNIT_OPM-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1 1995; IS__TUNIT_OPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP30:![0-9]+]] 1996; IS__TUNIT_OPM: for.end23: 1997; IS__TUNIT_OPM-NEXT: [[ARRAYIDX24:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 1023 1998; IS__TUNIT_OPM-NEXT: store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA15]] 1999; IS__TUNIT_OPM-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500 2000; IS__TUNIT_OPM-NEXT: [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32* 2001; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 [[I21]], i32 noundef 0) #[[ATTR15]] 2002; IS__TUNIT_OPM-NEXT: br label [[FOR_COND27:%.*]] 2003; IS__TUNIT_OPM: for.cond27: 2004; IS__TUNIT_OPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ] 2005; IS__TUNIT_OPM-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024 2006; IS__TUNIT_OPM-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY30:%.*]], label [[FOR_COND_CLEANUP29:%.*]] 2007; IS__TUNIT_OPM: for.cond.cleanup29: 2008; IS__TUNIT_OPM-NEXT: br label [[FOR_END37:%.*]] 2009; IS__TUNIT_OPM: for.body30: 2010; IS__TUNIT_OPM-NEXT: [[ARRAYIDX32:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[INDVARS_IV12]] 2011; IS__TUNIT_OPM-NEXT: [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]] 2012; IS__TUNIT_OPM-NEXT: [[ARRAYIDX34:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]] 2013; IS__TUNIT_OPM-NEXT: store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA15]] 2014; IS__TUNIT_OPM-NEXT: br label [[FOR_INC35]] 2015; IS__TUNIT_OPM: for.inc35: 2016; IS__TUNIT_OPM-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1 2017; IS__TUNIT_OPM-NEXT: br label [[FOR_COND27]], !llvm.loop [[LOOP31:![0-9]+]] 2018; IS__TUNIT_OPM: for.end37: 2019; IS__TUNIT_OPM-NEXT: ret void 2020; 2021; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn 2022; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_2 2023; IS__TUNIT_NPM-SAME: (i8* nocapture nofree [[BYTES:%.*]]) #[[ATTR3]] { 2024; IS__TUNIT_NPM-NEXT: entry: 2025; IS__TUNIT_NPM-NEXT: br label [[FOR_COND:%.*]] 2026; IS__TUNIT_NPM: for.cond: 2027; IS__TUNIT_NPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ] 2028; IS__TUNIT_NPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100 2029; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]] 2030; IS__TUNIT_NPM: for.cond.cleanup: 2031; IS__TUNIT_NPM-NEXT: br label [[FOR_END:%.*]] 2032; IS__TUNIT_NPM: for.body: 2033; IS__TUNIT_NPM-NEXT: [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10 2034; IS__TUNIT_NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[I]] 2035; IS__TUNIT_NPM-NEXT: store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA15]] 2036; IS__TUNIT_NPM-NEXT: br label [[FOR_INC]] 2037; IS__TUNIT_NPM: for.inc: 2038; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1 2039; IS__TUNIT_NPM-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP28:![0-9]+]] 2040; IS__TUNIT_NPM: for.end: 2041; IS__TUNIT_NPM-NEXT: br label [[FOR_COND2:%.*]] 2042; IS__TUNIT_NPM: for.cond2: 2043; IS__TUNIT_NPM-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ] 2044; IS__TUNIT_NPM-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10 2045; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]] 2046; IS__TUNIT_NPM: for.cond.cleanup4: 2047; IS__TUNIT_NPM-NEXT: br label [[FOR_END11:%.*]] 2048; IS__TUNIT_NPM: for.body5: 2049; IS__TUNIT_NPM-NEXT: [[I15:%.*]] = bitcast i8* [[BYTES]] to float* 2050; IS__TUNIT_NPM-NEXT: [[I16:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10 2051; IS__TUNIT_NPM-NEXT: [[I17:%.*]] = or i64 [[I16]], 1 2052; IS__TUNIT_NPM-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I15]], i64 [[I17]] 2053; IS__TUNIT_NPM-NEXT: store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]] 2054; IS__TUNIT_NPM-NEXT: br label [[FOR_INC9]] 2055; IS__TUNIT_NPM: for.inc9: 2056; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1 2057; IS__TUNIT_NPM-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP29:![0-9]+]] 2058; IS__TUNIT_NPM: for.end11: 2059; IS__TUNIT_NPM-NEXT: br label [[FOR_COND13:%.*]] 2060; IS__TUNIT_NPM: for.cond13: 2061; IS__TUNIT_NPM-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ] 2062; IS__TUNIT_NPM-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20 2063; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]] 2064; IS__TUNIT_NPM: for.cond.cleanup15: 2065; IS__TUNIT_NPM-NEXT: br label [[FOR_END23:%.*]] 2066; IS__TUNIT_NPM: for.body16: 2067; IS__TUNIT_NPM-NEXT: [[I18:%.*]] = bitcast i8* [[BYTES]] to i64* 2068; IS__TUNIT_NPM-NEXT: [[I19:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10 2069; IS__TUNIT_NPM-NEXT: [[I20:%.*]] = add nuw nsw i64 [[I19]], 2 2070; IS__TUNIT_NPM-NEXT: [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* [[I18]], i64 [[I20]] 2071; IS__TUNIT_NPM-NEXT: store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA20]] 2072; IS__TUNIT_NPM-NEXT: br label [[FOR_INC21]] 2073; IS__TUNIT_NPM: for.inc21: 2074; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1 2075; IS__TUNIT_NPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP30:![0-9]+]] 2076; IS__TUNIT_NPM: for.end23: 2077; IS__TUNIT_NPM-NEXT: [[ARRAYIDX24:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 1023 2078; IS__TUNIT_NPM-NEXT: store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA15]] 2079; IS__TUNIT_NPM-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500 2080; IS__TUNIT_NPM-NEXT: [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32* 2081; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 [[I21]], i32 noundef 0) #[[ATTR13]] 2082; IS__TUNIT_NPM-NEXT: br label [[FOR_COND27:%.*]] 2083; IS__TUNIT_NPM: for.cond27: 2084; IS__TUNIT_NPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ] 2085; IS__TUNIT_NPM-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024 2086; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY30:%.*]], label [[FOR_COND_CLEANUP29:%.*]] 2087; IS__TUNIT_NPM: for.cond.cleanup29: 2088; IS__TUNIT_NPM-NEXT: br label [[FOR_END37:%.*]] 2089; IS__TUNIT_NPM: for.body30: 2090; IS__TUNIT_NPM-NEXT: [[ARRAYIDX32:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[INDVARS_IV12]] 2091; IS__TUNIT_NPM-NEXT: [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]] 2092; IS__TUNIT_NPM-NEXT: [[ARRAYIDX34:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]] 2093; IS__TUNIT_NPM-NEXT: store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA15]] 2094; IS__TUNIT_NPM-NEXT: br label [[FOR_INC35]] 2095; IS__TUNIT_NPM: for.inc35: 2096; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1 2097; IS__TUNIT_NPM-NEXT: br label [[FOR_COND27]], !llvm.loop [[LOOP31:![0-9]+]] 2098; IS__TUNIT_NPM: for.end37: 2099; IS__TUNIT_NPM-NEXT: ret void 2100; 2101; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_2 2102; IS__CGSCC_OPM-SAME: (i8* [[BYTES:%.*]]) { 2103; IS__CGSCC_OPM-NEXT: entry: 2104; IS__CGSCC_OPM-NEXT: br label [[FOR_COND:%.*]] 2105; IS__CGSCC_OPM: for.cond: 2106; IS__CGSCC_OPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ] 2107; IS__CGSCC_OPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100 2108; IS__CGSCC_OPM-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]] 2109; IS__CGSCC_OPM: for.cond.cleanup: 2110; IS__CGSCC_OPM-NEXT: br label [[FOR_END:%.*]] 2111; IS__CGSCC_OPM: for.body: 2112; IS__CGSCC_OPM-NEXT: [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10 2113; IS__CGSCC_OPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[I]] 2114; IS__CGSCC_OPM-NEXT: store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA15]] 2115; IS__CGSCC_OPM-NEXT: br label [[FOR_INC]] 2116; IS__CGSCC_OPM: for.inc: 2117; IS__CGSCC_OPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1 2118; IS__CGSCC_OPM-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP28:![0-9]+]] 2119; IS__CGSCC_OPM: for.end: 2120; IS__CGSCC_OPM-NEXT: br label [[FOR_COND2:%.*]] 2121; IS__CGSCC_OPM: for.cond2: 2122; IS__CGSCC_OPM-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ] 2123; IS__CGSCC_OPM-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10 2124; IS__CGSCC_OPM-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]] 2125; IS__CGSCC_OPM: for.cond.cleanup4: 2126; IS__CGSCC_OPM-NEXT: br label [[FOR_END11:%.*]] 2127; IS__CGSCC_OPM: for.body5: 2128; IS__CGSCC_OPM-NEXT: [[I15:%.*]] = bitcast i8* [[BYTES]] to float* 2129; IS__CGSCC_OPM-NEXT: [[I16:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10 2130; IS__CGSCC_OPM-NEXT: [[I17:%.*]] = or i64 [[I16]], 1 2131; IS__CGSCC_OPM-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I15]], i64 [[I17]] 2132; IS__CGSCC_OPM-NEXT: store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]] 2133; IS__CGSCC_OPM-NEXT: br label [[FOR_INC9]] 2134; IS__CGSCC_OPM: for.inc9: 2135; IS__CGSCC_OPM-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1 2136; IS__CGSCC_OPM-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP29:![0-9]+]] 2137; IS__CGSCC_OPM: for.end11: 2138; IS__CGSCC_OPM-NEXT: br label [[FOR_COND13:%.*]] 2139; IS__CGSCC_OPM: for.cond13: 2140; IS__CGSCC_OPM-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ] 2141; IS__CGSCC_OPM-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20 2142; IS__CGSCC_OPM-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]] 2143; IS__CGSCC_OPM: for.cond.cleanup15: 2144; IS__CGSCC_OPM-NEXT: br label [[FOR_END23:%.*]] 2145; IS__CGSCC_OPM: for.body16: 2146; IS__CGSCC_OPM-NEXT: [[I18:%.*]] = bitcast i8* [[BYTES]] to i64* 2147; IS__CGSCC_OPM-NEXT: [[I19:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10 2148; IS__CGSCC_OPM-NEXT: [[I20:%.*]] = add nuw nsw i64 [[I19]], 2 2149; IS__CGSCC_OPM-NEXT: [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* [[I18]], i64 [[I20]] 2150; IS__CGSCC_OPM-NEXT: store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA20]] 2151; IS__CGSCC_OPM-NEXT: br label [[FOR_INC21]] 2152; IS__CGSCC_OPM: for.inc21: 2153; IS__CGSCC_OPM-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1 2154; IS__CGSCC_OPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP30:![0-9]+]] 2155; IS__CGSCC_OPM: for.end23: 2156; IS__CGSCC_OPM-NEXT: [[ARRAYIDX24:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 1023 2157; IS__CGSCC_OPM-NEXT: store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA15]] 2158; IS__CGSCC_OPM-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500 2159; IS__CGSCC_OPM-NEXT: [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32* 2160; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I21]], i32 noundef 0) #[[ATTR17]] 2161; IS__CGSCC_OPM-NEXT: br label [[FOR_COND27:%.*]] 2162; IS__CGSCC_OPM: for.cond27: 2163; IS__CGSCC_OPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ] 2164; IS__CGSCC_OPM-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024 2165; IS__CGSCC_OPM-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY30:%.*]], label [[FOR_COND_CLEANUP29:%.*]] 2166; IS__CGSCC_OPM: for.cond.cleanup29: 2167; IS__CGSCC_OPM-NEXT: br label [[FOR_END37:%.*]] 2168; IS__CGSCC_OPM: for.body30: 2169; IS__CGSCC_OPM-NEXT: [[ARRAYIDX32:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[INDVARS_IV12]] 2170; IS__CGSCC_OPM-NEXT: [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]] 2171; IS__CGSCC_OPM-NEXT: [[ARRAYIDX34:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]] 2172; IS__CGSCC_OPM-NEXT: store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA15]] 2173; IS__CGSCC_OPM-NEXT: br label [[FOR_INC35]] 2174; IS__CGSCC_OPM: for.inc35: 2175; IS__CGSCC_OPM-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1 2176; IS__CGSCC_OPM-NEXT: br label [[FOR_COND27]], !llvm.loop [[LOOP31:![0-9]+]] 2177; IS__CGSCC_OPM: for.end37: 2178; IS__CGSCC_OPM-NEXT: ret void 2179; 2180; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_2 2181; IS__CGSCC_NPM-SAME: (i8* [[BYTES:%.*]]) { 2182; IS__CGSCC_NPM-NEXT: entry: 2183; IS__CGSCC_NPM-NEXT: br label [[FOR_COND:%.*]] 2184; IS__CGSCC_NPM: for.cond: 2185; IS__CGSCC_NPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ] 2186; IS__CGSCC_NPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100 2187; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]] 2188; IS__CGSCC_NPM: for.cond.cleanup: 2189; IS__CGSCC_NPM-NEXT: br label [[FOR_END:%.*]] 2190; IS__CGSCC_NPM: for.body: 2191; IS__CGSCC_NPM-NEXT: [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10 2192; IS__CGSCC_NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[I]] 2193; IS__CGSCC_NPM-NEXT: store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA15]] 2194; IS__CGSCC_NPM-NEXT: br label [[FOR_INC]] 2195; IS__CGSCC_NPM: for.inc: 2196; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1 2197; IS__CGSCC_NPM-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP28:![0-9]+]] 2198; IS__CGSCC_NPM: for.end: 2199; IS__CGSCC_NPM-NEXT: br label [[FOR_COND2:%.*]] 2200; IS__CGSCC_NPM: for.cond2: 2201; IS__CGSCC_NPM-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ] 2202; IS__CGSCC_NPM-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10 2203; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]] 2204; IS__CGSCC_NPM: for.cond.cleanup4: 2205; IS__CGSCC_NPM-NEXT: br label [[FOR_END11:%.*]] 2206; IS__CGSCC_NPM: for.body5: 2207; IS__CGSCC_NPM-NEXT: [[I15:%.*]] = bitcast i8* [[BYTES]] to float* 2208; IS__CGSCC_NPM-NEXT: [[I16:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10 2209; IS__CGSCC_NPM-NEXT: [[I17:%.*]] = or i64 [[I16]], 1 2210; IS__CGSCC_NPM-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I15]], i64 [[I17]] 2211; IS__CGSCC_NPM-NEXT: store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]] 2212; IS__CGSCC_NPM-NEXT: br label [[FOR_INC9]] 2213; IS__CGSCC_NPM: for.inc9: 2214; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1 2215; IS__CGSCC_NPM-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP29:![0-9]+]] 2216; IS__CGSCC_NPM: for.end11: 2217; IS__CGSCC_NPM-NEXT: br label [[FOR_COND13:%.*]] 2218; IS__CGSCC_NPM: for.cond13: 2219; IS__CGSCC_NPM-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ] 2220; IS__CGSCC_NPM-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20 2221; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]] 2222; IS__CGSCC_NPM: for.cond.cleanup15: 2223; IS__CGSCC_NPM-NEXT: br label [[FOR_END23:%.*]] 2224; IS__CGSCC_NPM: for.body16: 2225; IS__CGSCC_NPM-NEXT: [[I18:%.*]] = bitcast i8* [[BYTES]] to i64* 2226; IS__CGSCC_NPM-NEXT: [[I19:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10 2227; IS__CGSCC_NPM-NEXT: [[I20:%.*]] = add nuw nsw i64 [[I19]], 2 2228; IS__CGSCC_NPM-NEXT: [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* [[I18]], i64 [[I20]] 2229; IS__CGSCC_NPM-NEXT: store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA20]] 2230; IS__CGSCC_NPM-NEXT: br label [[FOR_INC21]] 2231; IS__CGSCC_NPM: for.inc21: 2232; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1 2233; IS__CGSCC_NPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP30:![0-9]+]] 2234; IS__CGSCC_NPM: for.end23: 2235; IS__CGSCC_NPM-NEXT: [[ARRAYIDX24:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 1023 2236; IS__CGSCC_NPM-NEXT: store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA15]] 2237; IS__CGSCC_NPM-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500 2238; IS__CGSCC_NPM-NEXT: [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32* 2239; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I21]], i32 noundef 0) #[[ATTR16]] 2240; IS__CGSCC_NPM-NEXT: br label [[FOR_COND27:%.*]] 2241; IS__CGSCC_NPM: for.cond27: 2242; IS__CGSCC_NPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ] 2243; IS__CGSCC_NPM-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024 2244; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY30:%.*]], label [[FOR_COND_CLEANUP29:%.*]] 2245; IS__CGSCC_NPM: for.cond.cleanup29: 2246; IS__CGSCC_NPM-NEXT: br label [[FOR_END37:%.*]] 2247; IS__CGSCC_NPM: for.body30: 2248; IS__CGSCC_NPM-NEXT: [[ARRAYIDX32:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[INDVARS_IV12]] 2249; IS__CGSCC_NPM-NEXT: [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]] 2250; IS__CGSCC_NPM-NEXT: [[ARRAYIDX34:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]] 2251; IS__CGSCC_NPM-NEXT: store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA15]] 2252; IS__CGSCC_NPM-NEXT: br label [[FOR_INC35]] 2253; IS__CGSCC_NPM: for.inc35: 2254; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1 2255; IS__CGSCC_NPM-NEXT: br label [[FOR_COND27]], !llvm.loop [[LOOP31:![0-9]+]] 2256; IS__CGSCC_NPM: for.end37: 2257; IS__CGSCC_NPM-NEXT: ret void 2258; 2259entry: 2260 br label %for.cond 2261 2262for.cond: ; preds = %for.inc, %entry 2263 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ] 2264 %exitcond = icmp ne i64 %indvars.iv, 100 2265 br i1 %exitcond, label %for.body, label %for.cond.cleanup 2266 2267for.cond.cleanup: ; preds = %for.cond 2268 br label %for.end 2269 2270for.body: ; preds = %for.cond 2271 %i = mul nuw nsw i64 %indvars.iv, 10 2272 %arrayidx = getelementptr inbounds i8, i8* %Bytes, i64 %i 2273 store i8 0, i8* %arrayidx, align 1, !tbaa !15 2274 br label %for.inc 2275 2276for.inc: ; preds = %for.body 2277 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 2278 br label %for.cond, !llvm.loop !28 2279 2280for.end: ; preds = %for.cond.cleanup 2281 br label %for.cond2 2282 2283for.cond2: ; preds = %for.inc9, %for.end 2284 %indvars.iv2 = phi i64 [ %indvars.iv.next3, %for.inc9 ], [ 0, %for.end ] 2285 %exitcond6 = icmp ne i64 %indvars.iv2, 10 2286 br i1 %exitcond6, label %for.body5, label %for.cond.cleanup4 2287 2288for.cond.cleanup4: ; preds = %for.cond2 2289 br label %for.end11 2290 2291for.body5: ; preds = %for.cond2 2292 %i15 = bitcast i8* %Bytes to float* 2293 %i16 = mul nuw nsw i64 %indvars.iv2, 10 2294 %i17 = or i64 %i16, 1 2295 %arrayidx8 = getelementptr inbounds float, float* %i15, i64 %i17 2296 store float 0.000000e+00, float* %arrayidx8, align 4, !tbaa !18 2297 br label %for.inc9 2298 2299for.inc9: ; preds = %for.body5 2300 %indvars.iv.next3 = add nuw nsw i64 %indvars.iv2, 1 2301 br label %for.cond2, !llvm.loop !29 2302 2303for.end11: ; preds = %for.cond.cleanup4 2304 br label %for.cond13 2305 2306for.cond13: ; preds = %for.inc21, %for.end11 2307 %indvars.iv7 = phi i64 [ %indvars.iv.next8, %for.inc21 ], [ 0, %for.end11 ] 2308 %exitcond11 = icmp ne i64 %indvars.iv7, 20 2309 br i1 %exitcond11, label %for.body16, label %for.cond.cleanup15 2310 2311for.cond.cleanup15: ; preds = %for.cond13 2312 br label %for.end23 2313 2314for.body16: ; preds = %for.cond13 2315 %i18 = bitcast i8* %Bytes to i64* 2316 %i19 = mul nuw nsw i64 %indvars.iv7, 10 2317 %i20 = add nuw nsw i64 %i19, 2 2318 %arrayidx20 = getelementptr inbounds i64, i64* %i18, i64 %i20 2319 store i64 0, i64* %arrayidx20, align 8, !tbaa !20 2320 br label %for.inc21 2321 2322for.inc21: ; preds = %for.body16 2323 %indvars.iv.next8 = add nuw nsw i64 %indvars.iv7, 1 2324 br label %for.cond13, !llvm.loop !30 2325 2326for.end23: ; preds = %for.cond.cleanup15 2327 %arrayidx24 = getelementptr inbounds i8, i8* %Bytes, i64 1023 2328 store i8 0, i8* %arrayidx24, align 1, !tbaa !15 2329 %arrayidx25 = getelementptr inbounds i8, i8* %Bytes, i64 500 2330 %i21 = bitcast i8* %arrayidx25 to i32* 2331 call void @write_arg(i32* nonnull %i21, i32 0) 2332 br label %for.cond27 2333 2334for.cond27: ; preds = %for.inc35, %for.end23 2335 %indvars.iv12 = phi i64 [ %indvars.iv.next13, %for.inc35 ], [ 0, %for.end23 ] 2336 %exitcond14 = icmp ne i64 %indvars.iv12, 1024 2337 br i1 %exitcond14, label %for.body30, label %for.cond.cleanup29 2338 2339for.cond.cleanup29: ; preds = %for.cond27 2340 br label %for.end37 2341 2342for.body30: ; preds = %for.cond27 2343 %arrayidx32 = getelementptr inbounds i8, i8* %Bytes, i64 %indvars.iv12 2344 %i22 = load i8, i8* %arrayidx32, align 1, !tbaa !15 2345 %arrayidx34 = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 %indvars.iv12 2346 store i8 %i22, i8* %arrayidx34, align 1, !tbaa !15 2347 br label %for.inc35 2348 2349for.inc35: ; preds = %for.body30 2350 %indvars.iv.next13 = add nuw nsw i64 %indvars.iv12, 1 2351 br label %for.cond27, !llvm.loop !31 2352 2353for.end37: ; preds = %for.cond.cleanup29 2354 ret void 2355} 2356 2357; int local_alloca_not_simplifiable_1() { 2358; int X, Y, Z; 2359; X = Y = 1; 2360; escape(&X); 2361; write_random(&Y); 2362; Z = X ? 1 : 2; 2363; return X + Y + Z; 2364; } 2365; 2366define i32 @local_alloca_not_simplifiable_1() { 2367; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() { 2368; IS__TUNIT_OPM-NEXT: entry: 2369; IS__TUNIT_OPM-NEXT: [[X:%.*]] = alloca i32, align 4 2370; IS__TUNIT_OPM-NEXT: [[Y:%.*]] = alloca i32, align 4 2371; IS__TUNIT_OPM-NEXT: [[I:%.*]] = bitcast i32* [[X]] to i8* 2372; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR13]] 2373; IS__TUNIT_OPM-NEXT: [[I1:%.*]] = bitcast i32* [[Y]] to i8* 2374; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR13]] 2375; IS__TUNIT_OPM-NEXT: store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]] 2376; IS__TUNIT_OPM-NEXT: store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]] 2377; IS__TUNIT_OPM-NEXT: [[I2:%.*]] = bitcast i32* [[X]] to i8* 2378; IS__TUNIT_OPM-NEXT: call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]]) 2379; IS__TUNIT_OPM-NEXT: call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]]) 2380; IS__TUNIT_OPM-NEXT: [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]] 2381; IS__TUNIT_OPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0 2382; IS__TUNIT_OPM-NEXT: [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1 2383; IS__TUNIT_OPM-NEXT: [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]] 2384; IS__TUNIT_OPM-NEXT: [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]] 2385; IS__TUNIT_OPM-NEXT: [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]] 2386; IS__TUNIT_OPM-NEXT: [[I5:%.*]] = bitcast i32* [[Y]] to i8* 2387; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]]) 2388; IS__TUNIT_OPM-NEXT: [[I6:%.*]] = bitcast i32* [[X]] to i8* 2389; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]]) 2390; IS__TUNIT_OPM-NEXT: ret i32 [[ADD1]] 2391; 2392; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() { 2393; IS__TUNIT_NPM-NEXT: entry: 2394; IS__TUNIT_NPM-NEXT: [[X:%.*]] = alloca i32, align 4 2395; IS__TUNIT_NPM-NEXT: [[Y:%.*]] = alloca i32, align 4 2396; IS__TUNIT_NPM-NEXT: [[I:%.*]] = bitcast i32* [[X]] to i8* 2397; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR12]] 2398; IS__TUNIT_NPM-NEXT: [[I1:%.*]] = bitcast i32* [[Y]] to i8* 2399; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR12]] 2400; IS__TUNIT_NPM-NEXT: store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]] 2401; IS__TUNIT_NPM-NEXT: store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]] 2402; IS__TUNIT_NPM-NEXT: [[I2:%.*]] = bitcast i32* [[X]] to i8* 2403; IS__TUNIT_NPM-NEXT: call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]]) 2404; IS__TUNIT_NPM-NEXT: call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]]) 2405; IS__TUNIT_NPM-NEXT: [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]] 2406; IS__TUNIT_NPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0 2407; IS__TUNIT_NPM-NEXT: [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1 2408; IS__TUNIT_NPM-NEXT: [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]] 2409; IS__TUNIT_NPM-NEXT: [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]] 2410; IS__TUNIT_NPM-NEXT: [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]] 2411; IS__TUNIT_NPM-NEXT: [[I5:%.*]] = bitcast i32* [[Y]] to i8* 2412; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]]) 2413; IS__TUNIT_NPM-NEXT: [[I6:%.*]] = bitcast i32* [[X]] to i8* 2414; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]]) 2415; IS__TUNIT_NPM-NEXT: ret i32 [[ADD1]] 2416; 2417; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() { 2418; IS__CGSCC_OPM-NEXT: entry: 2419; IS__CGSCC_OPM-NEXT: [[X:%.*]] = alloca i32, align 4 2420; IS__CGSCC_OPM-NEXT: [[Y:%.*]] = alloca i32, align 4 2421; IS__CGSCC_OPM-NEXT: [[I:%.*]] = bitcast i32* [[X]] to i8* 2422; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR15]] 2423; IS__CGSCC_OPM-NEXT: [[I1:%.*]] = bitcast i32* [[Y]] to i8* 2424; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR15]] 2425; IS__CGSCC_OPM-NEXT: store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]] 2426; IS__CGSCC_OPM-NEXT: store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]] 2427; IS__CGSCC_OPM-NEXT: [[I2:%.*]] = bitcast i32* [[X]] to i8* 2428; IS__CGSCC_OPM-NEXT: call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]]) 2429; IS__CGSCC_OPM-NEXT: call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]]) 2430; IS__CGSCC_OPM-NEXT: [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]] 2431; IS__CGSCC_OPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0 2432; IS__CGSCC_OPM-NEXT: [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1 2433; IS__CGSCC_OPM-NEXT: [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]] 2434; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]] 2435; IS__CGSCC_OPM-NEXT: [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]] 2436; IS__CGSCC_OPM-NEXT: [[I5:%.*]] = bitcast i32* [[Y]] to i8* 2437; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]]) 2438; IS__CGSCC_OPM-NEXT: [[I6:%.*]] = bitcast i32* [[X]] to i8* 2439; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]]) 2440; IS__CGSCC_OPM-NEXT: ret i32 [[ADD1]] 2441; 2442; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() { 2443; IS__CGSCC_NPM-NEXT: entry: 2444; IS__CGSCC_NPM-NEXT: [[X:%.*]] = alloca i32, align 4 2445; IS__CGSCC_NPM-NEXT: [[Y:%.*]] = alloca i32, align 4 2446; IS__CGSCC_NPM-NEXT: [[I:%.*]] = bitcast i32* [[X]] to i8* 2447; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR14]] 2448; IS__CGSCC_NPM-NEXT: [[I1:%.*]] = bitcast i32* [[Y]] to i8* 2449; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR14]] 2450; IS__CGSCC_NPM-NEXT: store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]] 2451; IS__CGSCC_NPM-NEXT: store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]] 2452; IS__CGSCC_NPM-NEXT: [[I2:%.*]] = bitcast i32* [[X]] to i8* 2453; IS__CGSCC_NPM-NEXT: call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]]) 2454; IS__CGSCC_NPM-NEXT: call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]]) 2455; IS__CGSCC_NPM-NEXT: [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]] 2456; IS__CGSCC_NPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0 2457; IS__CGSCC_NPM-NEXT: [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1 2458; IS__CGSCC_NPM-NEXT: [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]] 2459; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]] 2460; IS__CGSCC_NPM-NEXT: [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]] 2461; IS__CGSCC_NPM-NEXT: [[I5:%.*]] = bitcast i32* [[Y]] to i8* 2462; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]]) 2463; IS__CGSCC_NPM-NEXT: [[I6:%.*]] = bitcast i32* [[X]] to i8* 2464; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]]) 2465; IS__CGSCC_NPM-NEXT: ret i32 [[ADD1]] 2466; 2467entry: 2468 %X = alloca i32, align 4 2469 %Y = alloca i32, align 4 2470 %i = bitcast i32* %X to i8* 2471 call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %i) 2472 %i1 = bitcast i32* %Y to i8* 2473 call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %i1) 2474 store i32 1, i32* %Y, align 4, !tbaa !3 2475 store i32 1, i32* %X, align 4, !tbaa !3 2476 %i2 = bitcast i32* %X to i8* 2477 call void @escape(i8* nonnull %i2) 2478 call void @write_random(i32* nonnull %Y) 2479 %i3 = load i32, i32* %X, align 4, !tbaa !3 2480 %tobool.not = icmp eq i32 %i3, 0 2481 %cond = select i1 %tobool.not, i32 2, i32 1 2482 %i4 = load i32, i32* %Y, align 4, !tbaa !3 2483 %add = add nsw i32 %i3, %i4 2484 %add1 = add nsw i32 %add, %cond 2485 %i5 = bitcast i32* %Y to i8* 2486 call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %i5) 2487 %i6 = bitcast i32* %X to i8* 2488 call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %i6) 2489 ret i32 %add1 2490} 2491 2492; We could simplify these if we separate accessed bins wrt. alignment (here mod 4). 2493define i32 @unknown_access_mixed_simplifiable(i32 %arg1, i32 %arg2) { 2494; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 2495; IS__TUNIT____-LABEL: define {{[^@]+}}@unknown_access_mixed_simplifiable 2496; IS__TUNIT____-SAME: (i32 [[ARG1:%.*]], i32 [[ARG2:%.*]]) #[[ATTR4]] { 2497; IS__TUNIT____-NEXT: entry: 2498; IS__TUNIT____-NEXT: [[S:%.*]] = alloca [[STRUCT_S:%.*]], align 4 2499; IS__TUNIT____-NEXT: [[BC:%.*]] = bitcast %struct.S* [[S]] to i32* 2500; IS__TUNIT____-NEXT: [[GEP1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 2501; IS__TUNIT____-NEXT: [[GEP2:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG1]] 2502; IS__TUNIT____-NEXT: [[GEP3:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG2]] 2503; IS__TUNIT____-NEXT: store i32 7, i32* [[GEP1]], align 4 2504; IS__TUNIT____-NEXT: store i32 7, i32* [[GEP2]], align 4 2505; IS__TUNIT____-NEXT: store i32 7, i32* [[GEP3]], align 4 2506; IS__TUNIT____-NEXT: [[L1:%.*]] = load i32, i32* [[GEP1]], align 4 2507; IS__TUNIT____-NEXT: [[L2:%.*]] = load i32, i32* [[GEP2]], align 4 2508; IS__TUNIT____-NEXT: [[L3:%.*]] = load i32, i32* [[GEP3]], align 4 2509; IS__TUNIT____-NEXT: [[ADD1:%.*]] = add i32 [[L1]], [[L2]] 2510; IS__TUNIT____-NEXT: [[ADD2:%.*]] = add i32 [[ADD1]], [[L3]] 2511; IS__TUNIT____-NEXT: ret i32 [[ADD2]] 2512; 2513; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 2514; IS__CGSCC____-LABEL: define {{[^@]+}}@unknown_access_mixed_simplifiable 2515; IS__CGSCC____-SAME: (i32 [[ARG1:%.*]], i32 [[ARG2:%.*]]) #[[ATTR3]] { 2516; IS__CGSCC____-NEXT: entry: 2517; IS__CGSCC____-NEXT: [[S:%.*]] = alloca [[STRUCT_S:%.*]], align 4 2518; IS__CGSCC____-NEXT: [[BC:%.*]] = bitcast %struct.S* [[S]] to i32* 2519; IS__CGSCC____-NEXT: [[GEP1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 2520; IS__CGSCC____-NEXT: [[GEP2:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG1]] 2521; IS__CGSCC____-NEXT: [[GEP3:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG2]] 2522; IS__CGSCC____-NEXT: store i32 7, i32* [[GEP1]], align 4 2523; IS__CGSCC____-NEXT: store i32 7, i32* [[GEP2]], align 4 2524; IS__CGSCC____-NEXT: store i32 7, i32* [[GEP3]], align 4 2525; IS__CGSCC____-NEXT: [[L1:%.*]] = load i32, i32* [[GEP1]], align 4 2526; IS__CGSCC____-NEXT: [[L2:%.*]] = load i32, i32* [[GEP2]], align 4 2527; IS__CGSCC____-NEXT: [[L3:%.*]] = load i32, i32* [[GEP3]], align 4 2528; IS__CGSCC____-NEXT: [[ADD1:%.*]] = add i32 [[L1]], [[L2]] 2529; IS__CGSCC____-NEXT: [[ADD2:%.*]] = add i32 [[ADD1]], [[L3]] 2530; IS__CGSCC____-NEXT: ret i32 [[ADD2]] 2531; 2532entry: 2533 %s = alloca %struct.S, align 4 2534 %bc = bitcast %struct.S* %s to i32* 2535 %gep1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 2 2536 %gep2 = getelementptr inbounds i32, i32* %bc, i32 %arg1 2537 %gep3 = getelementptr inbounds i32, i32* %bc, i32 %arg2 2538 store i32 7, i32* %gep1 2539 store i32 7, i32* %gep2 2540 store i32 7, i32* %gep3 2541 %l1 = load i32, i32* %gep1 2542 %l2 = load i32, i32* %gep2 2543 %l3 = load i32, i32* %gep3 2544 %add1 = add i32 %l1, %l2 2545 %add2 = add i32 %add1, %l3 2546 ret i32 %add2 2547} 2548 2549; The access to bc4b could go anywhere, nothing is simplifiable. 2550define i32 @unknown_access_mixed_not_simplifiable(i32 %arg1, i32 %arg2, i32 %arg3) { 2551; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 2552; IS__TUNIT____-LABEL: define {{[^@]+}}@unknown_access_mixed_not_simplifiable 2553; IS__TUNIT____-SAME: (i32 [[ARG1:%.*]], i32 [[ARG2:%.*]], i32 [[ARG3:%.*]]) #[[ATTR4]] { 2554; IS__TUNIT____-NEXT: entry: 2555; IS__TUNIT____-NEXT: [[S:%.*]] = alloca [[STRUCT_S:%.*]], align 4 2556; IS__TUNIT____-NEXT: [[BC:%.*]] = bitcast %struct.S* [[S]] to i32* 2557; IS__TUNIT____-NEXT: [[GEP1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 2558; IS__TUNIT____-NEXT: [[GEP2:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG1]] 2559; IS__TUNIT____-NEXT: [[GEP3:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG2]] 2560; IS__TUNIT____-NEXT: [[BC4A:%.*]] = bitcast %struct.S* [[S]] to i8* 2561; IS__TUNIT____-NEXT: [[GEP4:%.*]] = getelementptr inbounds i8, i8* [[BC4A]], i32 [[ARG3]] 2562; IS__TUNIT____-NEXT: [[BC4B:%.*]] = bitcast i8* [[GEP4]] to i32* 2563; IS__TUNIT____-NEXT: store i32 7, i32* [[GEP1]], align 4 2564; IS__TUNIT____-NEXT: store i32 7, i32* [[GEP2]], align 4 2565; IS__TUNIT____-NEXT: store i32 7, i32* [[GEP3]], align 4 2566; IS__TUNIT____-NEXT: store i32 7, i32* [[BC4B]], align 4 2567; IS__TUNIT____-NEXT: [[L1:%.*]] = load i32, i32* [[GEP1]], align 4 2568; IS__TUNIT____-NEXT: [[L2:%.*]] = load i32, i32* [[GEP2]], align 4 2569; IS__TUNIT____-NEXT: [[L3:%.*]] = load i32, i32* [[GEP3]], align 4 2570; IS__TUNIT____-NEXT: [[L4:%.*]] = load i32, i32* [[BC4B]], align 4 2571; IS__TUNIT____-NEXT: [[ADD1:%.*]] = add i32 [[L1]], [[L2]] 2572; IS__TUNIT____-NEXT: [[ADD2:%.*]] = add i32 [[ADD1]], [[L3]] 2573; IS__TUNIT____-NEXT: [[ADD3:%.*]] = add i32 [[ADD2]], [[L4]] 2574; IS__TUNIT____-NEXT: ret i32 [[ADD3]] 2575; 2576; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 2577; IS__CGSCC____-LABEL: define {{[^@]+}}@unknown_access_mixed_not_simplifiable 2578; IS__CGSCC____-SAME: (i32 [[ARG1:%.*]], i32 [[ARG2:%.*]], i32 [[ARG3:%.*]]) #[[ATTR3]] { 2579; IS__CGSCC____-NEXT: entry: 2580; IS__CGSCC____-NEXT: [[S:%.*]] = alloca [[STRUCT_S:%.*]], align 4 2581; IS__CGSCC____-NEXT: [[BC:%.*]] = bitcast %struct.S* [[S]] to i32* 2582; IS__CGSCC____-NEXT: [[GEP1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 2583; IS__CGSCC____-NEXT: [[GEP2:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG1]] 2584; IS__CGSCC____-NEXT: [[GEP3:%.*]] = getelementptr inbounds i32, i32* [[BC]], i32 [[ARG2]] 2585; IS__CGSCC____-NEXT: [[BC4A:%.*]] = bitcast %struct.S* [[S]] to i8* 2586; IS__CGSCC____-NEXT: [[GEP4:%.*]] = getelementptr inbounds i8, i8* [[BC4A]], i32 [[ARG3]] 2587; IS__CGSCC____-NEXT: [[BC4B:%.*]] = bitcast i8* [[GEP4]] to i32* 2588; IS__CGSCC____-NEXT: store i32 7, i32* [[GEP1]], align 4 2589; IS__CGSCC____-NEXT: store i32 7, i32* [[GEP2]], align 4 2590; IS__CGSCC____-NEXT: store i32 7, i32* [[GEP3]], align 4 2591; IS__CGSCC____-NEXT: store i32 7, i32* [[BC4B]], align 4 2592; IS__CGSCC____-NEXT: [[L1:%.*]] = load i32, i32* [[GEP1]], align 4 2593; IS__CGSCC____-NEXT: [[L2:%.*]] = load i32, i32* [[GEP2]], align 4 2594; IS__CGSCC____-NEXT: [[L3:%.*]] = load i32, i32* [[GEP3]], align 4 2595; IS__CGSCC____-NEXT: [[L4:%.*]] = load i32, i32* [[BC4B]], align 4 2596; IS__CGSCC____-NEXT: [[ADD1:%.*]] = add i32 [[L1]], [[L2]] 2597; IS__CGSCC____-NEXT: [[ADD2:%.*]] = add i32 [[ADD1]], [[L3]] 2598; IS__CGSCC____-NEXT: [[ADD3:%.*]] = add i32 [[ADD2]], [[L4]] 2599; IS__CGSCC____-NEXT: ret i32 [[ADD3]] 2600; 2601entry: 2602 %s = alloca %struct.S, align 4 2603 %bc = bitcast %struct.S* %s to i32* 2604 %gep1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 2 2605 %gep2 = getelementptr inbounds i32, i32* %bc, i32 %arg1 2606 %gep3 = getelementptr inbounds i32, i32* %bc, i32 %arg2 2607 %bc4a = bitcast %struct.S* %s to i8* 2608 %gep4 = getelementptr inbounds i8, i8* %bc4a, i32 %arg3 2609 %bc4b = bitcast i8* %gep4 to i32* 2610 store i32 7, i32* %gep1 2611 store i32 7, i32* %gep2 2612 store i32 7, i32* %gep3 2613 store i32 7, i32* %bc4b 2614 %l1 = load i32, i32* %gep1 2615 %l2 = load i32, i32* %gep2 2616 %l3 = load i32, i32* %gep3 2617 %l4 = load i32, i32* %bc4b 2618 %add1 = add i32 %l1, %l2 2619 %add2 = add i32 %add1, %l3 2620 %add3 = add i32 %add2, %l4 2621 ret i32 %add3 2622} 2623 2624declare void @escape(i8*) 2625 2626; int Flag0 = 0; 2627; int global_not_simplifiable_1(int cnd) { 2628; return Flag0; 2629; } 2630; 2631define i32 @global_not_simplifiable_1(i32 %cnd) { 2632; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn 2633; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@global_not_simplifiable_1 2634; IS__TUNIT_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR7:[0-9]+]] { 2635; IS__TUNIT_OPM-NEXT: entry: 2636; IS__TUNIT_OPM-NEXT: [[I:%.*]] = load i32, i32* @Flag0, align 4, !tbaa [[TBAA3]] 2637; IS__TUNIT_OPM-NEXT: ret i32 [[I]] 2638; 2639; NOT_TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn 2640; NOT_TUNIT_OPM-LABEL: define {{[^@]+}}@global_not_simplifiable_1 2641; NOT_TUNIT_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR6:[0-9]+]] { 2642; NOT_TUNIT_OPM-NEXT: entry: 2643; NOT_TUNIT_OPM-NEXT: [[I:%.*]] = load i32, i32* @Flag0, align 4, !tbaa [[TBAA3]] 2644; NOT_TUNIT_OPM-NEXT: ret i32 [[I]] 2645; 2646entry: 2647 %i = load i32, i32* @Flag0, align 4, !tbaa !3 2648 ret i32 %i 2649} 2650 2651; static int Flag1 __attribute__((loader_uninitialized)); 2652; int static_global_not_simplifiable_1(int cnd) { 2653; int v = Flag1; 2654; sync(); 2655; if (cnd) 2656; Flag1 = 1; 2657; return v; 2658; } 2659; 2660define i32 @static_global_not_simplifiable_1(i32 %cnd) { 2661; CHECK-LABEL: define {{[^@]+}}@static_global_not_simplifiable_1 2662; CHECK-SAME: (i32 [[CND:%.*]]) { 2663; CHECK-NEXT: entry: 2664; CHECK-NEXT: call void @sync() 2665; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0 2666; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] 2667; CHECK: if.then: 2668; CHECK-NEXT: br label [[IF_END]] 2669; CHECK: if.end: 2670; CHECK-NEXT: ret i32 1 2671; 2672entry: 2673 %i = load i32, i32* @Flag1, align 4, !tbaa !3 2674 call void @sync() 2675 %tobool.not = icmp eq i32 %cnd, 0 2676 br i1 %tobool.not, label %if.end, label %if.then 2677 2678if.then: ; preds = %entry 2679 store i32 1, i32* @Flag1, align 4, !tbaa !3 2680 br label %if.end 2681 2682if.end: ; preds = %if.then, %entry 2683 ret i32 %i 2684} 2685 2686declare void @sync() 2687 2688; static int Flag2 __attribute__((loader_uninitialized)); 2689; int static_global_not_simplifiable_2(int cnd) { 2690; Flag2 = 1; 2691; sync(); 2692; int v = Flag2; 2693; Flag2 = 2; 2694; return v; 2695; } 2696define i32 @static_global_not_simplifiable_2(i32 %cnd) { 2697; CHECK-LABEL: define {{[^@]+}}@static_global_not_simplifiable_2 2698; CHECK-SAME: (i32 [[CND:%.*]]) { 2699; CHECK-NEXT: entry: 2700; CHECK-NEXT: store i32 1, i32* @Flag2, align 4, !tbaa [[TBAA3]] 2701; CHECK-NEXT: call void @sync() 2702; CHECK-NEXT: [[I:%.*]] = load i32, i32* @Flag2, align 4, !tbaa [[TBAA3]] 2703; CHECK-NEXT: store i32 2, i32* @Flag2, align 4, !tbaa [[TBAA3]] 2704; CHECK-NEXT: ret i32 [[I]] 2705; 2706entry: 2707 store i32 1, i32* @Flag2, align 4, !tbaa !3 2708 call void @sync() 2709 %i = load i32, i32* @Flag2, align 4, !tbaa !3 2710 store i32 2, i32* @Flag2, align 4, !tbaa !3 2711 ret i32 %i 2712} 2713 2714; int write_read{,_static,_static_undef}_global(void) { 2715; Gint{,static,_static_undef}1 = 7; 2716; return Gint1; 2717; } 2718; void write{,_static,_static_undef}_global(void) { 2719; Gint{,static,_static_undef}2 = 7; 2720; } 2721; int read{,_static,_static_undef}_global(void) { 2722; return Gint{,static,_static_undef}2; 2723; } 2724; 2725; FIXME: We could replace these loads. 2726define i32 @write_read_global() { 2727; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn 2728; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_read_global 2729; IS__TUNIT_OPM-SAME: () #[[ATTR5]] { 2730; IS__TUNIT_OPM-NEXT: store i32 7, i32* @Gint1, align 4 2731; IS__TUNIT_OPM-NEXT: [[L:%.*]] = load i32, i32* @Gint1, align 4 2732; IS__TUNIT_OPM-NEXT: ret i32 [[L]] 2733; 2734; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn 2735; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_read_global 2736; IS__TUNIT_NPM-SAME: () #[[ATTR3]] { 2737; IS__TUNIT_NPM-NEXT: store i32 7, i32* @Gint1, align 4 2738; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i32, i32* @Gint1, align 4 2739; IS__TUNIT_NPM-NEXT: ret i32 [[L]] 2740; 2741; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn 2742; IS__CGSCC____-LABEL: define {{[^@]+}}@write_read_global 2743; IS__CGSCC____-SAME: () #[[ATTR4]] { 2744; IS__CGSCC____-NEXT: store i32 7, i32* @Gint1, align 4 2745; IS__CGSCC____-NEXT: [[L:%.*]] = load i32, i32* @Gint1, align 4 2746; IS__CGSCC____-NEXT: ret i32 [[L]] 2747; 2748 store i32 7, i32* @Gint1 2749 %l = load i32, i32* @Gint1 2750 ret i32 %l 2751} 2752define void @write_global() { 2753; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly 2754; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_global 2755; IS__TUNIT_OPM-SAME: () #[[ATTR6]] { 2756; IS__TUNIT_OPM-NEXT: store i32 7, i32* @Gint2, align 4 2757; IS__TUNIT_OPM-NEXT: ret void 2758; 2759; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly 2760; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_global 2761; IS__TUNIT_NPM-SAME: () #[[ATTR5]] { 2762; IS__TUNIT_NPM-NEXT: store i32 7, i32* @Gint2, align 4 2763; IS__TUNIT_NPM-NEXT: ret void 2764; 2765; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly 2766; IS__CGSCC____-LABEL: define {{[^@]+}}@write_global 2767; IS__CGSCC____-SAME: () #[[ATTR7:[0-9]+]] { 2768; IS__CGSCC____-NEXT: store i32 7, i32* @Gint2, align 4 2769; IS__CGSCC____-NEXT: ret void 2770; 2771 store i32 7, i32* @Gint2 2772 ret void 2773} 2774define i32 @read_global() { 2775; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn 2776; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@read_global 2777; IS__TUNIT_OPM-SAME: () #[[ATTR7]] { 2778; IS__TUNIT_OPM-NEXT: [[L:%.*]] = load i32, i32* @Gint2, align 4 2779; IS__TUNIT_OPM-NEXT: ret i32 [[L]] 2780; 2781; NOT_TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn 2782; NOT_TUNIT_OPM-LABEL: define {{[^@]+}}@read_global 2783; NOT_TUNIT_OPM-SAME: () #[[ATTR6]] { 2784; NOT_TUNIT_OPM-NEXT: [[L:%.*]] = load i32, i32* @Gint2, align 4 2785; NOT_TUNIT_OPM-NEXT: ret i32 [[L]] 2786; 2787 %l = load i32, i32* @Gint2 2788 ret i32 %l 2789} 2790; FIXME: We could replace these loads. 2791define i32 @write_read_static_global() { 2792; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn 2793; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_read_static_global 2794; IS__TUNIT_OPM-SAME: () #[[ATTR5]] { 2795; IS__TUNIT_OPM-NEXT: store i32 7, i32* @Gstatic_int1, align 4 2796; IS__TUNIT_OPM-NEXT: [[L:%.*]] = load i32, i32* @Gstatic_int1, align 4 2797; IS__TUNIT_OPM-NEXT: ret i32 [[L]] 2798; 2799; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn 2800; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_read_static_global 2801; IS__TUNIT_NPM-SAME: () #[[ATTR3]] { 2802; IS__TUNIT_NPM-NEXT: store i32 7, i32* @Gstatic_int1, align 4 2803; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i32, i32* @Gstatic_int1, align 4 2804; IS__TUNIT_NPM-NEXT: ret i32 [[L]] 2805; 2806; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn 2807; IS__CGSCC____-LABEL: define {{[^@]+}}@write_read_static_global 2808; IS__CGSCC____-SAME: () #[[ATTR4]] { 2809; IS__CGSCC____-NEXT: store i32 7, i32* @Gstatic_int1, align 4 2810; IS__CGSCC____-NEXT: [[L:%.*]] = load i32, i32* @Gstatic_int1, align 4 2811; IS__CGSCC____-NEXT: ret i32 [[L]] 2812; 2813 store i32 7, i32* @Gstatic_int1 2814 %l = load i32, i32* @Gstatic_int1 2815 ret i32 %l 2816} 2817define void @write_static_global() { 2818; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly 2819; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_static_global 2820; IS__TUNIT_OPM-SAME: () #[[ATTR6]] { 2821; IS__TUNIT_OPM-NEXT: store i32 7, i32* @Gstatic_int2, align 4 2822; IS__TUNIT_OPM-NEXT: ret void 2823; 2824; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly 2825; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_static_global 2826; IS__TUNIT_NPM-SAME: () #[[ATTR5]] { 2827; IS__TUNIT_NPM-NEXT: store i32 7, i32* @Gstatic_int2, align 4 2828; IS__TUNIT_NPM-NEXT: ret void 2829; 2830; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly 2831; IS__CGSCC____-LABEL: define {{[^@]+}}@write_static_global 2832; IS__CGSCC____-SAME: () #[[ATTR7]] { 2833; IS__CGSCC____-NEXT: store i32 7, i32* @Gstatic_int2, align 4 2834; IS__CGSCC____-NEXT: ret void 2835; 2836 store i32 7, i32* @Gstatic_int2 2837 ret void 2838} 2839define i32 @read_static_global() { 2840; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn 2841; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@read_static_global 2842; IS__TUNIT_OPM-SAME: () #[[ATTR7]] { 2843; IS__TUNIT_OPM-NEXT: [[L:%.*]] = load i32, i32* @Gstatic_int2, align 4 2844; IS__TUNIT_OPM-NEXT: ret i32 [[L]] 2845; 2846; NOT_TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn 2847; NOT_TUNIT_OPM-LABEL: define {{[^@]+}}@read_static_global 2848; NOT_TUNIT_OPM-SAME: () #[[ATTR6]] { 2849; NOT_TUNIT_OPM-NEXT: [[L:%.*]] = load i32, i32* @Gstatic_int2, align 4 2850; NOT_TUNIT_OPM-NEXT: ret i32 [[L]] 2851; 2852 %l = load i32, i32* @Gstatic_int2 2853 ret i32 %l 2854} 2855define i32 @write_read_static_undef_global() { 2856; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly 2857; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_read_static_undef_global 2858; IS__TUNIT_OPM-SAME: () #[[ATTR6]] { 2859; IS__TUNIT_OPM-NEXT: ret i32 7 2860; 2861; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly 2862; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_read_static_undef_global 2863; IS__TUNIT_NPM-SAME: () #[[ATTR5]] { 2864; IS__TUNIT_NPM-NEXT: ret i32 7 2865; 2866; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly 2867; IS__CGSCC____-LABEL: define {{[^@]+}}@write_read_static_undef_global 2868; IS__CGSCC____-SAME: () #[[ATTR7]] { 2869; IS__CGSCC____-NEXT: ret i32 7 2870; 2871 store i32 7, i32* @Gstatic_undef_int1 2872 %l = load i32, i32* @Gstatic_undef_int1 2873 ret i32 %l 2874} 2875define void @write_static_undef_global() { 2876; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly 2877; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_static_undef_global 2878; IS__TUNIT_OPM-SAME: () #[[ATTR6]] { 2879; IS__TUNIT_OPM-NEXT: ret void 2880; 2881; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly 2882; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_static_undef_global 2883; IS__TUNIT_NPM-SAME: () #[[ATTR5]] { 2884; IS__TUNIT_NPM-NEXT: ret void 2885; 2886; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly 2887; IS__CGSCC____-LABEL: define {{[^@]+}}@write_static_undef_global 2888; IS__CGSCC____-SAME: () #[[ATTR7]] { 2889; IS__CGSCC____-NEXT: store i32 7, i32* @Gstatic_undef_int2, align 4 2890; IS__CGSCC____-NEXT: ret void 2891; 2892 store i32 7, i32* @Gstatic_undef_int2 2893 ret void 2894} 2895define i32 @read_static_undef_global() { 2896; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 2897; IS__TUNIT____-LABEL: define {{[^@]+}}@read_static_undef_global 2898; IS__TUNIT____-SAME: () #[[ATTR4]] { 2899; IS__TUNIT____-NEXT: ret i32 7 2900; 2901; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 2902; IS__CGSCC____-LABEL: define {{[^@]+}}@read_static_undef_global 2903; IS__CGSCC____-SAME: () #[[ATTR3]] { 2904; IS__CGSCC____-NEXT: ret i32 7 2905; 2906 %l = load i32, i32* @Gstatic_undef_int2 2907 ret i32 %l 2908} 2909 2910define i32 @single_read_of_static_global() { 2911; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 2912; IS__TUNIT____-LABEL: define {{[^@]+}}@single_read_of_static_global 2913; IS__TUNIT____-SAME: () #[[ATTR4]] { 2914; IS__TUNIT____-NEXT: ret i32 0 2915; 2916; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 2917; IS__CGSCC____-LABEL: define {{[^@]+}}@single_read_of_static_global 2918; IS__CGSCC____-SAME: () #[[ATTR3]] { 2919; IS__CGSCC____-NEXT: ret i32 0 2920; 2921 %l = load i32, i32* @Gstatic_int3 2922 ret i32 %l 2923} 2924 2925define i8 @phi_store() { 2926; IS________OPM: Function Attrs: nofree norecurse nosync nounwind readnone 2927; IS________OPM-LABEL: define {{[^@]+}}@phi_store 2928; IS________OPM-SAME: () #[[ATTR8:[0-9]+]] { 2929; IS________OPM-NEXT: entry: 2930; IS________OPM-NEXT: [[A:%.*]] = alloca i16, align 2 2931; IS________OPM-NEXT: [[B:%.*]] = bitcast i16* [[A]] to i8* 2932; IS________OPM-NEXT: br label [[LOOP:%.*]] 2933; IS________OPM: loop: 2934; IS________OPM-NEXT: [[P:%.*]] = phi i8* [ [[B]], [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ] 2935; IS________OPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] 2936; IS________OPM-NEXT: [[G]] = getelementptr i8, i8* [[P]], i64 1 2937; IS________OPM-NEXT: [[O]] = add nsw i8 [[I]], 1 2938; IS________OPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 2 2939; IS________OPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] 2940; IS________OPM: end: 2941; IS________OPM-NEXT: [[S:%.*]] = getelementptr i8, i8* [[B]], i64 1 2942; IS________OPM-NEXT: [[L:%.*]] = load i8, i8* [[S]], align 1 2943; IS________OPM-NEXT: ret i8 [[L]] 2944; 2945; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 2946; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@phi_store 2947; IS__TUNIT_NPM-SAME: () #[[ATTR4]] { 2948; IS__TUNIT_NPM-NEXT: entry: 2949; IS__TUNIT_NPM-NEXT: [[A:%.*]] = alloca i16, align 2 2950; IS__TUNIT_NPM-NEXT: [[B:%.*]] = bitcast i16* [[A]] to i8* 2951; IS__TUNIT_NPM-NEXT: br label [[LOOP:%.*]] 2952; IS__TUNIT_NPM: loop: 2953; IS__TUNIT_NPM-NEXT: [[P:%.*]] = phi i8* [ [[B]], [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ] 2954; IS__TUNIT_NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] 2955; IS__TUNIT_NPM-NEXT: [[G]] = getelementptr i8, i8* [[P]], i64 1 2956; IS__TUNIT_NPM-NEXT: [[O]] = add nsw i8 [[I]], 1 2957; IS__TUNIT_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 2 2958; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] 2959; IS__TUNIT_NPM: end: 2960; IS__TUNIT_NPM-NEXT: [[S:%.*]] = getelementptr i8, i8* [[B]], i64 1 2961; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i8, i8* [[S]], align 1 2962; IS__TUNIT_NPM-NEXT: ret i8 [[L]] 2963; 2964; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 2965; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi_store 2966; IS__CGSCC_NPM-SAME: () #[[ATTR3]] { 2967; IS__CGSCC_NPM-NEXT: entry: 2968; IS__CGSCC_NPM-NEXT: [[A:%.*]] = alloca i16, align 2 2969; IS__CGSCC_NPM-NEXT: [[B:%.*]] = bitcast i16* [[A]] to i8* 2970; IS__CGSCC_NPM-NEXT: br label [[LOOP:%.*]] 2971; IS__CGSCC_NPM: loop: 2972; IS__CGSCC_NPM-NEXT: [[P:%.*]] = phi i8* [ [[B]], [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ] 2973; IS__CGSCC_NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] 2974; IS__CGSCC_NPM-NEXT: [[G]] = getelementptr i8, i8* [[P]], i64 1 2975; IS__CGSCC_NPM-NEXT: [[O]] = add nsw i8 [[I]], 1 2976; IS__CGSCC_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 2 2977; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] 2978; IS__CGSCC_NPM: end: 2979; IS__CGSCC_NPM-NEXT: [[S:%.*]] = getelementptr i8, i8* [[B]], i64 1 2980; IS__CGSCC_NPM-NEXT: [[L:%.*]] = load i8, i8* [[S]], align 1 2981; IS__CGSCC_NPM-NEXT: ret i8 [[L]] 2982; 2983entry: 2984 %a = alloca i16 2985 %b = bitcast i16* %a to i8* 2986 br label %loop 2987loop: 2988 %p = phi i8* [%b, %entry], [%g, %loop] 2989 %i = phi i8 [0, %entry], [%o, %loop] 2990 store i8 1, i8* %p 2991 %g = getelementptr i8, i8* %p, i64 1 2992 %o = add nsw i8 %i, 1 2993 %c = icmp eq i8 %o, 2 2994 br i1 %c, label %end, label %loop 2995end: 2996 %s = getelementptr i8, i8* %b, i64 1 2997 %l = load i8, i8* %s 2998 ret i8 %l 2999} 3000 3001; FIXME: This function returns 1. 3002define i8 @phi_no_store_1() { 3003; 3004; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind 3005; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@phi_no_store_1 3006; IS__TUNIT_OPM-SAME: () #[[ATTR3]] { 3007; IS__TUNIT_OPM-NEXT: entry: 3008; IS__TUNIT_OPM-NEXT: br label [[LOOP:%.*]] 3009; IS__TUNIT_OPM: loop: 3010; IS__TUNIT_OPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a1 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ] 3011; IS__TUNIT_OPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] 3012; IS__TUNIT_OPM-NEXT: [[G]] = getelementptr i8, i8* [[P]], i64 1 3013; IS__TUNIT_OPM-NEXT: [[O]] = add nsw i8 [[I]], 1 3014; IS__TUNIT_OPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 3 3015; IS__TUNIT_OPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] 3016; IS__TUNIT_OPM: end: 3017; IS__TUNIT_OPM-NEXT: [[L11:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 2), align 2 3018; IS__TUNIT_OPM-NEXT: [[L12:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 3), align 1 3019; IS__TUNIT_OPM-NEXT: [[ADD:%.*]] = add i8 [[L11]], [[L12]] 3020; IS__TUNIT_OPM-NEXT: ret i8 [[ADD]] 3021; 3022; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn 3023; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@phi_no_store_1 3024; IS__TUNIT_NPM-SAME: () #[[ATTR3]] { 3025; IS__TUNIT_NPM-NEXT: entry: 3026; IS__TUNIT_NPM-NEXT: br label [[LOOP:%.*]] 3027; IS__TUNIT_NPM: loop: 3028; IS__TUNIT_NPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a1 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ] 3029; IS__TUNIT_NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] 3030; IS__TUNIT_NPM-NEXT: [[G]] = getelementptr i8, i8* [[P]], i64 1 3031; IS__TUNIT_NPM-NEXT: [[O]] = add nsw i8 [[I]], 1 3032; IS__TUNIT_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 3 3033; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] 3034; IS__TUNIT_NPM: end: 3035; IS__TUNIT_NPM-NEXT: [[L11:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 2), align 2 3036; IS__TUNIT_NPM-NEXT: [[L12:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 3), align 1 3037; IS__TUNIT_NPM-NEXT: [[ADD:%.*]] = add i8 [[L11]], [[L12]] 3038; IS__TUNIT_NPM-NEXT: ret i8 [[ADD]] 3039; 3040; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind 3041; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@phi_no_store_1 3042; IS__CGSCC_OPM-SAME: () #[[ATTR9:[0-9]+]] { 3043; IS__CGSCC_OPM-NEXT: entry: 3044; IS__CGSCC_OPM-NEXT: br label [[LOOP:%.*]] 3045; IS__CGSCC_OPM: loop: 3046; IS__CGSCC_OPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a1 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ] 3047; IS__CGSCC_OPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] 3048; IS__CGSCC_OPM-NEXT: [[G]] = getelementptr i8, i8* [[P]], i64 1 3049; IS__CGSCC_OPM-NEXT: [[O]] = add nsw i8 [[I]], 1 3050; IS__CGSCC_OPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 3 3051; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] 3052; IS__CGSCC_OPM: end: 3053; IS__CGSCC_OPM-NEXT: [[L11:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 2), align 2 3054; IS__CGSCC_OPM-NEXT: [[L12:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 3), align 1 3055; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = add i8 [[L11]], [[L12]] 3056; IS__CGSCC_OPM-NEXT: ret i8 [[ADD]] 3057; 3058; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn 3059; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi_no_store_1 3060; IS__CGSCC_NPM-SAME: () #[[ATTR4]] { 3061; IS__CGSCC_NPM-NEXT: entry: 3062; IS__CGSCC_NPM-NEXT: br label [[LOOP:%.*]] 3063; IS__CGSCC_NPM: loop: 3064; IS__CGSCC_NPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a1 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ] 3065; IS__CGSCC_NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] 3066; IS__CGSCC_NPM-NEXT: [[G]] = getelementptr i8, i8* [[P]], i64 1 3067; IS__CGSCC_NPM-NEXT: [[O]] = add nsw i8 [[I]], 1 3068; IS__CGSCC_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 3 3069; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] 3070; IS__CGSCC_NPM: end: 3071; IS__CGSCC_NPM-NEXT: [[L11:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 2), align 2 3072; IS__CGSCC_NPM-NEXT: [[L12:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 3), align 1 3073; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add i8 [[L11]], [[L12]] 3074; IS__CGSCC_NPM-NEXT: ret i8 [[ADD]] 3075; 3076entry: 3077 %b = bitcast i32* @a1 to i8* 3078 br label %loop 3079loop: 3080 %p = phi i8* [%b, %entry], [%g, %loop] 3081 %i = phi i8 [0, %entry], [%o, %loop] 3082 store i8 1, i8* %p 3083 %g = getelementptr i8, i8* %p, i64 1 3084 %o = add nsw i8 %i, 1 3085 %c = icmp eq i8 %o, 3 3086 br i1 %c, label %end, label %loop 3087end: 3088 %s11 = getelementptr i8, i8* %b, i64 2 3089 %l11 = load i8, i8* %s11 3090 %s12 = getelementptr i8, i8* %b, i64 3 3091 %l12 = load i8, i8* %s12 3092 %add = add i8 %l11, %l12 3093 ret i8 %add 3094} 3095 3096; FIXME: This function returns 1. 3097define i8 @phi_no_store_2() { 3098; 3099; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind 3100; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@phi_no_store_2 3101; IS__TUNIT_OPM-SAME: () #[[ATTR3]] { 3102; IS__TUNIT_OPM-NEXT: entry: 3103; IS__TUNIT_OPM-NEXT: br label [[LOOP:%.*]] 3104; IS__TUNIT_OPM: loop: 3105; IS__TUNIT_OPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), [[LOOP]] ] 3106; IS__TUNIT_OPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] 3107; IS__TUNIT_OPM-NEXT: store i8 1, i8* [[P]], align 2 3108; IS__TUNIT_OPM-NEXT: [[O]] = add nsw i8 [[I]], 1 3109; IS__TUNIT_OPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 7 3110; IS__TUNIT_OPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] 3111; IS__TUNIT_OPM: end: 3112; IS__TUNIT_OPM-NEXT: [[L21:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), align 2 3113; IS__TUNIT_OPM-NEXT: [[ADD:%.*]] = add i8 [[L21]], 0 3114; IS__TUNIT_OPM-NEXT: ret i8 [[ADD]] 3115; 3116; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn 3117; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@phi_no_store_2 3118; IS__TUNIT_NPM-SAME: () #[[ATTR3]] { 3119; IS__TUNIT_NPM-NEXT: entry: 3120; IS__TUNIT_NPM-NEXT: br label [[LOOP:%.*]] 3121; IS__TUNIT_NPM: loop: 3122; IS__TUNIT_NPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), [[LOOP]] ] 3123; IS__TUNIT_NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] 3124; IS__TUNIT_NPM-NEXT: store i8 1, i8* [[P]], align 2 3125; IS__TUNIT_NPM-NEXT: [[O]] = add nsw i8 [[I]], 1 3126; IS__TUNIT_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 7 3127; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] 3128; IS__TUNIT_NPM: end: 3129; IS__TUNIT_NPM-NEXT: [[L21:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), align 2 3130; IS__TUNIT_NPM-NEXT: [[ADD:%.*]] = add i8 [[L21]], 0 3131; IS__TUNIT_NPM-NEXT: ret i8 [[ADD]] 3132; 3133; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind 3134; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@phi_no_store_2 3135; IS__CGSCC_OPM-SAME: () #[[ATTR9]] { 3136; IS__CGSCC_OPM-NEXT: entry: 3137; IS__CGSCC_OPM-NEXT: br label [[LOOP:%.*]] 3138; IS__CGSCC_OPM: loop: 3139; IS__CGSCC_OPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), [[LOOP]] ] 3140; IS__CGSCC_OPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] 3141; IS__CGSCC_OPM-NEXT: store i8 1, i8* [[P]], align 2 3142; IS__CGSCC_OPM-NEXT: [[O]] = add nsw i8 [[I]], 1 3143; IS__CGSCC_OPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 7 3144; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] 3145; IS__CGSCC_OPM: end: 3146; IS__CGSCC_OPM-NEXT: [[L21:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), align 2 3147; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = add i8 [[L21]], 0 3148; IS__CGSCC_OPM-NEXT: ret i8 [[ADD]] 3149; 3150; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn 3151; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi_no_store_2 3152; IS__CGSCC_NPM-SAME: () #[[ATTR4]] { 3153; IS__CGSCC_NPM-NEXT: entry: 3154; IS__CGSCC_NPM-NEXT: br label [[LOOP:%.*]] 3155; IS__CGSCC_NPM: loop: 3156; IS__CGSCC_NPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), [[LOOP]] ] 3157; IS__CGSCC_NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] 3158; IS__CGSCC_NPM-NEXT: store i8 1, i8* [[P]], align 2 3159; IS__CGSCC_NPM-NEXT: [[O]] = add nsw i8 [[I]], 1 3160; IS__CGSCC_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 7 3161; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] 3162; IS__CGSCC_NPM: end: 3163; IS__CGSCC_NPM-NEXT: [[L21:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), align 2 3164; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add i8 [[L21]], 0 3165; IS__CGSCC_NPM-NEXT: ret i8 [[ADD]] 3166; 3167entry: 3168 %b = bitcast i32* @a2 to i8* 3169 br label %loop 3170loop: 3171 %p = phi i8* [%b, %entry], [%g, %loop] 3172 %i = phi i8 [0, %entry], [%o, %loop] 3173 store i8 1, i8* %p 3174 %g = getelementptr i8, i8* %b, i64 2 3175 %o = add nsw i8 %i, 1 3176 %c = icmp eq i8 %o, 7 3177 br i1 %c, label %end, label %loop 3178end: 3179 %s21 = getelementptr i8, i8* %b, i64 2 3180 %l21 = load i8, i8* %s21 3181 %s22 = getelementptr i8, i8* %b, i64 3 3182 %l22 = load i8, i8* %s22 3183 %add = add i8 %l21, %l22 3184 ret i8 %add 3185} 3186 3187define i8 @phi_no_store_3() { 3188; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind writeonly 3189; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@phi_no_store_3 3190; IS__TUNIT_OPM-SAME: () #[[ATTR9:[0-9]+]] { 3191; IS__TUNIT_OPM-NEXT: entry: 3192; IS__TUNIT_OPM-NEXT: br label [[LOOP:%.*]] 3193; IS__TUNIT_OPM: loop: 3194; IS__TUNIT_OPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a3 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 2), [[LOOP]] ] 3195; IS__TUNIT_OPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] 3196; IS__TUNIT_OPM-NEXT: [[O]] = add nsw i8 [[I]], 1 3197; IS__TUNIT_OPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 7 3198; IS__TUNIT_OPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] 3199; IS__TUNIT_OPM: end: 3200; IS__TUNIT_OPM-NEXT: ret i8 1 3201; 3202; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly 3203; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@phi_no_store_3 3204; IS__TUNIT_NPM-SAME: () #[[ATTR5]] { 3205; IS__TUNIT_NPM-NEXT: entry: 3206; IS__TUNIT_NPM-NEXT: br label [[LOOP:%.*]] 3207; IS__TUNIT_NPM: loop: 3208; IS__TUNIT_NPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a3 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 2), [[LOOP]] ] 3209; IS__TUNIT_NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] 3210; IS__TUNIT_NPM-NEXT: [[O]] = add nsw i8 [[I]], 1 3211; IS__TUNIT_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 7 3212; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] 3213; IS__TUNIT_NPM: end: 3214; IS__TUNIT_NPM-NEXT: ret i8 1 3215; 3216; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind writeonly 3217; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@phi_no_store_3 3218; IS__CGSCC_OPM-SAME: () #[[ATTR10:[0-9]+]] { 3219; IS__CGSCC_OPM-NEXT: entry: 3220; IS__CGSCC_OPM-NEXT: br label [[LOOP:%.*]] 3221; IS__CGSCC_OPM: loop: 3222; IS__CGSCC_OPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a3 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 2), [[LOOP]] ] 3223; IS__CGSCC_OPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] 3224; IS__CGSCC_OPM-NEXT: [[O]] = add nsw i8 [[I]], 1 3225; IS__CGSCC_OPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 7 3226; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] 3227; IS__CGSCC_OPM: end: 3228; IS__CGSCC_OPM-NEXT: ret i8 1 3229; 3230; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly 3231; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi_no_store_3 3232; IS__CGSCC_NPM-SAME: () #[[ATTR7]] { 3233; IS__CGSCC_NPM-NEXT: entry: 3234; IS__CGSCC_NPM-NEXT: br label [[LOOP:%.*]] 3235; IS__CGSCC_NPM: loop: 3236; IS__CGSCC_NPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a3 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 2), [[LOOP]] ] 3237; IS__CGSCC_NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] 3238; IS__CGSCC_NPM-NEXT: [[O]] = add nsw i8 [[I]], 1 3239; IS__CGSCC_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 7 3240; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] 3241; IS__CGSCC_NPM: end: 3242; IS__CGSCC_NPM-NEXT: ret i8 1 3243; 3244entry: 3245 %b = bitcast i32* @a3 to i8* 3246 %s30 = getelementptr i8, i8* %b, i64 3 3247 store i8 0, i8* %s30 3248 br label %loop 3249loop: 3250 %p = phi i8* [%b, %entry], [%g, %loop] 3251 %i = phi i8 [0, %entry], [%o, %loop] 3252 store i8 1, i8* %p 3253 %g = getelementptr i8, i8* %b, i64 2 3254 %o = add nsw i8 %i, 1 3255 %c = icmp eq i8 %o, 7 3256 br i1 %c, label %end, label %loop 3257end: 3258 %s31 = getelementptr i8, i8* %b, i64 2 3259 %l31 = load i8, i8* %s31 3260 %s32 = getelementptr i8, i8* %b, i64 3 3261 %l32 = load i8, i8* %s32 3262 %add = add i8 %l31, %l32 3263 ret i8 %add 3264} 3265 3266define i8 @cast_and_load_1() { 3267; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn 3268; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@cast_and_load_1 3269; IS__TUNIT_OPM-SAME: () #[[ATTR5]] { 3270; IS__TUNIT_OPM-NEXT: store i32 42, i32* @bytes1, align 4 3271; IS__TUNIT_OPM-NEXT: [[L:%.*]] = load i8, i8* bitcast (i32* @bytes1 to i8*), align 4 3272; IS__TUNIT_OPM-NEXT: ret i8 [[L]] 3273; 3274; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn 3275; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@cast_and_load_1 3276; IS__TUNIT_NPM-SAME: () #[[ATTR3]] { 3277; IS__TUNIT_NPM-NEXT: store i32 42, i32* @bytes1, align 4 3278; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i8, i8* bitcast (i32* @bytes1 to i8*), align 4 3279; IS__TUNIT_NPM-NEXT: ret i8 [[L]] 3280; 3281; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn 3282; IS__CGSCC____-LABEL: define {{[^@]+}}@cast_and_load_1 3283; IS__CGSCC____-SAME: () #[[ATTR4]] { 3284; IS__CGSCC____-NEXT: store i32 42, i32* @bytes1, align 4 3285; IS__CGSCC____-NEXT: [[L:%.*]] = load i8, i8* bitcast (i32* @bytes1 to i8*), align 4 3286; IS__CGSCC____-NEXT: ret i8 [[L]] 3287; 3288 store i32 42, i32* @bytes1 3289 %bc = bitcast i32* @bytes1 to i8* 3290 %l = load i8, i8* %bc 3291 ret i8 %l 3292} 3293 3294define i64 @cast_and_load_2() { 3295; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn 3296; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@cast_and_load_2 3297; IS__TUNIT_OPM-SAME: () #[[ATTR5]] { 3298; IS__TUNIT_OPM-NEXT: store i32 42, i32* @bytes2, align 4 3299; IS__TUNIT_OPM-NEXT: [[L:%.*]] = load i64, i64* bitcast (i32* @bytes2 to i64*), align 4 3300; IS__TUNIT_OPM-NEXT: ret i64 [[L]] 3301; 3302; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn 3303; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@cast_and_load_2 3304; IS__TUNIT_NPM-SAME: () #[[ATTR3]] { 3305; IS__TUNIT_NPM-NEXT: store i32 42, i32* @bytes2, align 4 3306; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i64, i64* bitcast (i32* @bytes2 to i64*), align 4 3307; IS__TUNIT_NPM-NEXT: ret i64 [[L]] 3308; 3309; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn 3310; IS__CGSCC____-LABEL: define {{[^@]+}}@cast_and_load_2 3311; IS__CGSCC____-SAME: () #[[ATTR4]] { 3312; IS__CGSCC____-NEXT: store i32 42, i32* @bytes2, align 4 3313; IS__CGSCC____-NEXT: [[L:%.*]] = load i64, i64* bitcast (i32* @bytes2 to i64*), align 4 3314; IS__CGSCC____-NEXT: ret i64 [[L]] 3315; 3316 store i32 42, i32* @bytes2 3317 %bc = bitcast i32* @bytes2 to i64* 3318 %l = load i64, i64* %bc 3319 ret i64 %l 3320} 3321 3322define void @recursive_load_store(i64 %N, i32 %v) { 3323; 3324; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind writeonly 3325; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@recursive_load_store 3326; IS__TUNIT_OPM-SAME: (i64 [[N:%.*]], i32 [[V:%.*]]) #[[ATTR9]] { 3327; IS__TUNIT_OPM-NEXT: entry: 3328; IS__TUNIT_OPM-NEXT: br label [[FOR_COND:%.*]] 3329; IS__TUNIT_OPM: for.cond: 3330; IS__TUNIT_OPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_BODY:%.*]] ], [ 0, [[ENTRY:%.*]] ] 3331; IS__TUNIT_OPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], [[N]] 3332; IS__TUNIT_OPM-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY]], label [[FOR_END:%.*]] 3333; IS__TUNIT_OPM: for.body: 3334; IS__TUNIT_OPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1 3335; IS__TUNIT_OPM-NEXT: br label [[FOR_COND]] 3336; IS__TUNIT_OPM: for.end: 3337; IS__TUNIT_OPM-NEXT: ret void 3338; 3339; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind writeonly 3340; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@recursive_load_store 3341; IS__TUNIT_NPM-SAME: (i64 [[N:%.*]], i32 [[V:%.*]]) #[[ATTR7:[0-9]+]] { 3342; IS__TUNIT_NPM-NEXT: entry: 3343; IS__TUNIT_NPM-NEXT: br label [[FOR_COND:%.*]] 3344; IS__TUNIT_NPM: for.cond: 3345; IS__TUNIT_NPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_BODY:%.*]] ], [ 0, [[ENTRY:%.*]] ] 3346; IS__TUNIT_NPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], [[N]] 3347; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY]], label [[FOR_END:%.*]] 3348; IS__TUNIT_NPM: for.body: 3349; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1 3350; IS__TUNIT_NPM-NEXT: br label [[FOR_COND]] 3351; IS__TUNIT_NPM: for.end: 3352; IS__TUNIT_NPM-NEXT: ret void 3353; 3354; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind writeonly 3355; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@recursive_load_store 3356; IS__CGSCC_OPM-SAME: (i64 [[N:%.*]], i32 [[V:%.*]]) #[[ATTR10]] { 3357; IS__CGSCC_OPM-NEXT: entry: 3358; IS__CGSCC_OPM-NEXT: br label [[FOR_COND:%.*]] 3359; IS__CGSCC_OPM: for.cond: 3360; IS__CGSCC_OPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_BODY:%.*]] ], [ 0, [[ENTRY:%.*]] ] 3361; IS__CGSCC_OPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], [[N]] 3362; IS__CGSCC_OPM-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY]], label [[FOR_END:%.*]] 3363; IS__CGSCC_OPM: for.body: 3364; IS__CGSCC_OPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1 3365; IS__CGSCC_OPM-NEXT: br label [[FOR_COND]] 3366; IS__CGSCC_OPM: for.end: 3367; IS__CGSCC_OPM-NEXT: ret void 3368; 3369; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind writeonly 3370; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@recursive_load_store 3371; IS__CGSCC_NPM-SAME: (i64 [[N:%.*]], i32 [[V:%.*]]) #[[ATTR8:[0-9]+]] { 3372; IS__CGSCC_NPM-NEXT: entry: 3373; IS__CGSCC_NPM-NEXT: br label [[FOR_COND:%.*]] 3374; IS__CGSCC_NPM: for.cond: 3375; IS__CGSCC_NPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_BODY:%.*]] ], [ 0, [[ENTRY:%.*]] ] 3376; IS__CGSCC_NPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], [[N]] 3377; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY]], label [[FOR_END:%.*]] 3378; IS__CGSCC_NPM: for.body: 3379; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1 3380; IS__CGSCC_NPM-NEXT: br label [[FOR_COND]] 3381; IS__CGSCC_NPM: for.end: 3382; IS__CGSCC_NPM-NEXT: ret void 3383; 3384entry: 3385 store i32 %v, i32* @rec_storage 3386 br label %for.cond 3387 3388for.cond: 3389 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] 3390 %exitcond = icmp ne i64 %indvars.iv, %N 3391 br i1 %exitcond, label %for.body, label %for.end 3392 3393for.body: 3394 %ll = load i32, i32* @rec_storage 3395 store i32 %ll, i32* @rec_storage 3396 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 3397 br label %for.cond 3398 3399for.end: 3400 %lr = load i32, i32* @rec_storage 3401 store i32 %lr, i32* @rec_storage 3402 ret void 3403} 3404 3405define dso_local i32 @round_trip_malloc(i32 %x) { 3406; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@round_trip_malloc 3407; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) { 3408; IS__TUNIT_OPM-NEXT: entry: 3409; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR16:[0-9]+]] 3410; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* 3411; IS__TUNIT_OPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4 3412; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 3413; IS__TUNIT_OPM-NEXT: call void @free(i8* noundef [[CALL]]) #[[ATTR16]] 3414; IS__TUNIT_OPM-NEXT: ret i32 [[TMP1]] 3415; 3416; IS________NPM-LABEL: define {{[^@]+}}@round_trip_malloc 3417; IS________NPM-SAME: (i32 returned [[X:%.*]]) { 3418; IS________NPM-NEXT: entry: 3419; IS________NPM-NEXT: [[TMP0:%.*]] = alloca i8, i64 4, align 1 3420; IS________NPM-NEXT: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i32* 3421; IS________NPM-NEXT: store i32 [[X]], i32* [[TMP1]], align 4 3422; IS________NPM-NEXT: ret i32 [[X]] 3423; 3424; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@round_trip_malloc 3425; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) { 3426; IS__CGSCC_OPM-NEXT: entry: 3427; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR18:[0-9]+]] 3428; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* 3429; IS__CGSCC_OPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4 3430; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 3431; IS__CGSCC_OPM-NEXT: call void @free(i8* noundef [[CALL]]) #[[ATTR18]] 3432; IS__CGSCC_OPM-NEXT: ret i32 [[TMP1]] 3433; 3434entry: 3435 %call = call noalias i8* @malloc(i64 4) norecurse 3436 %0 = bitcast i8* %call to i32* 3437 store i32 %x, i32* %0, align 4 3438 %1 = load i32, i32* %0, align 4 3439 %2 = bitcast i32* %0 to i8* 3440 call void @free(i8* %2) norecurse 3441 ret i32 %1 3442} 3443 3444define dso_local i32 @round_trip_malloc_constant() { 3445; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@round_trip_malloc_constant() { 3446; IS__TUNIT_OPM-NEXT: entry: 3447; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR16]] 3448; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* 3449; IS__TUNIT_OPM-NEXT: store i32 7, i32* [[TMP0]], align 4 3450; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 3451; IS__TUNIT_OPM-NEXT: call void @free(i8* noundef [[CALL]]) #[[ATTR16]] 3452; IS__TUNIT_OPM-NEXT: ret i32 [[TMP1]] 3453; 3454; IS________NPM-LABEL: define {{[^@]+}}@round_trip_malloc_constant() { 3455; IS________NPM-NEXT: entry: 3456; IS________NPM-NEXT: ret i32 7 3457; 3458; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@round_trip_malloc_constant() { 3459; IS__CGSCC_OPM-NEXT: entry: 3460; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR18]] 3461; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* 3462; IS__CGSCC_OPM-NEXT: store i32 7, i32* [[TMP0]], align 4 3463; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 3464; IS__CGSCC_OPM-NEXT: call void @free(i8* noundef [[CALL]]) #[[ATTR18]] 3465; IS__CGSCC_OPM-NEXT: ret i32 [[TMP1]] 3466; 3467entry: 3468 %call = call noalias i8* @malloc(i64 4) norecurse 3469 %0 = bitcast i8* %call to i32* 3470 store i32 7, i32* %0, align 4 3471 %1 = load i32, i32* %0, align 4 3472 %2 = bitcast i32* %0 to i8* 3473 call void @free(i8* %2) norecurse 3474 ret i32 %1 3475} 3476 3477declare noalias i8* @malloc(i64) 3478 3479declare void @free(i8*) 3480 3481define dso_local i32 @conditional_malloc(i32 %x) { 3482; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@conditional_malloc 3483; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) { 3484; IS__TUNIT_OPM-NEXT: entry: 3485; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR16]] 3486; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* 3487; IS__TUNIT_OPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 3488; IS__TUNIT_OPM-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] 3489; IS__TUNIT_OPM: if.then: 3490; IS__TUNIT_OPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4 3491; IS__TUNIT_OPM-NEXT: br label [[IF_END]] 3492; IS__TUNIT_OPM: if.end: 3493; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 3494; IS__TUNIT_OPM-NEXT: ret i32 [[TMP1]] 3495; 3496; IS________NPM-LABEL: define {{[^@]+}}@conditional_malloc 3497; IS________NPM-SAME: (i32 returned [[X:%.*]]) { 3498; IS________NPM-NEXT: entry: 3499; IS________NPM-NEXT: [[TMP0:%.*]] = alloca i8, i64 4, align 1 3500; IS________NPM-NEXT: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i32* 3501; IS________NPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 3502; IS________NPM-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] 3503; IS________NPM: if.then: 3504; IS________NPM-NEXT: store i32 [[X]], i32* [[TMP1]], align 4 3505; IS________NPM-NEXT: br label [[IF_END]] 3506; IS________NPM: if.end: 3507; IS________NPM-NEXT: ret i32 [[X]] 3508; 3509; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@conditional_malloc 3510; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) { 3511; IS__CGSCC_OPM-NEXT: entry: 3512; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR18]] 3513; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* 3514; IS__CGSCC_OPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 3515; IS__CGSCC_OPM-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] 3516; IS__CGSCC_OPM: if.then: 3517; IS__CGSCC_OPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4 3518; IS__CGSCC_OPM-NEXT: br label [[IF_END]] 3519; IS__CGSCC_OPM: if.end: 3520; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 3521; IS__CGSCC_OPM-NEXT: ret i32 [[TMP1]] 3522; 3523entry: 3524 %call = call noalias i8* @malloc(i64 4) norecurse 3525 %0 = bitcast i8* %call to i32* 3526 %tobool = icmp ne i32 %x, 0 3527 br i1 %tobool, label %if.then, label %if.end 3528 3529if.then: ; preds = %entry 3530 store i32 %x, i32* %0, align 4 3531 br label %if.end 3532 3533if.end: ; preds = %if.then, %entry 3534 %1 = load i32, i32* %0, align 4 3535 ret i32 %1 3536} 3537 3538define dso_local i32 @round_trip_calloc(i32 %x) { 3539; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@round_trip_calloc 3540; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) { 3541; IS__TUNIT_OPM-NEXT: entry: 3542; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 4, i64 noundef 1) #[[ATTR16]] 3543; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* 3544; IS__TUNIT_OPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4 3545; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 3546; IS__TUNIT_OPM-NEXT: ret i32 [[TMP1]] 3547; 3548; IS________NPM-LABEL: define {{[^@]+}}@round_trip_calloc 3549; IS________NPM-SAME: (i32 [[X:%.*]]) { 3550; IS________NPM-NEXT: entry: 3551; IS________NPM-NEXT: [[TMP0:%.*]] = alloca i8, i64 4, align 1 3552; IS________NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* [[TMP0]], i8 0, i64 4, i1 false) 3553; IS________NPM-NEXT: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i32* 3554; IS________NPM-NEXT: store i32 [[X]], i32* [[TMP1]], align 4 3555; IS________NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4 3556; IS________NPM-NEXT: ret i32 [[TMP2]] 3557; 3558; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@round_trip_calloc 3559; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) { 3560; IS__CGSCC_OPM-NEXT: entry: 3561; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 4, i64 noundef 1) #[[ATTR18]] 3562; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* 3563; IS__CGSCC_OPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4 3564; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 3565; IS__CGSCC_OPM-NEXT: ret i32 [[TMP1]] 3566; 3567entry: 3568 %call = call noalias i8* @calloc(i64 4, i64 1) norecurse 3569 %0 = bitcast i8* %call to i32* 3570 store i32 %x, i32* %0, align 4 3571 %1 = load i32, i32* %0, align 4 3572 ret i32 %1 3573} 3574 3575define dso_local i32 @round_trip_calloc_constant() { 3576; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@round_trip_calloc_constant() { 3577; IS__TUNIT_OPM-NEXT: entry: 3578; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 4, i64 noundef 1) #[[ATTR16]] 3579; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* 3580; IS__TUNIT_OPM-NEXT: store i32 11, i32* [[TMP0]], align 4 3581; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 3582; IS__TUNIT_OPM-NEXT: ret i32 [[TMP1]] 3583; 3584; IS________NPM-LABEL: define {{[^@]+}}@round_trip_calloc_constant() { 3585; IS________NPM-NEXT: entry: 3586; IS________NPM-NEXT: [[TMP0:%.*]] = alloca i8, i64 4, align 1 3587; IS________NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* [[TMP0]], i8 0, i64 4, i1 false) 3588; IS________NPM-NEXT: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i32* 3589; IS________NPM-NEXT: store i32 11, i32* [[TMP1]], align 4 3590; IS________NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4 3591; IS________NPM-NEXT: ret i32 [[TMP2]] 3592; 3593; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@round_trip_calloc_constant() { 3594; IS__CGSCC_OPM-NEXT: entry: 3595; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 4, i64 noundef 1) #[[ATTR18]] 3596; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* 3597; IS__CGSCC_OPM-NEXT: store i32 11, i32* [[TMP0]], align 4 3598; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 3599; IS__CGSCC_OPM-NEXT: ret i32 [[TMP1]] 3600; 3601entry: 3602 %call = call noalias i8* @calloc(i64 4, i64 1) norecurse 3603 %0 = bitcast i8* %call to i32* 3604 store i32 11, i32* %0, align 4 3605 %1 = load i32, i32* %0, align 4 3606 ret i32 %1 3607} 3608 3609declare noalias i8* @calloc(i64, i64) 3610 3611define dso_local i32 @conditional_calloc(i32 %x) { 3612; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@conditional_calloc 3613; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) { 3614; IS__TUNIT_OPM-NEXT: entry: 3615; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 1, i64 noundef 4) #[[ATTR16]] 3616; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* 3617; IS__TUNIT_OPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 3618; IS__TUNIT_OPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] 3619; IS__TUNIT_OPM: if.then: 3620; IS__TUNIT_OPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4 3621; IS__TUNIT_OPM-NEXT: br label [[IF_END]] 3622; IS__TUNIT_OPM: if.end: 3623; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 3624; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8* 3625; IS__TUNIT_OPM-NEXT: call void @free(i8* [[TMP2]]) #[[ATTR16]] 3626; IS__TUNIT_OPM-NEXT: ret i32 [[TMP1]] 3627; 3628; IS________NPM-LABEL: define {{[^@]+}}@conditional_calloc 3629; IS________NPM-SAME: (i32 [[X:%.*]]) { 3630; IS________NPM-NEXT: entry: 3631; IS________NPM-NEXT: [[TMP0:%.*]] = alloca i8, i64 4, align 1 3632; IS________NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* [[TMP0]], i8 0, i64 4, i1 false) 3633; IS________NPM-NEXT: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i32* 3634; IS________NPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 3635; IS________NPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] 3636; IS________NPM: if.then: 3637; IS________NPM-NEXT: store i32 [[X]], i32* [[TMP1]], align 4 3638; IS________NPM-NEXT: br label [[IF_END]] 3639; IS________NPM: if.end: 3640; IS________NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4 3641; IS________NPM-NEXT: [[TMP3:%.*]] = bitcast i32* [[TMP1]] to i8* 3642; IS________NPM-NEXT: ret i32 [[TMP2]] 3643; 3644; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@conditional_calloc 3645; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) { 3646; IS__CGSCC_OPM-NEXT: entry: 3647; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 1, i64 noundef 4) #[[ATTR18]] 3648; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* 3649; IS__CGSCC_OPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 3650; IS__CGSCC_OPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] 3651; IS__CGSCC_OPM: if.then: 3652; IS__CGSCC_OPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4 3653; IS__CGSCC_OPM-NEXT: br label [[IF_END]] 3654; IS__CGSCC_OPM: if.end: 3655; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 3656; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8* 3657; IS__CGSCC_OPM-NEXT: call void @free(i8* [[TMP2]]) #[[ATTR18]] 3658; IS__CGSCC_OPM-NEXT: ret i32 [[TMP1]] 3659; 3660entry: 3661 %call = call noalias i8* @calloc(i64 1, i64 4) norecurse 3662 %0 = bitcast i8* %call to i32* 3663 %tobool = icmp ne i32 %x, 0 3664 br i1 %tobool, label %if.end, label %if.then 3665 3666if.then: ; preds = %entry 3667 store i32 %x, i32* %0, align 4 3668 br label %if.end 3669 3670if.end: ; preds = %if.then, %entry 3671 %1 = load i32, i32* %0, align 4 3672 %2 = bitcast i32* %0 to i8* 3673 call void @free(i8* %2) norecurse 3674 ret i32 %1 3675} 3676 3677define dso_local i32 @conditional_calloc_zero(i1 %c) { 3678; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@conditional_calloc_zero 3679; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) { 3680; IS__TUNIT_OPM-NEXT: entry: 3681; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 1, i64 noundef 4) #[[ATTR16]] 3682; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* 3683; IS__TUNIT_OPM-NEXT: br i1 [[C]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] 3684; IS__TUNIT_OPM: if.then: 3685; IS__TUNIT_OPM-NEXT: store i32 0, i32* [[TMP0]], align 4 3686; IS__TUNIT_OPM-NEXT: br label [[IF_END]] 3687; IS__TUNIT_OPM: if.end: 3688; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 3689; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8* 3690; IS__TUNIT_OPM-NEXT: call void @free(i8* [[TMP2]]) #[[ATTR16]] 3691; IS__TUNIT_OPM-NEXT: ret i32 [[TMP1]] 3692; 3693; IS________NPM-LABEL: define {{[^@]+}}@conditional_calloc_zero 3694; IS________NPM-SAME: (i1 [[C:%.*]]) { 3695; IS________NPM-NEXT: entry: 3696; IS________NPM-NEXT: [[TMP0:%.*]] = alloca i8, i64 4, align 1 3697; IS________NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* [[TMP0]], i8 0, i64 4, i1 false) 3698; IS________NPM-NEXT: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i32* 3699; IS________NPM-NEXT: br i1 [[C]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] 3700; IS________NPM: if.then: 3701; IS________NPM-NEXT: br label [[IF_END]] 3702; IS________NPM: if.end: 3703; IS________NPM-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP1]] to i8* 3704; IS________NPM-NEXT: ret i32 0 3705; 3706; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@conditional_calloc_zero 3707; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) { 3708; IS__CGSCC_OPM-NEXT: entry: 3709; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 1, i64 noundef 4) #[[ATTR18]] 3710; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* 3711; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] 3712; IS__CGSCC_OPM: if.then: 3713; IS__CGSCC_OPM-NEXT: store i32 0, i32* [[TMP0]], align 4 3714; IS__CGSCC_OPM-NEXT: br label [[IF_END]] 3715; IS__CGSCC_OPM: if.end: 3716; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 3717; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8* 3718; IS__CGSCC_OPM-NEXT: call void @free(i8* [[TMP2]]) #[[ATTR18]] 3719; IS__CGSCC_OPM-NEXT: ret i32 [[TMP1]] 3720; 3721entry: 3722 %call = call noalias i8* @calloc(i64 1, i64 4) norecurse 3723 %0 = bitcast i8* %call to i32* 3724 br i1 %c, label %if.end, label %if.then 3725 3726if.then: ; preds = %entry 3727 store i32 0, i32* %0, align 4 3728 br label %if.end 3729 3730if.end: ; preds = %if.then, %entry 3731 %1 = load i32, i32* %0, align 4 3732 %2 = bitcast i32* %0 to i8* 3733 call void @free(i8* %2) norecurse 3734 ret i32 %1 3735} 3736 3737define dso_local i32* @malloc_like(i32 %s) { 3738; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@malloc_like 3739; IS__TUNIT_OPM-SAME: (i32 [[S:%.*]]) { 3740; IS__TUNIT_OPM-NEXT: entry: 3741; IS__TUNIT_OPM-NEXT: [[CONV:%.*]] = sext i32 [[S]] to i64 3742; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 [[CONV]]) #[[ATTR16]] 3743; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* 3744; IS__TUNIT_OPM-NEXT: ret i32* [[TMP0]] 3745; 3746; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@malloc_like 3747; IS__TUNIT_NPM-SAME: (i32 [[S:%.*]]) { 3748; IS__TUNIT_NPM-NEXT: entry: 3749; IS__TUNIT_NPM-NEXT: [[CONV:%.*]] = sext i32 [[S]] to i64 3750; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 [[CONV]]) #[[ATTR14:[0-9]+]] 3751; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* 3752; IS__TUNIT_NPM-NEXT: ret i32* [[TMP0]] 3753; 3754; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@malloc_like 3755; IS__CGSCC_OPM-SAME: (i32 [[S:%.*]]) { 3756; IS__CGSCC_OPM-NEXT: entry: 3757; IS__CGSCC_OPM-NEXT: [[CONV:%.*]] = sext i32 [[S]] to i64 3758; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 [[CONV]]) #[[ATTR18]] 3759; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* 3760; IS__CGSCC_OPM-NEXT: ret i32* [[TMP0]] 3761; 3762; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@malloc_like 3763; IS__CGSCC_NPM-SAME: (i32 [[S:%.*]]) { 3764; IS__CGSCC_NPM-NEXT: entry: 3765; IS__CGSCC_NPM-NEXT: [[CONV:%.*]] = sext i32 [[S]] to i64 3766; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 [[CONV]]) #[[ATTR17:[0-9]+]] 3767; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* 3768; IS__CGSCC_NPM-NEXT: ret i32* [[TMP0]] 3769; 3770entry: 3771 %conv = sext i32 %s to i64 3772 %call = call noalias i8* @malloc(i64 %conv) norecurse 3773 %0 = bitcast i8* %call to i32* 3774 ret i32* %0 3775} 3776 3777define dso_local i32 @round_trip_malloc_like(i32 %x) { 3778; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@round_trip_malloc_like 3779; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) { 3780; IS__TUNIT_OPM-NEXT: entry: 3781; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call i32* @malloc_like(i32 noundef 4) #[[ATTR16]] 3782; IS__TUNIT_OPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 3783; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 3784; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* 3785; IS__TUNIT_OPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR16]] 3786; IS__TUNIT_OPM-NEXT: ret i32 [[TMP0]] 3787; 3788; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@round_trip_malloc_like 3789; IS__TUNIT_NPM-SAME: (i32 [[X:%.*]]) { 3790; IS__TUNIT_NPM-NEXT: entry: 3791; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call i32* @malloc_like(i32 noundef 4) #[[ATTR14]] 3792; IS__TUNIT_NPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 3793; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 3794; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* 3795; IS__TUNIT_NPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR14]] 3796; IS__TUNIT_NPM-NEXT: ret i32 [[TMP0]] 3797; 3798; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@round_trip_malloc_like 3799; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) { 3800; IS__CGSCC_OPM-NEXT: entry: 3801; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32* @malloc_like(i32 noundef 4) #[[ATTR18]] 3802; IS__CGSCC_OPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 3803; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 3804; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* 3805; IS__CGSCC_OPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR18]] 3806; IS__CGSCC_OPM-NEXT: ret i32 [[TMP0]] 3807; 3808; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@round_trip_malloc_like 3809; IS__CGSCC_NPM-SAME: (i32 [[X:%.*]]) { 3810; IS__CGSCC_NPM-NEXT: entry: 3811; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32* @malloc_like(i32 noundef 4) #[[ATTR17]] 3812; IS__CGSCC_NPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 3813; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 3814; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* 3815; IS__CGSCC_NPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR17]] 3816; IS__CGSCC_NPM-NEXT: ret i32 [[TMP0]] 3817; 3818entry: 3819 %call = call i32* @malloc_like(i32 4) norecurse 3820 store i32 %x, i32* %call, align 4 3821 %0 = load i32, i32* %call, align 4 3822 %1 = bitcast i32* %call to i8* 3823 call void @free(i8* %1) norecurse 3824 ret i32 %0 3825} 3826 3827define dso_local i32 @round_trip_unknown_alloc(i32 %x) { 3828; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@round_trip_unknown_alloc 3829; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) { 3830; IS__TUNIT_OPM-NEXT: entry: 3831; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call i32* @unknown_alloc(i32 noundef 4) #[[ATTR16]] 3832; IS__TUNIT_OPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 3833; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 3834; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* 3835; IS__TUNIT_OPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR16]] 3836; IS__TUNIT_OPM-NEXT: ret i32 [[TMP0]] 3837; 3838; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@round_trip_unknown_alloc 3839; IS__TUNIT_NPM-SAME: (i32 [[X:%.*]]) { 3840; IS__TUNIT_NPM-NEXT: entry: 3841; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call i32* @unknown_alloc(i32 noundef 4) #[[ATTR14]] 3842; IS__TUNIT_NPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 3843; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 3844; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* 3845; IS__TUNIT_NPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR14]] 3846; IS__TUNIT_NPM-NEXT: ret i32 [[TMP0]] 3847; 3848; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@round_trip_unknown_alloc 3849; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) { 3850; IS__CGSCC_OPM-NEXT: entry: 3851; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32* @unknown_alloc(i32 noundef 4) #[[ATTR18]] 3852; IS__CGSCC_OPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 3853; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 3854; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* 3855; IS__CGSCC_OPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR18]] 3856; IS__CGSCC_OPM-NEXT: ret i32 [[TMP0]] 3857; 3858; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@round_trip_unknown_alloc 3859; IS__CGSCC_NPM-SAME: (i32 [[X:%.*]]) { 3860; IS__CGSCC_NPM-NEXT: entry: 3861; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32* @unknown_alloc(i32 noundef 4) #[[ATTR17]] 3862; IS__CGSCC_NPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 3863; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 3864; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* 3865; IS__CGSCC_NPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR17]] 3866; IS__CGSCC_NPM-NEXT: ret i32 [[TMP0]] 3867; 3868entry: 3869 %call = call i32* @unknown_alloc(i32 4) norecurse 3870 store i32 %x, i32* %call, align 4 3871 %0 = load i32, i32* %call, align 4 3872 %1 = bitcast i32* %call to i8* 3873 call void @free(i8* %1) norecurse 3874 ret i32 %0 3875} 3876 3877declare noalias i32* @unknown_alloc(i32) 3878 3879define dso_local i32 @conditional_unknown_alloc(i32 %x) { 3880; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@conditional_unknown_alloc 3881; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) { 3882; IS__TUNIT_OPM-NEXT: entry: 3883; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noalias i32* @unknown_alloc(i32 noundef 4) #[[ATTR16]] 3884; IS__TUNIT_OPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 3885; IS__TUNIT_OPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] 3886; IS__TUNIT_OPM: if.then: 3887; IS__TUNIT_OPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 3888; IS__TUNIT_OPM-NEXT: br label [[IF_END]] 3889; IS__TUNIT_OPM: if.end: 3890; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 3891; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* 3892; IS__TUNIT_OPM-NEXT: call void @free(i8* [[TMP1]]) #[[ATTR16]] 3893; IS__TUNIT_OPM-NEXT: ret i32 [[TMP0]] 3894; 3895; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@conditional_unknown_alloc 3896; IS__TUNIT_NPM-SAME: (i32 [[X:%.*]]) { 3897; IS__TUNIT_NPM-NEXT: entry: 3898; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call noalias i32* @unknown_alloc(i32 noundef 4) #[[ATTR14]] 3899; IS__TUNIT_NPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 3900; IS__TUNIT_NPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] 3901; IS__TUNIT_NPM: if.then: 3902; IS__TUNIT_NPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 3903; IS__TUNIT_NPM-NEXT: br label [[IF_END]] 3904; IS__TUNIT_NPM: if.end: 3905; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 3906; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* 3907; IS__TUNIT_NPM-NEXT: call void @free(i8* [[TMP1]]) #[[ATTR14]] 3908; IS__TUNIT_NPM-NEXT: ret i32 [[TMP0]] 3909; 3910; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@conditional_unknown_alloc 3911; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) { 3912; IS__CGSCC_OPM-NEXT: entry: 3913; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call noalias i32* @unknown_alloc(i32 noundef 4) #[[ATTR18]] 3914; IS__CGSCC_OPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 3915; IS__CGSCC_OPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] 3916; IS__CGSCC_OPM: if.then: 3917; IS__CGSCC_OPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 3918; IS__CGSCC_OPM-NEXT: br label [[IF_END]] 3919; IS__CGSCC_OPM: if.end: 3920; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 3921; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* 3922; IS__CGSCC_OPM-NEXT: call void @free(i8* [[TMP1]]) #[[ATTR18]] 3923; IS__CGSCC_OPM-NEXT: ret i32 [[TMP0]] 3924; 3925; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@conditional_unknown_alloc 3926; IS__CGSCC_NPM-SAME: (i32 [[X:%.*]]) { 3927; IS__CGSCC_NPM-NEXT: entry: 3928; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call noalias i32* @unknown_alloc(i32 noundef 4) #[[ATTR17]] 3929; IS__CGSCC_NPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 3930; IS__CGSCC_NPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] 3931; IS__CGSCC_NPM: if.then: 3932; IS__CGSCC_NPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 3933; IS__CGSCC_NPM-NEXT: br label [[IF_END]] 3934; IS__CGSCC_NPM: if.end: 3935; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 3936; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* 3937; IS__CGSCC_NPM-NEXT: call void @free(i8* [[TMP1]]) #[[ATTR17]] 3938; IS__CGSCC_NPM-NEXT: ret i32 [[TMP0]] 3939; 3940entry: 3941 %call = call noalias i32* @unknown_alloc(i32 4) norecurse 3942 %tobool = icmp ne i32 %x, 0 3943 br i1 %tobool, label %if.end, label %if.then 3944 3945if.then: ; preds = %entry 3946 store i32 %x, i32* %call, align 4 3947 br label %if.end 3948 3949if.end: ; preds = %if.then, %entry 3950 %0 = load i32, i32* %call, align 4 3951 %1 = bitcast i32* %call to i8* 3952 call void @free(i8* %1) norecurse 3953 ret i32 %0 3954} 3955 3956%struct.STy = type { float*, double*, %struct.STy* } 3957 3958@global = internal global %struct.STy zeroinitializer, align 8 3959 3960; We mark %dst as writeonly and %src as readonly, that is (for now) all we can expect. 3961define dso_local void @test_nested_memory(float* %dst, double* %src) { 3962; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@test_nested_memory 3963; IS__TUNIT_OPM-SAME: (float* nocapture nofree writeonly [[DST:%.*]], double* nocapture nofree readonly [[SRC:%.*]]) { 3964; IS__TUNIT_OPM-NEXT: entry: 3965; IS__TUNIT_OPM-NEXT: [[LOCAL:%.*]] = alloca [[STRUCT_STY:%.*]], align 8 3966; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast %struct.STy* [[LOCAL]] to i8* 3967; IS__TUNIT_OPM-NEXT: [[INNER:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[LOCAL]], i64 0, i32 2 3968; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noalias dereferenceable_or_null(24) i8* @malloc(i64 noundef 24) 3969; IS__TUNIT_OPM-NEXT: [[DST1:%.*]] = bitcast i8* [[CALL]] to float** 3970; IS__TUNIT_OPM-NEXT: store float* [[DST]], float** [[DST1]], align 8 3971; IS__TUNIT_OPM-NEXT: [[SRC2:%.*]] = getelementptr inbounds i8, i8* [[CALL]], i64 8 3972; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = bitcast i8* [[SRC2]] to double** 3973; IS__TUNIT_OPM-NEXT: store double* [[SRC]], double** [[TMP1]], align 8 3974; IS__TUNIT_OPM-NEXT: store i8* [[CALL]], i8** bitcast (%struct.STy** getelementptr inbounds ([[STRUCT_STY]], %struct.STy* @global, i64 0, i32 2) to i8**), align 8 3975; IS__TUNIT_OPM-NEXT: call fastcc void @nested_memory_callee() #[[ATTR17:[0-9]+]] 3976; IS__TUNIT_OPM-NEXT: ret void 3977; 3978; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test_nested_memory 3979; IS__TUNIT_NPM-SAME: (float* nocapture nofree writeonly [[DST:%.*]], double* nocapture nofree readonly [[SRC:%.*]]) { 3980; IS__TUNIT_NPM-NEXT: entry: 3981; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = alloca i8, i64 24, align 1 3982; IS__TUNIT_NPM-NEXT: [[LOCAL:%.*]] = alloca [[STRUCT_STY:%.*]], align 8 3983; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = bitcast %struct.STy* [[LOCAL]] to i8* 3984; IS__TUNIT_NPM-NEXT: [[INNER:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[LOCAL]], i64 0, i32 2 3985; IS__TUNIT_NPM-NEXT: [[DST1:%.*]] = bitcast i8* [[TMP0]] to float** 3986; IS__TUNIT_NPM-NEXT: store float* [[DST]], float** [[DST1]], align 8 3987; IS__TUNIT_NPM-NEXT: [[SRC2:%.*]] = getelementptr inbounds i8, i8* [[TMP0]], i64 8 3988; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = bitcast i8* [[SRC2]] to double** 3989; IS__TUNIT_NPM-NEXT: store double* [[SRC]], double** [[TMP2]], align 8 3990; IS__TUNIT_NPM-NEXT: store i8* [[TMP0]], i8** bitcast (%struct.STy** getelementptr inbounds ([[STRUCT_STY]], %struct.STy* @global, i64 0, i32 2) to i8**), align 8 3991; IS__TUNIT_NPM-NEXT: call fastcc void @nested_memory_callee() #[[ATTR15:[0-9]+]] 3992; IS__TUNIT_NPM-NEXT: ret void 3993; 3994; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test_nested_memory 3995; IS__CGSCC_OPM-SAME: (float* nofree [[DST:%.*]], double* nofree [[SRC:%.*]]) { 3996; IS__CGSCC_OPM-NEXT: entry: 3997; IS__CGSCC_OPM-NEXT: [[LOCAL:%.*]] = alloca [[STRUCT_STY:%.*]], align 8 3998; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast %struct.STy* [[LOCAL]] to i8* 3999; IS__CGSCC_OPM-NEXT: [[INNER:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[LOCAL]], i64 0, i32 2 4000; IS__CGSCC_OPM-NEXT: store %struct.STy* @global, %struct.STy** [[INNER]], align 8 4001; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call noalias dereferenceable_or_null(24) i8* @malloc(i64 noundef 24) 4002; IS__CGSCC_OPM-NEXT: [[DST1:%.*]] = bitcast i8* [[CALL]] to float** 4003; IS__CGSCC_OPM-NEXT: store float* [[DST]], float** [[DST1]], align 8 4004; IS__CGSCC_OPM-NEXT: [[SRC2:%.*]] = getelementptr inbounds i8, i8* [[CALL]], i64 8 4005; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = bitcast i8* [[SRC2]] to double** 4006; IS__CGSCC_OPM-NEXT: store double* [[SRC]], double** [[TMP1]], align 8 4007; IS__CGSCC_OPM-NEXT: store i8* [[CALL]], i8** bitcast (%struct.STy** getelementptr inbounds ([[STRUCT_STY]], %struct.STy* @global, i64 0, i32 2) to i8**), align 8 4008; IS__CGSCC_OPM-NEXT: call fastcc void @nested_memory_callee(%struct.STy* noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(24) [[LOCAL]]) #[[ATTR17]] 4009; IS__CGSCC_OPM-NEXT: ret void 4010; 4011; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test_nested_memory 4012; IS__CGSCC_NPM-SAME: (float* nofree [[DST:%.*]], double* nofree [[SRC:%.*]]) { 4013; IS__CGSCC_NPM-NEXT: entry: 4014; IS__CGSCC_NPM-NEXT: [[LOCAL:%.*]] = alloca [[STRUCT_STY:%.*]], align 8 4015; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast %struct.STy* [[LOCAL]] to i8* 4016; IS__CGSCC_NPM-NEXT: [[INNER:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[LOCAL]], i64 0, i32 2 4017; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call noalias dereferenceable_or_null(24) i8* @malloc(i64 noundef 24) 4018; IS__CGSCC_NPM-NEXT: [[DST1:%.*]] = bitcast i8* [[CALL]] to float** 4019; IS__CGSCC_NPM-NEXT: store float* [[DST]], float** [[DST1]], align 8 4020; IS__CGSCC_NPM-NEXT: [[SRC2:%.*]] = getelementptr inbounds i8, i8* [[CALL]], i64 8 4021; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = bitcast i8* [[SRC2]] to double** 4022; IS__CGSCC_NPM-NEXT: store double* [[SRC]], double** [[TMP1]], align 8 4023; IS__CGSCC_NPM-NEXT: store i8* [[CALL]], i8** bitcast (%struct.STy** getelementptr inbounds ([[STRUCT_STY]], %struct.STy* @global, i64 0, i32 2) to i8**), align 8 4024; IS__CGSCC_NPM-NEXT: call fastcc void @nested_memory_callee(float* nofree nonnull align 4294967296 undef, double* nofree nonnull align 4294967296 undef, %struct.STy* nofree noundef nonnull align 8 dereferenceable(24) @global) #[[ATTR16]] 4025; IS__CGSCC_NPM-NEXT: ret void 4026; 4027entry: 4028 %local = alloca %struct.STy, align 8 4029 %0 = bitcast %struct.STy* %local to i8* 4030 %inner = getelementptr inbounds %struct.STy, %struct.STy* %local, i64 0, i32 2 4031 store %struct.STy* @global, %struct.STy** %inner, align 8 4032 %call = call noalias dereferenceable_or_null(24) i8* @malloc(i64 24) #4 4033 %dst1 = bitcast i8* %call to float** 4034 store float* %dst, float** %dst1, align 8 4035 %src2 = getelementptr inbounds i8, i8* %call, i64 8 4036 %1 = bitcast i8* %src2 to double** 4037 store double* %src, double** %1, align 8 4038 store i8* %call, i8** bitcast (%struct.STy** getelementptr inbounds (%struct.STy, %struct.STy* @global, i64 0, i32 2) to i8**), align 8 4039 call fastcc void @nested_memory_callee(%struct.STy* nonnull %local) 4040 ret void 4041} 4042 4043define internal fastcc void @nested_memory_callee(%struct.STy* nocapture readonly %S) nofree norecurse nounwind uwtable { 4044; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn uwtable 4045; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@nested_memory_callee 4046; IS__TUNIT_OPM-SAME: () #[[ATTR10:[0-9]+]] { 4047; IS__TUNIT_OPM-NEXT: entry: 4048; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = load %struct.STy*, %struct.STy** getelementptr inbounds ([[STRUCT_STY:%.*]], %struct.STy* @global, i64 0, i32 2), align 8 4049; IS__TUNIT_OPM-NEXT: [[SRC:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP0]], i64 0, i32 1 4050; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load double*, double** [[SRC]], align 8 4051; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = load double, double* [[TMP1]], align 8 4052; IS__TUNIT_OPM-NEXT: [[CONV:%.*]] = fptrunc double [[TMP2]] to float 4053; IS__TUNIT_OPM-NEXT: [[DST:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP0]], i64 0, i32 0 4054; IS__TUNIT_OPM-NEXT: [[TMP3:%.*]] = load float*, float** [[DST]], align 8 4055; IS__TUNIT_OPM-NEXT: store float [[CONV]], float* [[TMP3]], align 4 4056; IS__TUNIT_OPM-NEXT: ret void 4057; 4058; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn uwtable 4059; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@nested_memory_callee 4060; IS__TUNIT_NPM-SAME: () #[[ATTR8:[0-9]+]] { 4061; IS__TUNIT_NPM-NEXT: entry: 4062; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load %struct.STy*, %struct.STy** getelementptr inbounds ([[STRUCT_STY:%.*]], %struct.STy* @global, i64 0, i32 2), align 8 4063; IS__TUNIT_NPM-NEXT: [[SRC:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP0]], i64 0, i32 1 4064; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load double*, double** [[SRC]], align 8 4065; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load double, double* [[TMP1]], align 8 4066; IS__TUNIT_NPM-NEXT: [[CONV:%.*]] = fptrunc double [[TMP2]] to float 4067; IS__TUNIT_NPM-NEXT: [[DST:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP0]], i64 0, i32 0 4068; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = load float*, float** [[DST]], align 8 4069; IS__TUNIT_NPM-NEXT: store float [[CONV]], float* [[TMP3]], align 4 4070; IS__TUNIT_NPM-NEXT: ret void 4071; 4072; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn uwtable 4073; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@nested_memory_callee 4074; IS__CGSCC_OPM-SAME: (%struct.STy* noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR11:[0-9]+]] { 4075; IS__CGSCC_OPM-NEXT: entry: 4076; IS__CGSCC_OPM-NEXT: [[INNER:%.*]] = getelementptr inbounds [[STRUCT_STY:%.*]], %struct.STy* [[S]], i64 0, i32 2 4077; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = load %struct.STy*, %struct.STy** [[INNER]], align 8 4078; IS__CGSCC_OPM-NEXT: [[INNER1:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP0]], i64 0, i32 2 4079; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load %struct.STy*, %struct.STy** [[INNER1]], align 8 4080; IS__CGSCC_OPM-NEXT: [[SRC:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP1]], i64 0, i32 1 4081; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = load double*, double** [[SRC]], align 8 4082; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = load double, double* [[TMP2]], align 8 4083; IS__CGSCC_OPM-NEXT: [[CONV:%.*]] = fptrunc double [[TMP3]] to float 4084; IS__CGSCC_OPM-NEXT: [[DST:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP1]], i64 0, i32 0 4085; IS__CGSCC_OPM-NEXT: [[TMP4:%.*]] = load float*, float** [[DST]], align 8 4086; IS__CGSCC_OPM-NEXT: store float [[CONV]], float* [[TMP4]], align 4 4087; IS__CGSCC_OPM-NEXT: ret void 4088; 4089; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn uwtable 4090; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@nested_memory_callee 4091; IS__CGSCC_NPM-SAME: (float* [[TMP0:%.*]], double* [[TMP1:%.*]], %struct.STy* [[TMP2:%.*]]) #[[ATTR9:[0-9]+]] { 4092; IS__CGSCC_NPM-NEXT: entry: 4093; IS__CGSCC_NPM-NEXT: [[S_PRIV:%.*]] = alloca [[STRUCT_STY:%.*]], align 8 4094; IS__CGSCC_NPM-NEXT: [[S_PRIV_CAST:%.*]] = bitcast %struct.STy* [[S_PRIV]] to float** 4095; IS__CGSCC_NPM-NEXT: store float* [[TMP0]], float** [[S_PRIV_CAST]], align 8 4096; IS__CGSCC_NPM-NEXT: [[S_PRIV_0_1:%.*]] = getelementptr [[STRUCT_STY]], %struct.STy* [[S_PRIV]], i64 0, i32 1 4097; IS__CGSCC_NPM-NEXT: store double* [[TMP1]], double** [[S_PRIV_0_1]], align 8 4098; IS__CGSCC_NPM-NEXT: [[S_PRIV_0_2:%.*]] = getelementptr [[STRUCT_STY]], %struct.STy* [[S_PRIV]], i64 0, i32 2 4099; IS__CGSCC_NPM-NEXT: store %struct.STy* [[TMP2]], %struct.STy** [[S_PRIV_0_2]], align 8 4100; IS__CGSCC_NPM-NEXT: [[INNER:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[S_PRIV]], i64 0, i32 2 4101; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = load %struct.STy*, %struct.STy** [[INNER]], align 8 4102; IS__CGSCC_NPM-NEXT: [[INNER1:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP3]], i64 0, i32 2 4103; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = load %struct.STy*, %struct.STy** [[INNER1]], align 8 4104; IS__CGSCC_NPM-NEXT: [[SRC:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP4]], i64 0, i32 1 4105; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = load double*, double** [[SRC]], align 8 4106; IS__CGSCC_NPM-NEXT: [[TMP6:%.*]] = load double, double* [[TMP5]], align 8 4107; IS__CGSCC_NPM-NEXT: [[CONV:%.*]] = fptrunc double [[TMP6]] to float 4108; IS__CGSCC_NPM-NEXT: [[DST:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP4]], i64 0, i32 0 4109; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = load float*, float** [[DST]], align 8 4110; IS__CGSCC_NPM-NEXT: store float [[CONV]], float* [[TMP7]], align 4 4111; IS__CGSCC_NPM-NEXT: ret void 4112; 4113entry: 4114 %inner = getelementptr inbounds %struct.STy, %struct.STy* %S, i64 0, i32 2 4115 %0 = load %struct.STy*, %struct.STy** %inner, align 8 4116 %inner1 = getelementptr inbounds %struct.STy, %struct.STy* %0, i64 0, i32 2 4117 %1 = load %struct.STy*, %struct.STy** %inner1, align 8 4118 %src = getelementptr inbounds %struct.STy, %struct.STy* %1, i64 0, i32 1 4119 %2 = load double*, double** %src, align 8 4120 %3 = load double, double* %2, align 8 4121 %conv = fptrunc double %3 to float 4122 %dst = getelementptr inbounds %struct.STy, %struct.STy* %1, i64 0, i32 0 4123 %4 = load float*, float** %dst, align 8 4124 store float %conv, float* %4, align 4 4125 ret void 4126} 4127 4128; Make sure the access %1 is not forwarded to the loads %2 and %3 as the indices are 4129; varying and the accesses thus not "exact". This used to simplify %cmp12 to true. 4130define hidden void @no_propagation_of_unknown_index_access(i32* %in, i32* %out, i32 %idx) #0 { 4131; IS__TUNIT_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind 4132; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@no_propagation_of_unknown_index_access 4133; IS__TUNIT_OPM-SAME: (i32* nocapture nofree readonly [[IN:%.*]], i32* nocapture nofree writeonly [[OUT:%.*]], i32 [[IDX:%.*]]) #[[ATTR11:[0-9]+]] { 4134; IS__TUNIT_OPM-NEXT: entry: 4135; IS__TUNIT_OPM-NEXT: [[BUF:%.*]] = alloca [128 x i32], align 16 4136; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast [128 x i32]* [[BUF]] to i8* 4137; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) 4138; IS__TUNIT_OPM-NEXT: br label [[FOR_COND:%.*]] 4139; IS__TUNIT_OPM: for.cond: 4140; IS__TUNIT_OPM-NEXT: [[I_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY:%.*]] ] 4141; IS__TUNIT_OPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[I_0]], 128 4142; IS__TUNIT_OPM-NEXT: br i1 [[CMP]], label [[FOR_BODY]], label [[FOR_COND_CLEANUP:%.*]] 4143; IS__TUNIT_OPM: for.cond.cleanup: 4144; IS__TUNIT_OPM-NEXT: br label [[FOR_COND4:%.*]] 4145; IS__TUNIT_OPM: for.body: 4146; IS__TUNIT_OPM-NEXT: [[IDXPROM:%.*]] = sext i32 [[I_0]] to i64 4147; IS__TUNIT_OPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[IN]], i64 [[IDXPROM]] 4148; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[ARRAYIDX]], align 4 4149; IS__TUNIT_OPM-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM]] 4150; IS__TUNIT_OPM-NEXT: store i32 [[TMP1]], i32* [[ARRAYIDX2]], align 4 4151; IS__TUNIT_OPM-NEXT: [[INC]] = add nsw i32 [[I_0]], 1 4152; IS__TUNIT_OPM-NEXT: br label [[FOR_COND]], !llvm.loop [[TBAA10]] 4153; IS__TUNIT_OPM: for.cond4: 4154; IS__TUNIT_OPM-NEXT: [[I3_0:%.*]] = phi i32 [ 0, [[FOR_COND_CLEANUP]] ], [ [[INC16:%.*]], [[FOR_BODY7:%.*]] ] 4155; IS__TUNIT_OPM-NEXT: [[CMP5:%.*]] = icmp slt i32 [[I3_0]], 128 4156; IS__TUNIT_OPM-NEXT: br i1 [[CMP5]], label [[FOR_BODY7]], label [[FOR_COND_CLEANUP6:%.*]] 4157; IS__TUNIT_OPM: for.cond.cleanup6: 4158; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) 4159; IS__TUNIT_OPM-NEXT: ret void 4160; IS__TUNIT_OPM: for.body7: 4161; IS__TUNIT_OPM-NEXT: [[IDXPROM8:%.*]] = sext i32 [[I3_0]] to i64 4162; IS__TUNIT_OPM-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM8]] 4163; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARRAYIDX9]], align 4 4164; IS__TUNIT_OPM-NEXT: [[IDXPROM10:%.*]] = sext i32 [[IDX]] to i64 4165; IS__TUNIT_OPM-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM10]] 4166; IS__TUNIT_OPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[ARRAYIDX11]], align 4 4167; IS__TUNIT_OPM-NEXT: [[CMP12:%.*]] = icmp sle i32 [[TMP2]], [[TMP3]] 4168; IS__TUNIT_OPM-NEXT: [[CONV:%.*]] = zext i1 [[CMP12]] to i32 4169; IS__TUNIT_OPM-NEXT: [[ARRAYIDX14:%.*]] = getelementptr inbounds i32, i32* [[OUT]], i64 [[IDXPROM8]] 4170; IS__TUNIT_OPM-NEXT: store i32 [[CONV]], i32* [[ARRAYIDX14]], align 4 4171; IS__TUNIT_OPM-NEXT: [[INC16]] = add nsw i32 [[I3_0]], 1 4172; IS__TUNIT_OPM-NEXT: br label [[FOR_COND4]], !llvm.loop [[TBAA12]] 4173; 4174; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn 4175; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@no_propagation_of_unknown_index_access 4176; IS__TUNIT_NPM-SAME: (i32* nocapture nofree readonly [[IN:%.*]], i32* nocapture nofree writeonly [[OUT:%.*]], i32 [[IDX:%.*]]) #[[ATTR1]] { 4177; IS__TUNIT_NPM-NEXT: entry: 4178; IS__TUNIT_NPM-NEXT: [[BUF:%.*]] = alloca [128 x i32], align 16 4179; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = bitcast [128 x i32]* [[BUF]] to i8* 4180; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) #[[ATTR12]] 4181; IS__TUNIT_NPM-NEXT: br label [[FOR_COND:%.*]] 4182; IS__TUNIT_NPM: for.cond: 4183; IS__TUNIT_NPM-NEXT: [[I_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY:%.*]] ] 4184; IS__TUNIT_NPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[I_0]], 128 4185; IS__TUNIT_NPM-NEXT: br i1 [[CMP]], label [[FOR_BODY]], label [[FOR_COND_CLEANUP:%.*]] 4186; IS__TUNIT_NPM: for.cond.cleanup: 4187; IS__TUNIT_NPM-NEXT: br label [[FOR_COND4:%.*]] 4188; IS__TUNIT_NPM: for.body: 4189; IS__TUNIT_NPM-NEXT: [[IDXPROM:%.*]] = sext i32 [[I_0]] to i64 4190; IS__TUNIT_NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[IN]], i64 [[IDXPROM]] 4191; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[ARRAYIDX]], align 4 4192; IS__TUNIT_NPM-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM]] 4193; IS__TUNIT_NPM-NEXT: store i32 [[TMP1]], i32* [[ARRAYIDX2]], align 4 4194; IS__TUNIT_NPM-NEXT: [[INC]] = add nsw i32 [[I_0]], 1 4195; IS__TUNIT_NPM-NEXT: br label [[FOR_COND]], !llvm.loop [[TBAA10]] 4196; IS__TUNIT_NPM: for.cond4: 4197; IS__TUNIT_NPM-NEXT: [[I3_0:%.*]] = phi i32 [ 0, [[FOR_COND_CLEANUP]] ], [ [[INC16:%.*]], [[FOR_BODY7:%.*]] ] 4198; IS__TUNIT_NPM-NEXT: [[CMP5:%.*]] = icmp slt i32 [[I3_0]], 128 4199; IS__TUNIT_NPM-NEXT: br i1 [[CMP5]], label [[FOR_BODY7]], label [[FOR_COND_CLEANUP6:%.*]] 4200; IS__TUNIT_NPM: for.cond.cleanup6: 4201; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) #[[ATTR12]] 4202; IS__TUNIT_NPM-NEXT: ret void 4203; IS__TUNIT_NPM: for.body7: 4204; IS__TUNIT_NPM-NEXT: [[IDXPROM8:%.*]] = sext i32 [[I3_0]] to i64 4205; IS__TUNIT_NPM-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM8]] 4206; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARRAYIDX9]], align 4 4207; IS__TUNIT_NPM-NEXT: [[IDXPROM10:%.*]] = sext i32 [[IDX]] to i64 4208; IS__TUNIT_NPM-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM10]] 4209; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[ARRAYIDX11]], align 4 4210; IS__TUNIT_NPM-NEXT: [[CMP12:%.*]] = icmp sle i32 [[TMP2]], [[TMP3]] 4211; IS__TUNIT_NPM-NEXT: [[CONV:%.*]] = zext i1 [[CMP12]] to i32 4212; IS__TUNIT_NPM-NEXT: [[ARRAYIDX14:%.*]] = getelementptr inbounds i32, i32* [[OUT]], i64 [[IDXPROM8]] 4213; IS__TUNIT_NPM-NEXT: store i32 [[CONV]], i32* [[ARRAYIDX14]], align 4 4214; IS__TUNIT_NPM-NEXT: [[INC16]] = add nsw i32 [[I3_0]], 1 4215; IS__TUNIT_NPM-NEXT: br label [[FOR_COND4]], !llvm.loop [[TBAA12]] 4216; 4217; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind 4218; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@no_propagation_of_unknown_index_access 4219; IS__CGSCC_OPM-SAME: (i32* nocapture nofree readonly [[IN:%.*]], i32* nocapture nofree writeonly [[OUT:%.*]], i32 [[IDX:%.*]]) #[[ATTR12:[0-9]+]] { 4220; IS__CGSCC_OPM-NEXT: entry: 4221; IS__CGSCC_OPM-NEXT: [[BUF:%.*]] = alloca [128 x i32], align 16 4222; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast [128 x i32]* [[BUF]] to i8* 4223; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) 4224; IS__CGSCC_OPM-NEXT: br label [[FOR_COND:%.*]] 4225; IS__CGSCC_OPM: for.cond: 4226; IS__CGSCC_OPM-NEXT: [[I_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY:%.*]] ] 4227; IS__CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[I_0]], 128 4228; IS__CGSCC_OPM-NEXT: br i1 [[CMP]], label [[FOR_BODY]], label [[FOR_COND_CLEANUP:%.*]] 4229; IS__CGSCC_OPM: for.cond.cleanup: 4230; IS__CGSCC_OPM-NEXT: br label [[FOR_COND4:%.*]] 4231; IS__CGSCC_OPM: for.body: 4232; IS__CGSCC_OPM-NEXT: [[IDXPROM:%.*]] = sext i32 [[I_0]] to i64 4233; IS__CGSCC_OPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[IN]], i64 [[IDXPROM]] 4234; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[ARRAYIDX]], align 4 4235; IS__CGSCC_OPM-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM]] 4236; IS__CGSCC_OPM-NEXT: store i32 [[TMP1]], i32* [[ARRAYIDX2]], align 4 4237; IS__CGSCC_OPM-NEXT: [[INC]] = add nsw i32 [[I_0]], 1 4238; IS__CGSCC_OPM-NEXT: br label [[FOR_COND]], !llvm.loop [[TBAA10]] 4239; IS__CGSCC_OPM: for.cond4: 4240; IS__CGSCC_OPM-NEXT: [[I3_0:%.*]] = phi i32 [ 0, [[FOR_COND_CLEANUP]] ], [ [[INC16:%.*]], [[FOR_BODY7:%.*]] ] 4241; IS__CGSCC_OPM-NEXT: [[CMP5:%.*]] = icmp slt i32 [[I3_0]], 128 4242; IS__CGSCC_OPM-NEXT: br i1 [[CMP5]], label [[FOR_BODY7]], label [[FOR_COND_CLEANUP6:%.*]] 4243; IS__CGSCC_OPM: for.cond.cleanup6: 4244; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) 4245; IS__CGSCC_OPM-NEXT: ret void 4246; IS__CGSCC_OPM: for.body7: 4247; IS__CGSCC_OPM-NEXT: [[IDXPROM8:%.*]] = sext i32 [[I3_0]] to i64 4248; IS__CGSCC_OPM-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM8]] 4249; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARRAYIDX9]], align 4 4250; IS__CGSCC_OPM-NEXT: [[IDXPROM10:%.*]] = sext i32 [[IDX]] to i64 4251; IS__CGSCC_OPM-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM10]] 4252; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[ARRAYIDX11]], align 4 4253; IS__CGSCC_OPM-NEXT: [[CMP12:%.*]] = icmp sle i32 [[TMP2]], [[TMP3]] 4254; IS__CGSCC_OPM-NEXT: [[CONV:%.*]] = zext i1 [[CMP12]] to i32 4255; IS__CGSCC_OPM-NEXT: [[ARRAYIDX14:%.*]] = getelementptr inbounds i32, i32* [[OUT]], i64 [[IDXPROM8]] 4256; IS__CGSCC_OPM-NEXT: store i32 [[CONV]], i32* [[ARRAYIDX14]], align 4 4257; IS__CGSCC_OPM-NEXT: [[INC16]] = add nsw i32 [[I3_0]], 1 4258; IS__CGSCC_OPM-NEXT: br label [[FOR_COND4]], !llvm.loop [[TBAA12]] 4259; 4260; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn 4261; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@no_propagation_of_unknown_index_access 4262; IS__CGSCC_NPM-SAME: (i32* nocapture nofree readonly [[IN:%.*]], i32* nocapture nofree writeonly [[OUT:%.*]], i32 [[IDX:%.*]]) #[[ATTR10:[0-9]+]] { 4263; IS__CGSCC_NPM-NEXT: entry: 4264; IS__CGSCC_NPM-NEXT: [[BUF:%.*]] = alloca [128 x i32], align 16 4265; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast [128 x i32]* [[BUF]] to i8* 4266; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) #[[ATTR14]] 4267; IS__CGSCC_NPM-NEXT: br label [[FOR_COND:%.*]] 4268; IS__CGSCC_NPM: for.cond: 4269; IS__CGSCC_NPM-NEXT: [[I_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY:%.*]] ] 4270; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[I_0]], 128 4271; IS__CGSCC_NPM-NEXT: br i1 [[CMP]], label [[FOR_BODY]], label [[FOR_COND_CLEANUP:%.*]] 4272; IS__CGSCC_NPM: for.cond.cleanup: 4273; IS__CGSCC_NPM-NEXT: br label [[FOR_COND4:%.*]] 4274; IS__CGSCC_NPM: for.body: 4275; IS__CGSCC_NPM-NEXT: [[IDXPROM:%.*]] = sext i32 [[I_0]] to i64 4276; IS__CGSCC_NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[IN]], i64 [[IDXPROM]] 4277; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[ARRAYIDX]], align 4 4278; IS__CGSCC_NPM-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM]] 4279; IS__CGSCC_NPM-NEXT: store i32 [[TMP1]], i32* [[ARRAYIDX2]], align 4 4280; IS__CGSCC_NPM-NEXT: [[INC]] = add nsw i32 [[I_0]], 1 4281; IS__CGSCC_NPM-NEXT: br label [[FOR_COND]], !llvm.loop [[TBAA10]] 4282; IS__CGSCC_NPM: for.cond4: 4283; IS__CGSCC_NPM-NEXT: [[I3_0:%.*]] = phi i32 [ 0, [[FOR_COND_CLEANUP]] ], [ [[INC16:%.*]], [[FOR_BODY7:%.*]] ] 4284; IS__CGSCC_NPM-NEXT: [[CMP5:%.*]] = icmp slt i32 [[I3_0]], 128 4285; IS__CGSCC_NPM-NEXT: br i1 [[CMP5]], label [[FOR_BODY7]], label [[FOR_COND_CLEANUP6:%.*]] 4286; IS__CGSCC_NPM: for.cond.cleanup6: 4287; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) #[[ATTR14]] 4288; IS__CGSCC_NPM-NEXT: ret void 4289; IS__CGSCC_NPM: for.body7: 4290; IS__CGSCC_NPM-NEXT: [[IDXPROM8:%.*]] = sext i32 [[I3_0]] to i64 4291; IS__CGSCC_NPM-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM8]] 4292; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARRAYIDX9]], align 4 4293; IS__CGSCC_NPM-NEXT: [[IDXPROM10:%.*]] = sext i32 [[IDX]] to i64 4294; IS__CGSCC_NPM-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM10]] 4295; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[ARRAYIDX11]], align 4 4296; IS__CGSCC_NPM-NEXT: [[CMP12:%.*]] = icmp sle i32 [[TMP2]], [[TMP3]] 4297; IS__CGSCC_NPM-NEXT: [[CONV:%.*]] = zext i1 [[CMP12]] to i32 4298; IS__CGSCC_NPM-NEXT: [[ARRAYIDX14:%.*]] = getelementptr inbounds i32, i32* [[OUT]], i64 [[IDXPROM8]] 4299; IS__CGSCC_NPM-NEXT: store i32 [[CONV]], i32* [[ARRAYIDX14]], align 4 4300; IS__CGSCC_NPM-NEXT: [[INC16]] = add nsw i32 [[I3_0]], 1 4301; IS__CGSCC_NPM-NEXT: br label [[FOR_COND4]], !llvm.loop [[TBAA12]] 4302; 4303entry: 4304 %buf = alloca [128 x i32], align 16 4305 %0 = bitcast [128 x i32]* %buf to i8* 4306 call void @llvm.lifetime.start.p0i8(i64 512, i8* %0) #2 4307 br label %for.cond 4308 4309for.cond: ; preds = %for.body, %entry 4310 %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.body ] 4311 %cmp = icmp slt i32 %i.0, 128 4312 br i1 %cmp, label %for.body, label %for.cond.cleanup 4313 4314for.cond.cleanup: ; preds = %for.cond 4315 br label %for.cond4 4316 4317for.body: ; preds = %for.cond 4318 %idxprom = sext i32 %i.0 to i64 4319 %arrayidx = getelementptr inbounds i32, i32* %in, i64 %idxprom 4320 %1 = load i32, i32* %arrayidx, align 4 4321 %arrayidx2 = getelementptr inbounds [128 x i32], [128 x i32]* %buf, i64 0, i64 %idxprom 4322 store i32 %1, i32* %arrayidx2, align 4 4323 %inc = add nsw i32 %i.0, 1 4324 br label %for.cond, !llvm.loop !10 4325 4326for.cond4: ; preds = %for.body7, %for.cond.cleanup 4327 %i3.0 = phi i32 [ 0, %for.cond.cleanup ], [ %inc16, %for.body7 ] 4328 %cmp5 = icmp slt i32 %i3.0, 128 4329 br i1 %cmp5, label %for.body7, label %for.cond.cleanup6 4330 4331for.cond.cleanup6: ; preds = %for.cond4 4332 call void @llvm.lifetime.end.p0i8(i64 512, i8* %0) #2 4333 ret void 4334 4335for.body7: ; preds = %for.cond4 4336 %idxprom8 = sext i32 %i3.0 to i64 4337 %arrayidx9 = getelementptr inbounds [128 x i32], [128 x i32]* %buf, i64 0, i64 %idxprom8 4338 %2 = load i32, i32* %arrayidx9, align 4 4339 %idxprom10 = sext i32 %idx to i64 4340 %arrayidx11 = getelementptr inbounds [128 x i32], [128 x i32]* %buf, i64 0, i64 %idxprom10 4341 %3 = load i32, i32* %arrayidx11, align 4 4342 %cmp12 = icmp sle i32 %2, %3 4343 %conv = zext i1 %cmp12 to i32 4344 %arrayidx14 = getelementptr inbounds i32, i32* %out, i64 %idxprom8 4345 store i32 %conv, i32* %arrayidx14, align 4 4346 %inc16 = add nsw i32 %i3.0, 1 4347 br label %for.cond4, !llvm.loop !12 4348} 4349 4350; Ensure we do not return true. 4351define internal i1 @alloca_non_unique(i32* %p, i32 %in, i1 %c) { 4352; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind 4353; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@alloca_non_unique 4354; IS__TUNIT_OPM-SAME: (i32* nocapture nofree nonnull readonly align 4 [[P:%.*]], i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR12:[0-9]+]] { 4355; IS__TUNIT_OPM-NEXT: [[A:%.*]] = alloca i32, align 4 4356; IS__TUNIT_OPM-NEXT: store i32 [[IN]], i32* [[A]], align 4 4357; IS__TUNIT_OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] 4358; IS__TUNIT_OPM: t: 4359; IS__TUNIT_OPM-NEXT: [[R:%.*]] = call i1 @alloca_non_unique(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32 noundef 42, i1 noundef false) #[[ATTR18:[0-9]+]] 4360; IS__TUNIT_OPM-NEXT: ret i1 [[R]] 4361; IS__TUNIT_OPM: f: 4362; IS__TUNIT_OPM-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 4 4363; IS__TUNIT_OPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[IN]], [[L]] 4364; IS__TUNIT_OPM-NEXT: ret i1 [[CMP]] 4365; 4366; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind 4367; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@alloca_non_unique 4368; IS__TUNIT_NPM-SAME: (i32* nocapture nofree nonnull readonly align 4 [[P:%.*]], i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR9:[0-9]+]] { 4369; IS__TUNIT_NPM-NEXT: [[A:%.*]] = alloca i32, align 4 4370; IS__TUNIT_NPM-NEXT: store i32 [[IN]], i32* [[A]], align 4 4371; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] 4372; IS__TUNIT_NPM: t: 4373; IS__TUNIT_NPM-NEXT: [[R:%.*]] = call i1 @alloca_non_unique(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32 noundef 42, i1 noundef false) #[[ATTR16:[0-9]+]] 4374; IS__TUNIT_NPM-NEXT: ret i1 [[R]] 4375; IS__TUNIT_NPM: f: 4376; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 4 4377; IS__TUNIT_NPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[IN]], [[L]] 4378; IS__TUNIT_NPM-NEXT: ret i1 [[CMP]] 4379; 4380; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind 4381; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@alloca_non_unique 4382; IS__CGSCC_OPM-SAME: (i32* nocapture nofree nonnull readonly align 4 [[P:%.*]], i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR13:[0-9]+]] { 4383; IS__CGSCC_OPM-NEXT: [[A:%.*]] = alloca i32, align 4 4384; IS__CGSCC_OPM-NEXT: store i32 [[IN]], i32* [[A]], align 4 4385; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] 4386; IS__CGSCC_OPM: t: 4387; IS__CGSCC_OPM-NEXT: [[R:%.*]] = call i1 @alloca_non_unique(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32 noundef 42, i1 noundef false) #[[ATTR19:[0-9]+]] 4388; IS__CGSCC_OPM-NEXT: ret i1 [[R]] 4389; IS__CGSCC_OPM: f: 4390; IS__CGSCC_OPM-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 4 4391; IS__CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[IN]], [[L]] 4392; IS__CGSCC_OPM-NEXT: ret i1 [[CMP]] 4393; 4394; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind 4395; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@alloca_non_unique 4396; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readonly align 4 [[P:%.*]], i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR11:[0-9]+]] { 4397; IS__CGSCC_NPM-NEXT: [[A:%.*]] = alloca i32, align 4 4398; IS__CGSCC_NPM-NEXT: store i32 [[IN]], i32* [[A]], align 4 4399; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] 4400; IS__CGSCC_NPM: t: 4401; IS__CGSCC_NPM-NEXT: [[R:%.*]] = call i1 @alloca_non_unique(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32 noundef 42, i1 noundef false) #[[ATTR18:[0-9]+]] 4402; IS__CGSCC_NPM-NEXT: ret i1 [[R]] 4403; IS__CGSCC_NPM: f: 4404; IS__CGSCC_NPM-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 4 4405; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[IN]], [[L]] 4406; IS__CGSCC_NPM-NEXT: ret i1 [[CMP]] 4407; 4408 %a = alloca i32 4409 store i32 %in, i32* %a 4410 br i1 %c, label %t, label %f 4411t: 4412 %r = call i1 @alloca_non_unique(i32* %a, i32 42, i1 false) 4413 ret i1 %r 4414f: 4415 %l = load i32, i32* %p 4416 %cmp = icmp eq i32 %in, %l 4417 ret i1 %cmp 4418} 4419 4420; Ensure we do not return true. 4421define i1 @alloca_non_unique_caller(i32 %in, i1 %c) { 4422; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readnone 4423; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@alloca_non_unique_caller 4424; IS__TUNIT_OPM-SAME: (i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR8]] { 4425; IS__TUNIT_OPM-NEXT: [[R:%.*]] = call i1 @alloca_non_unique(i32* undef, i32 [[IN]], i1 [[C]]) #[[ATTR18]] 4426; IS__TUNIT_OPM-NEXT: ret i1 [[R]] 4427; 4428; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone 4429; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@alloca_non_unique_caller 4430; IS__TUNIT_NPM-SAME: (i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR10:[0-9]+]] { 4431; IS__TUNIT_NPM-NEXT: [[R:%.*]] = call i1 @alloca_non_unique(i32* undef, i32 [[IN]], i1 [[C]]) #[[ATTR16]] 4432; IS__TUNIT_NPM-NEXT: ret i1 [[R]] 4433; 4434; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone 4435; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@alloca_non_unique_caller 4436; IS__CGSCC_OPM-SAME: (i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR14:[0-9]+]] { 4437; IS__CGSCC_OPM-NEXT: [[R:%.*]] = call i1 @alloca_non_unique(i32* undef, i32 [[IN]], i1 [[C]]) #[[ATTR17]] 4438; IS__CGSCC_OPM-NEXT: ret i1 [[R]] 4439; 4440; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone 4441; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@alloca_non_unique_caller 4442; IS__CGSCC_NPM-SAME: (i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR12:[0-9]+]] { 4443; IS__CGSCC_NPM-NEXT: [[R:%.*]] = call i1 @alloca_non_unique(i32* undef, i32 [[IN]], i1 [[C]]) #[[ATTR16]] 4444; IS__CGSCC_NPM-NEXT: ret i1 [[R]] 4445; 4446 %r = call i1 @alloca_non_unique(i32* undef, i32 %in, i1 %c) 4447 ret i1 %r 4448} 4449 4450!llvm.module.flags = !{!0, !1} 4451!llvm.ident = !{!2} 4452 4453!0 = !{i32 1, !"wchar_size", i32 4} 4454!1 = !{i32 7, !"uwtable", i32 1} 4455!2 = !{!"clang version 13.0.0"} 4456!3 = !{!4, !4, i64 0} 4457!4 = !{!"int", !5, i64 0} 4458!5 = !{!"omnipotent char", !6, i64 0} 4459!6 = !{!"Simple C/C++ TBAA"} 4460!7 = !{!8, !9, i64 12} 4461!8 = !{!"S", !4, i64 0, !4, i64 4, !4, i64 8, !9, i64 12, !9, i64 16, !9, i64 20} 4462!9 = !{!"float", !5, i64 0} 4463!10 = !{!8, !9, i64 16} 4464!11 = !{!8, !9, i64 20} 4465!12 = !{!8, !4, i64 0} 4466!13 = !{!8, !4, i64 4} 4467!14 = !{!8, !4, i64 8} 4468!15 = !{!5, !5, i64 0} 4469!16 = distinct !{!16, !17} 4470!17 = !{!"llvm.loop.mustprogress"} 4471!18 = !{!9, !9, i64 0} 4472!19 = distinct !{!19, !17} 4473!20 = !{!21, !21, i64 0} 4474!21 = !{!"long long", !5, i64 0} 4475!22 = distinct !{!22, !17} 4476!23 = distinct !{!23, !17} 4477!24 = distinct !{!24, !17} 4478!25 = distinct !{!25, !17} 4479!26 = distinct !{!26, !17} 4480!27 = distinct !{!27, !17} 4481!28 = distinct !{!28, !17} 4482!29 = distinct !{!29, !17} 4483!30 = distinct !{!30, !17} 4484!31 = distinct !{!31, !17} 4485;. 4486; IS__TUNIT_OPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } 4487; IS__TUNIT_OPM: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn } 4488; IS__TUNIT_OPM: attributes #[[ATTR2:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } 4489; IS__TUNIT_OPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind } 4490; IS__TUNIT_OPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind readnone willreturn } 4491; IS__TUNIT_OPM: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind willreturn } 4492; IS__TUNIT_OPM: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind willreturn writeonly } 4493; IS__TUNIT_OPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind readonly willreturn } 4494; IS__TUNIT_OPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind readnone } 4495; IS__TUNIT_OPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind writeonly } 4496; IS__TUNIT_OPM: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind willreturn uwtable } 4497; IS__TUNIT_OPM: attributes #[[ATTR11]] = { argmemonly nofree norecurse nosync nounwind } 4498; IS__TUNIT_OPM: attributes #[[ATTR12]] = { argmemonly nofree nosync nounwind } 4499; IS__TUNIT_OPM: attributes #[[ATTR13]] = { willreturn } 4500; IS__TUNIT_OPM: attributes #[[ATTR14]] = { nofree nosync nounwind willreturn writeonly } 4501; IS__TUNIT_OPM: attributes #[[ATTR15]] = { nofree nosync nounwind writeonly } 4502; IS__TUNIT_OPM: attributes #[[ATTR16]] = { norecurse } 4503; IS__TUNIT_OPM: attributes #[[ATTR17]] = { nounwind } 4504; IS__TUNIT_OPM: attributes #[[ATTR18]] = { nofree nosync nounwind } 4505;. 4506; IS__TUNIT_NPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } 4507; IS__TUNIT_NPM: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn } 4508; IS__TUNIT_NPM: attributes #[[ATTR2:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } 4509; IS__TUNIT_NPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind willreturn } 4510; IS__TUNIT_NPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind readnone willreturn } 4511; IS__TUNIT_NPM: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind willreturn writeonly } 4512; IS__TUNIT_NPM: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind readonly willreturn } 4513; IS__TUNIT_NPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind writeonly } 4514; IS__TUNIT_NPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind willreturn uwtable } 4515; IS__TUNIT_NPM: attributes #[[ATTR9]] = { argmemonly nofree nosync nounwind } 4516; IS__TUNIT_NPM: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind readnone } 4517; IS__TUNIT_NPM: attributes #[[ATTR11:[0-9]+]] = { argmemonly nofree nounwind willreturn writeonly } 4518; IS__TUNIT_NPM: attributes #[[ATTR12]] = { willreturn } 4519; IS__TUNIT_NPM: attributes #[[ATTR13]] = { nofree nosync nounwind willreturn writeonly } 4520; IS__TUNIT_NPM: attributes #[[ATTR14]] = { norecurse } 4521; IS__TUNIT_NPM: attributes #[[ATTR15]] = { nounwind } 4522; IS__TUNIT_NPM: attributes #[[ATTR16]] = { nofree nosync nounwind } 4523;. 4524; IS__CGSCC_OPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } 4525; IS__CGSCC_OPM: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind willreturn } 4526; IS__CGSCC_OPM: attributes #[[ATTR2:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } 4527; IS__CGSCC_OPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind readnone willreturn } 4528; IS__CGSCC_OPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind willreturn } 4529; IS__CGSCC_OPM: attributes #[[ATTR5]] = { nofree nosync nounwind willreturn } 4530; IS__CGSCC_OPM: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind readonly willreturn } 4531; IS__CGSCC_OPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind willreturn writeonly } 4532; IS__CGSCC_OPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind readnone } 4533; IS__CGSCC_OPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind } 4534; IS__CGSCC_OPM: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind writeonly } 4535; IS__CGSCC_OPM: attributes #[[ATTR11]] = { nofree norecurse nosync nounwind willreturn uwtable } 4536; IS__CGSCC_OPM: attributes #[[ATTR12]] = { argmemonly nofree norecurse nosync nounwind } 4537; IS__CGSCC_OPM: attributes #[[ATTR13]] = { argmemonly nofree nosync nounwind } 4538; IS__CGSCC_OPM: attributes #[[ATTR14]] = { nofree nosync nounwind readnone } 4539; IS__CGSCC_OPM: attributes #[[ATTR15]] = { willreturn } 4540; IS__CGSCC_OPM: attributes #[[ATTR16]] = { nounwind willreturn writeonly } 4541; IS__CGSCC_OPM: attributes #[[ATTR17]] = { nounwind } 4542; IS__CGSCC_OPM: attributes #[[ATTR18]] = { norecurse } 4543; IS__CGSCC_OPM: attributes #[[ATTR19]] = { nofree nosync nounwind } 4544;. 4545; IS__CGSCC_NPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } 4546; IS__CGSCC_NPM: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind willreturn } 4547; IS__CGSCC_NPM: attributes #[[ATTR2:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } 4548; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind readnone willreturn } 4549; IS__CGSCC_NPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind willreturn } 4550; IS__CGSCC_NPM: attributes #[[ATTR5]] = { nofree nosync nounwind willreturn } 4551; IS__CGSCC_NPM: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind readonly willreturn } 4552; IS__CGSCC_NPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind willreturn writeonly } 4553; IS__CGSCC_NPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind writeonly } 4554; IS__CGSCC_NPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind willreturn uwtable } 4555; IS__CGSCC_NPM: attributes #[[ATTR10]] = { argmemonly nofree norecurse nosync nounwind willreturn } 4556; IS__CGSCC_NPM: attributes #[[ATTR11]] = { argmemonly nofree nosync nounwind } 4557; IS__CGSCC_NPM: attributes #[[ATTR12]] = { nofree nosync nounwind readnone } 4558; IS__CGSCC_NPM: attributes #[[ATTR13:[0-9]+]] = { argmemonly nofree nounwind willreturn writeonly } 4559; IS__CGSCC_NPM: attributes #[[ATTR14]] = { willreturn } 4560; IS__CGSCC_NPM: attributes #[[ATTR15]] = { nounwind willreturn writeonly } 4561; IS__CGSCC_NPM: attributes #[[ATTR16]] = { nounwind } 4562; IS__CGSCC_NPM: attributes #[[ATTR17]] = { norecurse } 4563; IS__CGSCC_NPM: attributes #[[ATTR18]] = { nofree nosync nounwind } 4564;. 4565; CHECK: [[META0:![0-9]+]] = !{i32 1, !"wchar_size", i32 4} 4566; CHECK: [[META1:![0-9]+]] = !{i32 7, !"uwtable", i32 1} 4567; CHECK: [[META2:![0-9]+]] = !{!"clang version 13.0.0"} 4568; CHECK: [[TBAA3]] = !{!4, !4, i64 0} 4569; CHECK: [[META4:![0-9]+]] = !{!"int", !5, i64 0} 4570; CHECK: [[META5:![0-9]+]] = !{!"omnipotent char", !6, i64 0} 4571; CHECK: [[META6:![0-9]+]] = !{!"Simple C/C++ TBAA"} 4572; CHECK: [[META7:![0-9]+]] = !{!8, !9, i64 12} 4573; CHECK: [[META8:![0-9]+]] = !{!"S", !4, i64 0, !4, i64 4, !4, i64 8, !9, i64 12, !9, i64 16, !9, i64 20} 4574; CHECK: [[META9:![0-9]+]] = !{!"float", !5, i64 0} 4575; CHECK: [[META10:![0-9]+]] = !{!8, !9, i64 16} 4576; CHECK: [[META11:![0-9]+]] = !{!8, !9, i64 20} 4577; CHECK: [[META12:![0-9]+]] = !{!8, !4, i64 0} 4578; CHECK: [[META13:![0-9]+]] = !{!8, !4, i64 4} 4579; CHECK: [[META14:![0-9]+]] = !{!8, !4, i64 8} 4580; CHECK: [[META15:![0-9]+]] = !{!5, !5, i64 0} 4581; CHECK: [[META16:![0-9]+]] = distinct !{!16, !17} 4582; CHECK: [[META17:![0-9]+]] = !{!"llvm.loop.mustprogress"} 4583; CHECK: [[META18:![0-9]+]] = !{!9, !9, i64 0} 4584; CHECK: [[META19:![0-9]+]] = distinct !{!19, !17} 4585; CHECK: [[META20:![0-9]+]] = !{!21, !21, i64 0} 4586; CHECK: [[META21:![0-9]+]] = !{!"long long", !5, i64 0} 4587; CHECK: [[META22:![0-9]+]] = distinct !{!22, !17} 4588; CHECK: [[META23:![0-9]+]] = distinct !{!23, !17} 4589; CHECK: [[META24:![0-9]+]] = distinct !{!24, !17} 4590; CHECK: [[META25:![0-9]+]] = distinct !{!25, !17} 4591; CHECK: [[META26:![0-9]+]] = distinct !{!26, !17} 4592; CHECK: [[META27:![0-9]+]] = distinct !{!27, !17} 4593; CHECK: [[META28:![0-9]+]] = distinct !{!28, !17} 4594; CHECK: [[META29:![0-9]+]] = distinct !{!29, !17} 4595; CHECK: [[META30:![0-9]+]] = distinct !{!30, !17} 4596; CHECK: [[META31:![0-9]+]] = distinct !{!31, !17} 4597;. 4598