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=16 -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=16 -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 7define dso_local i32 @visible(i32* noalias %A, i32* noalias %B) #0 { 8; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn 9; IS__TUNIT____-LABEL: define {{[^@]+}}@visible 10; IS__TUNIT____-SAME: (i32* noalias nocapture nofree readonly [[A:%.*]], i32* noalias nocapture nofree readonly [[B:%.*]]) #[[ATTR0:[0-9]+]] { 11; IS__TUNIT____-NEXT: entry: 12; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32 @noalias_args(i32* noalias nocapture nofree readonly align 4 [[A]], i32* noalias nocapture nofree readonly align 4 [[B]]) #[[ATTR3:[0-9]+]] 13; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i32 @noalias_args_argmem(i32* noalias nocapture nofree readonly align 4 [[A]], i32* noalias nocapture nofree readonly align 4 [[B]]) #[[ATTR3]] 14; IS__TUNIT____-NEXT: [[ADD:%.*]] = add nsw i32 [[CALL1]], [[CALL2]] 15; IS__TUNIT____-NEXT: ret i32 [[ADD]] 16; 17; IS__CGSCC_OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn 18; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@visible 19; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0:[0-9]+]] { 20; IS__CGSCC_OPM-NEXT: entry: 21; IS__CGSCC_OPM-NEXT: [[CALL1:%.*]] = call i32 @noalias_args(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR3:[0-9]+]] 22; IS__CGSCC_OPM-NEXT: [[CALL2:%.*]] = call i32 @noalias_args_argmem(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR3]] 23; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = add nsw i32 [[CALL1]], [[CALL2]] 24; IS__CGSCC_OPM-NEXT: ret i32 [[ADD]] 25; 26; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn 27; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@visible 28; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0:[0-9]+]] { 29; IS__CGSCC_NPM-NEXT: entry: 30; IS__CGSCC_NPM-NEXT: [[CALL1:%.*]] = call i32 @noalias_args(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR4:[0-9]+]] 31; IS__CGSCC_NPM-NEXT: [[CALL2:%.*]] = call i32 @noalias_args_argmem(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR4]] 32; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add nsw i32 [[CALL1]], [[CALL2]] 33; IS__CGSCC_NPM-NEXT: ret i32 [[ADD]] 34; 35entry: 36 %call1 = call i32 @noalias_args(i32* %A, i32* %B) 37 %call2 = call i32 @noalias_args_argmem(i32* %A, i32* %B) 38 %add = add nsw i32 %call1, %call2 39 ret i32 %add 40} 41 42define private i32 @noalias_args(i32* %A, i32* %B) #0 { 43; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn 44; IS__TUNIT____-LABEL: define {{[^@]+}}@noalias_args 45; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] { 46; IS__TUNIT____-NEXT: entry: 47; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4 48; IS__TUNIT____-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4 49; IS__TUNIT____-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP0]], [[TMP1]] 50; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR3]] 51; IS__TUNIT____-NEXT: [[ADD2:%.*]] = add nsw i32 [[ADD]], [[CALL]] 52; IS__TUNIT____-NEXT: ret i32 [[ADD2]] 53; 54; IS__CGSCC_OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn 55; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@noalias_args 56; IS__CGSCC_OPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] { 57; IS__CGSCC_OPM-NEXT: entry: 58; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4 59; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4 60; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP0]], [[TMP1]] 61; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR4:[0-9]+]] 62; IS__CGSCC_OPM-NEXT: [[ADD2:%.*]] = add nsw i32 [[ADD]], [[CALL]] 63; IS__CGSCC_OPM-NEXT: ret i32 [[ADD2]] 64; 65; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn 66; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@noalias_args 67; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] { 68; IS__CGSCC_NPM-NEXT: entry: 69; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4 70; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4 71; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP0]], [[TMP1]] 72; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR5:[0-9]+]] 73; IS__CGSCC_NPM-NEXT: [[ADD2:%.*]] = add nsw i32 [[ADD]], [[CALL]] 74; IS__CGSCC_NPM-NEXT: ret i32 [[ADD2]] 75; 76entry: 77 %0 = load i32, i32* %A, align 4 78 %1 = load i32, i32* %B, align 4 79 %add = add nsw i32 %0, %1 80 %call = call i32 @noalias_args_argmem(i32* %A, i32* %B) 81 %add2 = add nsw i32 %add, %call 82 ret i32 %add2 83} 84 85 86define internal i32 @noalias_args_argmem(i32* %A, i32* %B) #1 { 87; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn 88; IS__TUNIT____-LABEL: define {{[^@]+}}@noalias_args_argmem 89; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] { 90; IS__TUNIT____-NEXT: entry: 91; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4 92; IS__TUNIT____-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4 93; IS__TUNIT____-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP0]], [[TMP1]] 94; IS__TUNIT____-NEXT: ret i32 [[ADD]] 95; 96; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn 97; IS__CGSCC____-LABEL: define {{[^@]+}}@noalias_args_argmem 98; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0:[0-9]+]] { 99; IS__CGSCC____-NEXT: entry: 100; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4 101; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4 102; IS__CGSCC____-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP0]], [[TMP1]] 103; IS__CGSCC____-NEXT: ret i32 [[ADD]] 104; 105entry: 106 %0 = load i32, i32* %A, align 4 107 %1 = load i32, i32* %B, align 4 108 %add = add nsw i32 %0, %1 109 ret i32 %add 110} 111 112define dso_local i32 @visible_local(i32* %A) #0 { 113; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn 114; IS__TUNIT____-LABEL: define {{[^@]+}}@visible_local 115; IS__TUNIT____-SAME: (i32* nocapture nofree readonly [[A:%.*]]) #[[ATTR1:[0-9]+]] { 116; IS__TUNIT____-NEXT: entry: 117; IS__TUNIT____-NEXT: [[B:%.*]] = alloca i32, align 4 118; IS__TUNIT____-NEXT: store i32 5, i32* [[B]], align 4 119; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32 @noalias_args(i32* nocapture nofree readonly align 4 [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR3]] 120; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree readonly align 4 [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR3]] 121; IS__TUNIT____-NEXT: [[ADD:%.*]] = add nsw i32 [[CALL1]], [[CALL2]] 122; IS__TUNIT____-NEXT: ret i32 [[ADD]] 123; 124; IS__CGSCC_OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn 125; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@visible_local 126; IS__CGSCC_OPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR1:[0-9]+]] { 127; IS__CGSCC_OPM-NEXT: entry: 128; IS__CGSCC_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 129; IS__CGSCC_OPM-NEXT: store i32 5, i32* [[B]], align 4 130; IS__CGSCC_OPM-NEXT: [[CALL1:%.*]] = call i32 @noalias_args(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR4]] 131; IS__CGSCC_OPM-NEXT: [[CALL2:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR4]] 132; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = add nsw i32 [[CALL1]], [[CALL2]] 133; IS__CGSCC_OPM-NEXT: ret i32 [[ADD]] 134; 135; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn 136; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@visible_local 137; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR1:[0-9]+]] { 138; IS__CGSCC_NPM-NEXT: entry: 139; IS__CGSCC_NPM-NEXT: [[B:%.*]] = alloca i32, align 4 140; IS__CGSCC_NPM-NEXT: store i32 5, i32* [[B]], align 4 141; IS__CGSCC_NPM-NEXT: [[CALL1:%.*]] = call i32 @noalias_args(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR5]] 142; IS__CGSCC_NPM-NEXT: [[CALL2:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR5]] 143; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add nsw i32 [[CALL1]], [[CALL2]] 144; IS__CGSCC_NPM-NEXT: ret i32 [[ADD]] 145; 146entry: 147 %B = alloca i32, align 4 148 store i32 5, i32* %B, align 4 149 %call1 = call i32 @noalias_args(i32* %A, i32* nonnull %B) 150 %call2 = call i32 @noalias_args_argmem(i32* %A, i32* nonnull %B) 151 %add = add nsw i32 %call1, %call2 152 ret i32 %add 153} 154 155define internal i32 @noalias_args_argmem_ro(i32* %A, i32* %B) #1 { 156; IS__TUNIT_OPM: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn 157; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@noalias_args_argmem_ro 158; IS__TUNIT_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] { 159; IS__TUNIT_OPM-NEXT: [[T0:%.*]] = load i32, i32* [[A]], align 4 160; IS__TUNIT_OPM-NEXT: [[T1:%.*]] = load i32, i32* [[B]], align 4 161; IS__TUNIT_OPM-NEXT: [[ADD:%.*]] = add nsw i32 [[T0]], [[T1]] 162; IS__TUNIT_OPM-NEXT: ret i32 [[ADD]] 163; 164; IS__TUNIT_NPM: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn 165; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@noalias_args_argmem_ro 166; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR0]] { 167; IS__TUNIT_NPM-NEXT: [[B_PRIV:%.*]] = alloca i32, align 4 168; IS__TUNIT_NPM-NEXT: store i32 [[TMP1]], i32* [[B_PRIV]], align 4 169; IS__TUNIT_NPM-NEXT: [[A_PRIV:%.*]] = alloca i32, align 4 170; IS__TUNIT_NPM-NEXT: store i32 [[TMP0]], i32* [[A_PRIV]], align 4 171; IS__TUNIT_NPM-NEXT: [[T0:%.*]] = load i32, i32* [[A_PRIV]], align 4 172; IS__TUNIT_NPM-NEXT: [[T1:%.*]] = load i32, i32* [[B_PRIV]], align 4 173; IS__TUNIT_NPM-NEXT: [[ADD:%.*]] = add nsw i32 [[T0]], [[T1]] 174; IS__TUNIT_NPM-NEXT: ret i32 [[ADD]] 175; 176; IS__CGSCC_OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn 177; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@noalias_args_argmem_ro 178; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] { 179; IS__CGSCC_OPM-NEXT: [[T0:%.*]] = load i32, i32* [[A]], align 4 180; IS__CGSCC_OPM-NEXT: [[T1:%.*]] = load i32, i32* [[B]], align 4 181; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = add nsw i32 [[T0]], [[T1]] 182; IS__CGSCC_OPM-NEXT: ret i32 [[ADD]] 183; 184; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn 185; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@noalias_args_argmem_ro 186; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR2:[0-9]+]] { 187; IS__CGSCC_NPM-NEXT: [[B_PRIV:%.*]] = alloca i32, align 4 188; IS__CGSCC_NPM-NEXT: [[A_PRIV:%.*]] = alloca i32, align 4 189; IS__CGSCC_NPM-NEXT: [[T0:%.*]] = load i32, i32* [[A_PRIV]], align 4 190; IS__CGSCC_NPM-NEXT: [[T1:%.*]] = load i32, i32* [[B_PRIV]], align 4 191; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add nsw i32 5, 5 192; IS__CGSCC_NPM-NEXT: ret i32 undef 193; 194 %t0 = load i32, i32* %A, align 4 195 %t1 = load i32, i32* %B, align 4 196 %add = add nsw i32 %t0, %t1 197 ret i32 %add 198} 199 200define i32 @visible_local_2() { 201; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn 202; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@visible_local_2 203; IS__TUNIT_OPM-SAME: () #[[ATTR2:[0-9]+]] { 204; IS__TUNIT_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 205; IS__TUNIT_OPM-NEXT: store i32 5, i32* [[B]], align 4 206; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_ro(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR4:[0-9]+]] 207; IS__TUNIT_OPM-NEXT: ret i32 [[CALL]] 208; 209; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn 210; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@visible_local_2 211; IS__TUNIT_NPM-SAME: () #[[ATTR2:[0-9]+]] { 212; IS__TUNIT_NPM-NEXT: [[B:%.*]] = alloca i32, align 4 213; IS__TUNIT_NPM-NEXT: store i32 5, i32* [[B]], align 4 214; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4 215; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[B]], align 4 216; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_ro(i32 [[TMP1]], i32 [[TMP2]]) #[[ATTR4:[0-9]+]] 217; IS__TUNIT_NPM-NEXT: ret i32 [[CALL]] 218; 219; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 220; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@visible_local_2 221; IS__CGSCC_OPM-SAME: () #[[ATTR2:[0-9]+]] { 222; IS__CGSCC_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 223; IS__CGSCC_OPM-NEXT: store i32 5, i32* [[B]], align 4 224; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_ro(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR5:[0-9]+]] 225; IS__CGSCC_OPM-NEXT: ret i32 [[CALL]] 226; 227; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 228; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@visible_local_2 229; IS__CGSCC_NPM-SAME: () #[[ATTR3:[0-9]+]] { 230; IS__CGSCC_NPM-NEXT: ret i32 10 231; 232 %B = alloca i32, align 4 233 store i32 5, i32* %B, align 4 234 %call = call i32 @noalias_args_argmem_ro(i32* %B, i32* %B) 235 ret i32 %call 236} 237 238define internal i32 @noalias_args_argmem_rn(i32* %A, i32* %B) #1 { 239; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn 240; IS__TUNIT____-LABEL: define {{[^@]+}}@noalias_args_argmem_rn 241; IS__TUNIT____-SAME: (i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR1]] { 242; IS__TUNIT____-NEXT: [[T0:%.*]] = load i32, i32* [[B]], align 4 243; IS__TUNIT____-NEXT: store i32 0, i32* [[B]], align 4 244; IS__TUNIT____-NEXT: ret i32 [[T0]] 245; 246; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn 247; IS__CGSCC____-LABEL: define {{[^@]+}}@noalias_args_argmem_rn 248; IS__CGSCC____-SAME: (i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR1:[0-9]+]] { 249; IS__CGSCC____-NEXT: [[T0:%.*]] = load i32, i32* [[B]], align 4 250; IS__CGSCC____-NEXT: store i32 0, i32* [[B]], align 4 251; IS__CGSCC____-NEXT: ret i32 [[T0]] 252; 253 %t0 = load i32, i32* %B, align 4 254 store i32 0, i32* %B 255 ret i32 %t0 256} 257 258define i32 @visible_local_3() { 259; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn 260; IS__TUNIT____-LABEL: define {{[^@]+}}@visible_local_3 261; IS__TUNIT____-SAME: () #[[ATTR2:[0-9]+]] { 262; IS__TUNIT____-NEXT: [[B:%.*]] = alloca i32, align 4 263; IS__TUNIT____-NEXT: store i32 5, i32* [[B]], align 4 264; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_rn(i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B]]) #[[ATTR5:[0-9]+]] 265; IS__TUNIT____-NEXT: ret i32 [[CALL]] 266; 267; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 268; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@visible_local_3 269; IS__CGSCC_OPM-SAME: () #[[ATTR2]] { 270; IS__CGSCC_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 271; IS__CGSCC_OPM-NEXT: store i32 5, i32* [[B]], align 4 272; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_rn(i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B]]) #[[ATTR6:[0-9]+]] 273; IS__CGSCC_OPM-NEXT: ret i32 [[CALL]] 274; 275; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 276; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@visible_local_3 277; IS__CGSCC_NPM-SAME: () #[[ATTR3]] { 278; IS__CGSCC_NPM-NEXT: [[B:%.*]] = alloca i32, align 4 279; IS__CGSCC_NPM-NEXT: store i32 5, i32* [[B]], align 4 280; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_rn(i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B]]) #[[ATTR6:[0-9]+]] 281; IS__CGSCC_NPM-NEXT: ret i32 [[CALL]] 282; 283 %B = alloca i32, align 4 284 store i32 5, i32* %B, align 4 285 %call = call i32 @noalias_args_argmem_rn(i32* %B, i32* %B) 286 ret i32 %call 287} 288 289attributes #0 = { noinline nounwind uwtable willreturn } 290attributes #1 = { argmemonly noinline nounwind uwtable willreturn} 291;. 292; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree noinline nosync nounwind readonly uwtable willreturn } 293; IS__TUNIT____: attributes #[[ATTR1]] = { argmemonly nofree noinline nosync nounwind uwtable willreturn } 294; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind readnone willreturn } 295; IS__TUNIT____: attributes #[[ATTR3]] = { nofree nosync nounwind readonly } 296; IS__TUNIT____: attributes #[[ATTR4:[0-9]+]] = { nofree nosync nounwind readonly willreturn } 297; IS__TUNIT____: attributes #[[ATTR5]] = { nofree nosync nounwind willreturn } 298;. 299; IS__CGSCC_OPM: attributes #[[ATTR0]] = { argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn } 300; IS__CGSCC_OPM: attributes #[[ATTR1]] = { argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn } 301; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn } 302; IS__CGSCC_OPM: attributes #[[ATTR3]] = { nounwind readonly } 303; IS__CGSCC_OPM: attributes #[[ATTR4]] = { nosync nounwind readonly } 304; IS__CGSCC_OPM: attributes #[[ATTR5]] = { nounwind readonly willreturn } 305; IS__CGSCC_OPM: attributes #[[ATTR6]] = { nounwind willreturn } 306;. 307; IS__CGSCC_NPM: attributes #[[ATTR0]] = { argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn } 308; IS__CGSCC_NPM: attributes #[[ATTR1]] = { argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn } 309; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nofree noinline norecurse nosync nounwind readnone uwtable willreturn } 310; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind readnone willreturn } 311; IS__CGSCC_NPM: attributes #[[ATTR4]] = { nounwind readonly } 312; IS__CGSCC_NPM: attributes #[[ATTR5]] = { nosync nounwind readonly } 313; IS__CGSCC_NPM: attributes #[[ATTR6]] = { nounwind willreturn } 314;. 315