[NFC][Py Reformat] Reformat python files in llvm
[llvm-project.git] / llvm / test / Other / opt-override-frame-pointer.ll
blob804f6f3d910a082b0b049efefb0d2427029b0e30
1 ; RUN: opt < %s -mtriple=x86_64-apple-darwin -frame-pointer=all -S | FileCheck -check-prefixes=ALL,CHECK %s
2 ; RUN: opt < %s -mtriple=x86_64-apple-darwin -frame-pointer=none -S | FileCheck -check-prefixes=NONE,CHECK %s
3 ; RUN: opt < %s -mtriple=x86_64-apple-darwin -frame-pointer=non-leaf -S | FileCheck -check-prefixes=NONLEAF,CHECK %s
5 ; Check behavior of -frame-pointer flag and frame-pointer atttribute.
7 ; CHECK: @no_frame_pointer_attr() [[VARATTR:#[0-9]+]] {
8 define i32 @no_frame_pointer_attr() #0 {
9 entry:
10   ret i32 0
13 ; CHECK: @frame_pointer_attr_all() [[ALL_ATTR:#[0-9]+]] {
14 define i32 @frame_pointer_attr_all() #1 {
15 entry:
16   ret i32 0
19 ; CHECK: @frame_pointer_attr_none() [[NONE_ATTR:#[0-9]+]] {
20 define i32 @frame_pointer_attr_none() #2 {
21 entry:
22   ret i32 0
25 ; CHECK: @frame_pointer_attr_leaf() [[NONLEAF_ATTR:#[0-9]+]] {
26 define i32 @frame_pointer_attr_leaf() #3 {
27 entry:
28   ret i32 0
31 ; ALL-DAG: attributes [[VARATTR]] = { nounwind "frame-pointer"="all" }
32 ; ALL-DAG: attributes [[NONE_ATTR]] = { nounwind "frame-pointer"="none" }
33 ; ALL-DAG: attributes [[NONLEAF_ATTR]] = { nounwind "frame-pointer"="non-leaf" }
34 ; ALL-NOT: attributes
36 ; NONE-DAG: attributes [[VARATTR]] = { nounwind "frame-pointer"="none" }
37 ; NONE-DAG: attributes [[ALL_ATTR]] = { nounwind "frame-pointer"="all" }
38 ; NONE-DAG: attributes [[NONLEAF_ATTR]] = { nounwind "frame-pointer"="non-leaf" }
39 ; NONE-NOT: attributes
41 ; NONLEAF-DAG: attributes [[VARATTR]] = { nounwind "frame-pointer"="non-leaf" }
42 ; NONLEAF-DAG: attributes [[ALL_ATTR]] = { nounwind "frame-pointer"="all" }
43 ; NONLEAF-DAG: attributes [[NONE_ATTR]] = { nounwind "frame-pointer"="none" }
44 ; NONLEAF-NOT: attributes
47 attributes #0 = { nounwind }
48 attributes #1 = { nounwind "frame-pointer"="all" }
49 attributes #2 = { nounwind "frame-pointer"="none" }
50 attributes #3 = { nounwind "frame-pointer"="non-leaf" }