public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/llvm] rawhide: Fix some OpenMP tests on RISC-V
@ 2026-09-23 18:04 Tulio Magno Quites Machado Filho
  0 siblings, 0 replies; only message in thread
From: Tulio Magno Quites Machado Filho @ 2026-09-23 18:04 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/llvm
            Branch : rawhide
            Commit : 607a05c6d67b4d04ec67b17a1be33ce2fdd94a85
            Author : Tulio Magno Quites Machado Filho <tuliom@redhat.com>
            Date   : 2026-09-23T15:03:22-03:00
            Stats  : +65/-0 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/llvm/c/607a05c6d67b4d04ec67b17a1be33ce2fdd94a85?branch=rawhide

            Log:
            Fix some OpenMP tests on RISC-V

Backport a patch from https://github.com/llvm/llvm-project/pull/223681 that
fixes an issue with some tests on how the current address is printed.

---
diff --git a/0001-FIX-some-OMPT-tests-that-fail-on-RISC-V-156914.patch b/0001-FIX-some-OMPT-tests-that-fail-on-RISC-V-156914.patch
new file mode 100644
index 0000000..77cee04
--- /dev/null
+++ b/0001-FIX-some-OMPT-tests-that-fail-on-RISC-V-156914.patch
@@ -0,0 +1,31 @@
+From 4e19543b1a85e635a8c663081bfdf42488795623 Mon Sep 17 00:00:00 2001
+From: julianmorillo <julianmorillo@users.noreply.github.com>
+Date: Fri, 24 Jul 2026 11:24:36 +0200
+Subject: [PATCH] FIX some OMPT tests that fail on RISC-V (#156914)
+
+There is a known issue with these tests (see
+https://github.com/llvm/llvm-project/issues/35661).
+It looks that the behaviour is very architecture specific and it was
+somehow solved for aarch64 but no mention to riscv64.
+---
+ openmp/runtime/test/ompt/callback.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/openmp/runtime/test/ompt/callback.h b/openmp/runtime/test/ompt/callback.h
+index c0305c0daf60..689e5455ea60 100644
+--- a/openmp/runtime/test/ompt/callback.h
++++ b/openmp/runtime/test/ompt/callback.h
+@@ -296,8 +296,8 @@ static void print_ids(int level) {
+ // another branch).
+ #define print_possible_return_addresses(addr)                                  \
+   printf("%" PRIu64 ": current_address=%p or %p\n",                            \
+-         ompt_get_thread_data()->value, ((char *)addr) - 6,                    \
+-         ((char *)addr) - 10)
++         ompt_get_thread_data()->value, ((char *)addr) - 4,                    \
++         ((char *)addr) - 6, ((char *)addr) - 10)
+ #else
+ // On RV64G the NOP instruction is 4 byte long. In addition, the compiler
+ // inserts a J instruction (targeting the successor basic block), which
+-- 
+2.54.0
+

diff --git a/223681.patch b/223681.patch
new file mode 100644
index 0000000..3bbd4f6
--- /dev/null
+++ b/223681.patch
@@ -0,0 +1,27 @@
+From 940f3acbcda4ede472095a2330d1d5febbb6c119 Mon Sep 17 00:00:00 2001
+From: Tulio Magno Quites Machado Filho <tuliom@redhat.com>
+Date: Tue, 15 Sep 2026 09:37:49 -0300
+Subject: [PATCH] [OpenMP][OMPT] Fixes current_address printing on RV64GC
+
+A previous commit increased the number of arguments passed to printf
+in print_possible_return_addresses(addr) but forgot to change the format
+in order to include the new argument.
+
+Fixes: 4e19543b1a85 (FIX some OMPT tests that fail on RISC-V (#156914), 2026-07-24)
+---
+ openmp/runtime/test/ompt/callback.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/openmp/runtime/test/ompt/callback.h b/openmp/runtime/test/ompt/callback.h
+index 689e5455ea604..ab6c56291da23 100644
+--- a/openmp/runtime/test/ompt/callback.h
++++ b/openmp/runtime/test/ompt/callback.h
+@@ -295,7 +295,7 @@ static void print_ids(int level) {
+ // appear (adding 4 more bytes) when the C.NOP is referenced elsewhere (ie.
+ // another branch).
+ #define print_possible_return_addresses(addr)                                  \
+-  printf("%" PRIu64 ": current_address=%p or %p\n",                            \
++  printf("%" PRIu64 ": current_address=%p or %p or %p\n",                      \
+          ompt_get_thread_data()->value, ((char *)addr) - 4,                    \
+          ((char *)addr) - 6, ((char *)addr) - 10)
+ #else

diff --git a/llvm.spec b/llvm.spec
index 8f51840..1428221 100644
--- a/llvm.spec
+++ b/llvm.spec
@@ -631,6 +631,13 @@ Patch2106: 0001-SystemZ-Fix-code-in-widening-vector-multiplication-1.patch
 Patch2203: 0001-mlir-Disable-some-tests-when-the-execution-engine-is.patch
 Patch2301: 0001-mlir-Disable-some-tests-when-the-execution-engine-is.patch
 
+# Fix some OpenMP tests on RISC-V.
+# https://github.com/llvm/llvm-project/pull/223681
+Patch2204: 0001-FIX-some-OMPT-tests-that-fail-on-RISC-V-156914.patch
+Patch2304: 0001-FIX-some-OMPT-tests-that-fail-on-RISC-V-156914.patch
+Patch2205: 223681.patch
+Patch2305: 223681.patch
+
 # Fix an illegal zext from combined loads (rhbz#2512927)
 # https://github.com/llvm/llvm-project/pull/207229
 Patch2207: 0001-AggressiveInstCombine-Fix-crash-when-folding-consecu.patch

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-23 18:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-23 18:04 [rpms/llvm] rawhide: Fix some OpenMP tests on RISC-V Tulio Magno Quites Machado Filho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox