brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 804f6f3 Raw
51 lines · plain
1; RUN: opt < %s -mtriple=x86_64-apple-darwin -frame-pointer=all -S | FileCheck -check-prefixes=ALL,CHECK %s2; RUN: opt < %s -mtriple=x86_64-apple-darwin -frame-pointer=none -S | FileCheck -check-prefixes=NONE,CHECK %s3; RUN: opt < %s -mtriple=x86_64-apple-darwin -frame-pointer=non-leaf -S | FileCheck -check-prefixes=NONLEAF,CHECK %s4 5; Check behavior of -frame-pointer flag and frame-pointer atttribute.6 7; CHECK: @no_frame_pointer_attr() [[VARATTR:#[0-9]+]] {8define i32 @no_frame_pointer_attr() #0 {9entry:10  ret i32 011}12 13; CHECK: @frame_pointer_attr_all() [[ALL_ATTR:#[0-9]+]] {14define i32 @frame_pointer_attr_all() #1 {15entry:16  ret i32 017}18 19; CHECK: @frame_pointer_attr_none() [[NONE_ATTR:#[0-9]+]] {20define i32 @frame_pointer_attr_none() #2 {21entry:22  ret i32 023}24 25; CHECK: @frame_pointer_attr_leaf() [[NONLEAF_ATTR:#[0-9]+]] {26define i32 @frame_pointer_attr_leaf() #3 {27entry:28  ret i32 029}30 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: attributes35 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: attributes40 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: attributes45 46 47attributes #0 = { nounwind }48attributes #1 = { nounwind "frame-pointer"="all" }49attributes #2 = { nounwind "frame-pointer"="none" }50attributes #3 = { nounwind "frame-pointer"="non-leaf" }51