[Openmp-commits] [openmp] [OpenMP][AArch64] Workaround for ompt/synchronization tests (PR #75848)

Carlos Eduardo Seo via Openmp-commits openmp-commits at lists.llvm.org
Mon Dec 18 12:04:31 PST 2023


https://github.com/ceseo created https://github.com/llvm/llvm-project/pull/75848

ompt/synchronization/[masked.c | master.c] tests fail due to a wrong offset being calculated for the possible return addreses. PR #65936 fixes this for Darwin and the same has to be done for Linux.

Updates #69627

>From bb1b49b5f252b52983d1daac796e2b187701232d Mon Sep 17 00:00:00 2001
From: Carlos Eduardo Seo <carlos.seo at linaro.org>
Date: Mon, 18 Dec 2023 18:52:34 +0000
Subject: [PATCH] [OpenMP][AArch64] Workaround for ompt/synchronization tests

ompt/synchronization/[masked.c | master.c] tests fail due to a wrong offset
being calculated for the possible return addreses. PR #65936 fixes this for
Darwin and the same has to be done for Linux.

Updates #69627
---
 openmp/runtime/test/ompt/callback.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/openmp/runtime/test/ompt/callback.h b/openmp/runtime/test/ompt/callback.h
index 62eff09e28423e..0b3d3aa9cc47ca 100644
--- a/openmp/runtime/test/ompt/callback.h
+++ b/openmp/runtime/test/ompt/callback.h
@@ -189,7 +189,11 @@ ompt_label_##id:
 #elif KMP_ARCH_AARCH64
 // On AArch64 the NOP instruction is 4 bytes long, can be followed by inserted
 // store instruction (another 4 bytes long).
-#if KMP_OS_DARWIN
+// FIXME: PR #65696 addded a third possibility (12 byte offset) to make the
+// tests pass on Darwin. Adding the same for Linux. However, the proper fix for
+// this is to fix the extra branch instruction being generated by the AArch64
+// backend. See issue #69627.
+#if KMP_OS_DARWIN || KMP_OS_LINUX
 #define print_possible_return_addresses(addr)                                  \
   printf("%" PRIu64 ": current_address=%p or %p or %p\n",                      \
          ompt_get_thread_data()->value, ((char *)addr) - 4,                    \



More information about the Openmp-commits mailing list