1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes 2; RUN: opt -attributor -attributor-manifest-internal -attributor-disable=false -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-disable=false -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 -attributor-manifest-internal -attributor-disable=false -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-disable=false -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; See PR26774 8 9define i32 @baz() { 10; CHECK-LABEL: define {{[^@]+}}@baz() 11; CHECK-NEXT: ret i32 10 12; 13 ret i32 10 14} 15 16; We can const-prop @baz's return value *into* @foo, but cannot 17; constprop @foo's return value into bar. 18 19define linkonce_odr i32 @foo() { 20; CHECK-LABEL: define {{[^@]+}}@foo() 21; CHECK-NEXT: ret i32 10 22; 23 24 %val = call i32 @baz() 25 ret i32 %val 26} 27 28define i32 @bar() { 29; CHECK-LABEL: define {{[^@]+}}@bar() 30; CHECK-NEXT: [[VAL:%.*]] = call i32 @foo() 31; CHECK-NEXT: ret i32 [[VAL]] 32; 33 34 %val = call i32 @foo() 35 ret i32 %val 36} 37