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