[PATCH] D147747: Add test to verify behavior of .cfi_sections .debug_frame intrinsic

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 19 15:12:45 PDT 2023


aprantl added inline comments.


================
Comment at: llvm/test/DebugInfo/AArch64/test-fexceptions-debug-frame.ll:1
+; RUN: llc --filetype=asm %s -o - | FileCheck %s
+; CHECK-NOT: .cfi_sections .debug_frame
----------------
Can you add a comment explaining what is being tested here?


================
Comment at: llvm/test/DebugInfo/AArch64/test-fexceptions-debug-frame.ll:2
+; RUN: llc --filetype=asm %s -o - | FileCheck %s
+; CHECK-NOT: .cfi_sections .debug_frame
+
----------------
Can you also add one positive CHECK as a sanity check? Otherwise this test passes even if the llc binary outputs nothing.


================
Comment at: llvm/test/DebugInfo/AArch64/test-fexceptions-debug-frame.ll:16
+
+attributes #0 = { noinline norecurse nounwind optnone ssp uwtable(sync) "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-builtin-calloc" "no-builtin-stpcpy" "no-trapping-math"="true" "probe-stack"="__chkstk_darwin" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+amx,+amx2,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+sha3,+sm4,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8.5a,+v8a,+zcm,+zcz" }
+
----------------
it's considered good practice to strip all the "string" attributes that arent' strictly needed from tests, so they are easier to maintain when these attributes change in the future.


================
Comment at: llvm/test/DebugInfo/AArch64/test-fno-exceptions-debug-frame.ll:16
+
+attributes #0 = { noinline norecurse nounwind optnone ssp "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-builtin-calloc" "no-builtin-stpcpy" "no-trapping-math"="true" "probe-stack"="__chkstk_darwin" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+amx,+amx2,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+sha3,+sm4,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8.5a,+v8a,+zcm,+zcz" }
+
----------------
strip if possible


================
Comment at: llvm/test/DebugInfo/X86/test-fexceptions-debug-frame.ll:16
+
+attributes #0 = { noinline norecurse nounwind optnone ssp uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-builtin-calloc" "no-builtin-stpcpy" "no-trapping-math"="true" "probe-stack"="__chkstk_darwin" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "tune-cpu"="generic" }
+
----------------
ditto


================
Comment at: llvm/test/DebugInfo/X86/test-fno-exceptions-debug-frame.ll:2
+; RUN: llc --filetype=asm %s -o - | FileCheck %s
+; CHECK-NOT: .cfi_sections .debug_frame
+
----------------
ditto


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147747/new/

https://reviews.llvm.org/D147747



More information about the llvm-commits mailing list