[llvm-branch-commits] [clang] [llvm] [SPARC] Prefer RDPC over CALL to implement GETPCX for 64-bit target (PR #77196)
Sergei Barannikov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jan 12 21:20:15 PST 2024
================
@@ -0,0 +1,59 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -relocation-model=pic -mtriple=sparc | FileCheck --check-prefix=SPARC %s
+; RUN: llc < %s -relocation-model=pic -mtriple=sparcv9 | FileCheck --check-prefix=SPARC64 %s
+
+;; SPARC32 and SPARC64 for classic UltraSPARCs implement GETPCX
+;; with a fake `call`.
+;; All other SPARC64 targets implement it with `rd %pc, %o7`.
+;; Need to do the tests in separate files because apparently `tune-cpu`
+;; attribute applies to the entire file at once.
+
+ at value = external global i32
+
+define i32 @testCall() #0 {
----------------
s-barannikov wrote:
```suggestion
define i32 @testCall() nounwind #0 {
```
to eliminate irrelevant cfi directives
https://github.com/llvm/llvm-project/pull/77196
More information about the llvm-branch-commits
mailing list