1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
2 ; RUN: opt < %s -attributor -attributor-annotate-decl-cs -attributor-max-iterations=2 -S | FileCheck %s
3 ; RUN: opt < %s -attributor -attributor-annotate-decl-cs -attributor-max-iterations=3 -S | FileCheck %s
4 ; RUN: opt < %s -attributor -attributor-annotate-decl-cs -attributor-max-iterations=4 -S | FileCheck %s
5 ; RUN: opt < %s -attributor -attributor-annotate-decl-cs -attributor-max-iterations=2147483647 -S | FileCheck %s
8 ; CHECK: declare i32 @foo1()
10 ; CHECK: declare i32 @foo2()
12 ; CHECK: declare i32 @foo3()
17 define internal i32 @bar() {
18 ; CHECK-LABEL: define {{[^@]+}}@bar() {
19 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @foo1()
20 ; CHECK-NEXT: [[TMP2:%.*]] = call i32 @foo2()
21 ; CHECK-NEXT: [[TMP3:%.*]] = call i32 @foo3()
22 ; CHECK-NEXT: ret i32 undef
31 ; CHECK-LABEL: define {{[^@]+}}@baz() {
32 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @bar()
33 ; CHECK-NEXT: ret i32 0
39 ; We should never derive anything here
40 ; CHECK-NOT: attributes