| ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes --check-globals all --version 5 |
| ; RUN: opt < %s -passes=norecurse-lto-inference -S | FileCheck %s |
| |
| ; This test includes a call to a library function which is not marked as |
| ; NoCallback. Function bob() does not have internal linkage and hence prevents |
| ; norecurse to be added. |
| |
| @.str = private unnamed_addr constant [12 x i8] c"Hello World\00", align 1 |
| |
| ;. |
| ; CHECK: @.str = private unnamed_addr constant [12 x i8] c"Hello World\00", align 1 |
| ;. |
| define dso_local void @bob() { |
| ; CHECK-LABEL: define dso_local void @bob() { |
| ; CHECK-NEXT: [[ENTRY:.*:]] |
| ; CHECK-NEXT: [[CALL:%.*]] = tail call i32 (ptr, ...) @printf(ptr nonnull dereferenceable(1) @.str) |
| ; CHECK-NEXT: ret void |
| ; |
| entry: |
| %call = tail call i32 (ptr, ...) @printf(ptr nonnull dereferenceable(1) @.str) |
| ret void |
| } |
| |
| declare i32 @printf(ptr readonly captures(none), ...) |
| |
| define dso_local i32 @main() norecurse { |
| ; CHECK: Function Attrs: norecurse |
| ; CHECK-LABEL: define dso_local i32 @main( |
| ; CHECK-SAME: ) #[[ATTR0:[0-9]+]] { |
| ; CHECK-NEXT: [[ENTRY:.*:]] |
| ; CHECK-NEXT: tail call void @bob() |
| ; CHECK-NEXT: ret i32 0 |
| ; |
| entry: |
| tail call void @bob() |
| ret i32 0 |
| } |
| ;. |
| ; CHECK: attributes #[[ATTR0]] = { norecurse } |
| ;. |