brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · bcdf75b Raw
41 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes --check-globals all --version 52; RUN: opt < %s -passes=norecurse-lto-inference -S | FileCheck %s3 4; This test includes a call to a library function which is not marked as5; NoCallback. Function bob() does not have internal linkage and hence prevents6; norecurse to be added.7 8@.str = private unnamed_addr constant [12 x i8] c"Hello World\00", align 19 10;.11; CHECK: @.str = private unnamed_addr constant [12 x i8] c"Hello World\00", align 112;.13define dso_local void @bob() {14; CHECK-LABEL: define dso_local void @bob() {15; CHECK-NEXT:  [[ENTRY:.*:]]16; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 (ptr, ...) @printf(ptr nonnull dereferenceable(1) @.str)17; CHECK-NEXT:    ret void18;19entry:20  %call = tail call i32 (ptr, ...) @printf(ptr  nonnull dereferenceable(1) @.str)21  ret void22}23 24declare  i32 @printf(ptr  readonly captures(none), ...)25 26define dso_local  i32 @main() norecurse {27; CHECK: Function Attrs: norecurse28; CHECK-LABEL: define dso_local i32 @main(29; CHECK-SAME: ) #[[ATTR0:[0-9]+]] {30; CHECK-NEXT:  [[ENTRY:.*:]]31; CHECK-NEXT:    tail call void @bob()32; CHECK-NEXT:    ret i32 033;34entry:35  tail call void @bob()36  ret i32 037}38;.39; CHECK: attributes #[[ATTR0]] = { norecurse }40;.41