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=1 -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=1 -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 internal i32 @testf(i1 %c) { 8; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 9; IS__CGSCC____-LABEL: define {{[^@]+}}@testf 10; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0:#.*]] { 11; IS__CGSCC____-NEXT: entry: 12; IS__CGSCC____-NEXT: br i1 [[C]], label [[IF_COND:%.*]], label [[IF_END:%.*]] 13; IS__CGSCC____: if.cond: 14; IS__CGSCC____-NEXT: unreachable 15; IS__CGSCC____: if.then: 16; IS__CGSCC____-NEXT: unreachable 17; IS__CGSCC____: if.end: 18; IS__CGSCC____-NEXT: ret i32 undef 19; 20entry: 21 br i1 %c, label %if.cond, label %if.end 22 23if.cond: 24 br i1 undef, label %if.then, label %if.end 25 26if.then: ; preds = %entry, %if.then 27 ret i32 11 28 29if.end: ; preds = %if.then1, %entry 30 ret i32 10 31} 32 33define internal i32 @test1(i1 %c) { 34; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 35; IS__CGSCC____-LABEL: define {{[^@]+}}@test1 36; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { 37; IS__CGSCC____-NEXT: entry: 38; IS__CGSCC____-NEXT: br label [[IF_THEN:%.*]] 39; IS__CGSCC____: if.then: 40; IS__CGSCC____-NEXT: br label [[RET1:%.*]] 41; IS__CGSCC____: ret1: 42; IS__CGSCC____-NEXT: ret i32 undef 43; IS__CGSCC____: ret2: 44; IS__CGSCC____-NEXT: unreachable 45; 46entry: 47 br label %if.then 48 49if.then: ; preds = %entry, %if.then 50 %call = call i32 @testf(i1 %c) 51 %res = icmp eq i32 %call, 10 52 br i1 %res, label %ret1, label %ret2 53 54ret1: ; preds = %if.then, %entry 55 ret i32 99 56 57ret2: ; preds = %if.then, %entry 58 ret i32 0 59} 60 61define i32 @main(i1 %c) { 62; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn 63; IS__TUNIT____-LABEL: define {{[^@]+}}@main 64; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0:#.*]] { 65; IS__TUNIT____-NEXT: ret i32 99 66; 67; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn 68; IS__CGSCC____-LABEL: define {{[^@]+}}@main 69; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { 70; IS__CGSCC____-NEXT: ret i32 99 71; 72 %res = call i32 @test1(i1 %c) 73 ret i32 %res 74} 75