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