1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes 2; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=4 -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=4 -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@_ZL6test1g = internal global i32 42, align 4 8 9define void @_Z7test1f1v() nounwind { 10; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn 11; IS__TUNIT____-LABEL: define {{[^@]+}}@_Z7test1f1v 12; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { 13; IS__TUNIT____-NEXT: entry: 14; IS__TUNIT____-NEXT: [[TMP:%.*]] = load i32, i32* @_ZL6test1g, align 4 15; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32 [[TMP]], 0 16; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] 17; IS__TUNIT____: if.then: 18; IS__TUNIT____-NEXT: store i32 0, i32* @_ZL6test1g, align 4 19; IS__TUNIT____-NEXT: br label [[IF_END]] 20; IS__TUNIT____: if.end: 21; IS__TUNIT____-NEXT: ret void 22; 23; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn 24; IS__CGSCC____-LABEL: define {{[^@]+}}@_Z7test1f1v 25; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { 26; IS__CGSCC____-NEXT: entry: 27; IS__CGSCC____-NEXT: [[TMP:%.*]] = load i32, i32* @_ZL6test1g, align 4 28; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 [[TMP]], 0 29; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] 30; IS__CGSCC____: if.then: 31; IS__CGSCC____-NEXT: store i32 0, i32* @_ZL6test1g, align 4 32; IS__CGSCC____-NEXT: br label [[IF_END]] 33; IS__CGSCC____: if.end: 34; IS__CGSCC____-NEXT: ret void 35; 36entry: 37 %tmp = load i32, i32* @_ZL6test1g, align 4 38 %cmp = icmp eq i32 %tmp, 0 39 br i1 %cmp, label %if.then, label %if.end 40 41if.then: ; preds = %entry 42 store i32 0, i32* @_ZL6test1g, align 4 43 br label %if.end 44 45if.end: ; preds = %if.then, %entry 46 ret void 47} 48 49define i32 @_Z7test1f2v() nounwind { 50; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn 51; IS__TUNIT____-LABEL: define {{[^@]+}}@_Z7test1f2v 52; IS__TUNIT____-SAME: () [[ATTR1:#.*]] { 53; IS__TUNIT____-NEXT: entry: 54; IS__TUNIT____-NEXT: [[TMP:%.*]] = load i32, i32* @_ZL6test1g, align 4 55; IS__TUNIT____-NEXT: ret i32 [[TMP]] 56; 57; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn 58; IS__CGSCC____-LABEL: define {{[^@]+}}@_Z7test1f2v 59; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { 60; IS__CGSCC____-NEXT: entry: 61; IS__CGSCC____-NEXT: [[TMP:%.*]] = load i32, i32* @_ZL6test1g, align 4 62; IS__CGSCC____-NEXT: ret i32 [[TMP]] 63; 64entry: 65 %tmp = load i32, i32* @_ZL6test1g, align 4 66 ret i32 %tmp 67} 68