[llvm] [ARM] support -mlong-calls -fPIC on arm32 #39970 (PR #147313)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 13 16:35:07 PDT 2025
================
@@ -4,6 +4,9 @@
; RUN: llc -mtriple=thumb-- -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 | FileCheck -check-prefix=NO-OPTION %s
; RUN: llc -mtriple=thumb-- -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 -mattr=+long-calls | FileCheck -check-prefix=LONGCALL %s
; RUN: llc -mtriple=thumb-- -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 -mattr=-long-calls | FileCheck -check-prefix=NO-LONGCALL %s
+; RUN: llc -mtriple=arm-linux-gnueabi -mcpu=cortex-a8 -relocation-model=pic %s -o - -O0 -mattr=+long-calls | FileCheck -check-prefix=PIC-O0-LONGCALL %s
+; RUN: llc -mtriple=arm-linux-gnueabi -mcpu=cortex-a8 -relocation-model=pic %s -o - -O1 -mattr=+long-calls | FileCheck -check-prefix=PIC-LONGCALL %s
+; RUN: llc -mtriple=arm-linux-gnueabi -mcpu=cortex-a8 -relocation-model=pic %s -o - -O2 -mattr=+long-calls | FileCheck -check-prefix=PIC-LONGCALL %s
----------------
efriedma-quic wrote:
You don't need both -O1 and -O2; -O0 is special in this context because it triggers globalisel/fastisel.
Please add RUN lines for execute-only, so we can see they work.
Please regenerate the CHECK lines with update_llc_test_checks.py, so it's easier to read/update.
https://github.com/llvm/llvm-project/pull/147313
More information about the llvm-commits
mailing list