File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
llvm/test/Transforms/FunctionAttrs Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes --version 5
2
+ ; RUN: opt < %s -passes="lto<O2>" -S | FileCheck %s
3
+
4
+ @.str = private unnamed_addr constant [7 x i8 ] c "Hello \00 " , align 1
5
+
6
+ ; Function Attrs: nofree noinline nounwind uwtable vscale_range(1,16)
7
+ define internal void @bob () local_unnamed_addr #0 {
8
+ ; CHECK: Function Attrs: nofree noinline norecurse nounwind uwtable
9
+ ; CHECK-LABEL: define internal fastcc void @bob(
10
+ ; CHECK-SAME: ) unnamed_addr #[[ATTR0:[0-9]+]] {
11
+ ; CHECK-NEXT: [[TMP1:%.*]] = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
12
+ ; CHECK-NEXT: ret void
13
+ ;
14
+ %1 = tail call i32 (ptr , ...) @printf (ptr noundef nonnull dereferenceable (1 ) @.str )
15
+ ret void
16
+ }
17
+
18
+ ; Function Attrs: nofree nounwind
19
+ declare noundef i32 @printf (ptr nocapture noundef readonly , ...) local_unnamed_addr #1
20
+
21
+ ; Function Attrs: nofree norecurse nounwind uwtable vscale_range(1,16)
22
+ define dso_local noundef i32 @main () local_unnamed_addr #2 {
23
+ ; CHECK: Function Attrs: nofree norecurse nounwind uwtable
24
+ ; CHECK-LABEL: define dso_local noundef i32 @main(
25
+ ; CHECK-SAME: ) local_unnamed_addr #[[ATTR2:[0-9]+]] {
26
+ ; CHECK-NEXT: tail call fastcc void @bob()
27
+ ; CHECK-NEXT: ret i32 0
28
+ ;
29
+ tail call void @bob ()
30
+ ret i32 0
31
+ }
32
+
33
+
34
+ attributes #0 = { nofree noinline nounwind uwtable }
35
+ attributes #1 = { nofree nounwind }
36
+ attributes #2 = { nofree norecurse nounwind uwtable }
You can’t perform that action at this time.
0 commit comments