brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · f723c33 Raw
34 lines · plain
1;; Test that function attributes "no-frame-pointer-elim" ("true" or "false") and2;; "no-frame-pointer-elim-non-leaf" (value is ignored) can be upgraded to3;; "frame-pointer".4 5; RUN: llvm-as %s -o - | llvm-dis - | FileCheck %s6 7; CHECK: define void @all0() #08define void @all0() "no-frame-pointer-elim"="true" { ret void }9; CHECK: define void @all1() #110define void @all1() #0 { ret void }11 12; CHECK: define void @non_leaf0() #213define void @non_leaf0() "no-frame-pointer-elim-non-leaf" { ret void }14; CHECK: define void @non_leaf1() #315define void @non_leaf1() #1 { ret void }16 17; CHECK: define void @none() #418define void @none() "no-frame-pointer-elim"="false" { ret void }19 20;; Don't add "frame-pointer" if neither "no-frame-pointer-elim" nor21;; "no-frame-pointer-elim-non-leaf" is present.22; CHECK: define void @no_attr() {23define void @no_attr() { ret void }24 25attributes #0 = { readnone "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" }26attributes #1 = { readnone "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf" }27 28;; Other attributes (e.g. readnone) are unaffected.29; CHECK: attributes #0 = { "frame-pointer"="all" }30; CHECK: attributes #1 = { memory(none) "frame-pointer"="all" }31; CHECK: attributes #2 = { "frame-pointer"="non-leaf" }32; CHECK: attributes #3 = { memory(none) "frame-pointer"="non-leaf" }33; CHECK: attributes #4 = { "frame-pointer"="none" }34