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