[llvm] [AArch64] Restrict .variant_pcs directive to ELF targets (PR #140022)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Thu May 15 01:33:43 PDT 2025
================
@@ -1,6 +1,13 @@
; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve -o - %s | FileCheck %s --check-prefix=CHECK-ASM --strict-whitespace
+; RUN: llc -mtriple=arm64-apple-macosx -mattr=+sve -o - %s | FileCheck %s --check-prefix=CHECK-ASM-NON-ELF-TARGET
; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve -filetype=obj -o - %s \
; RUN: | llvm-readobj --symbols - | FileCheck %s --check-prefix=CHECK-OBJ
+; RUN: llc -mtriple=arm64-apple-macosx -mattr=+sve -filetype=obj -o - %s \
+; RUN: | llvm-readobj --symbols - | FileCheck %s --check-prefix=CHECK-OBJ-NON-ELF-TARGET
+
+; .variant_pcs directive should only be emitted for ELF targets.
+; CHECK-ASM-NON-ELF-TARGET-NOT: .variant_pcs
+; CHECK-OBJ-NON-ELF-TARGET-NOT: Other [ (0x80)
----------------
sdesmalen-arm wrote:
I don't think this check makes sense, because this seems ELF specific. You can just remove the `| FileCheck %s --check-prefix=CHECK-OBJ-NON-ELF-TARGET` part of the RUN line, we just need to make sure it doesn't fail to compile.
https://github.com/llvm/llvm-project/pull/140022
More information about the llvm-commits
mailing list