[Openmp-commits] [openmp] dcd7c8b - [OpenMP][AArch64] Workaround for ompt/synchronization tests (#75848)
via Openmp-commits
openmp-commits at lists.llvm.org
Tue Dec 19 10:26:27 PST 2023
Author: Carlos Eduardo Seo
Date: 2023-12-19T19:26:23+01:00
New Revision: dcd7c8b7c98fafa7c77e0d9f0d1efc5747afee30
URL: https://github.com/llvm/llvm-project/commit/dcd7c8b7c98fafa7c77e0d9f0d1efc5747afee30
DIFF: https://github.com/llvm/llvm-project/commit/dcd7c8b7c98fafa7c77e0d9f0d1efc5747afee30.diff
LOG: [OpenMP][AArch64] Workaround for ompt/synchronization tests (#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
Added:
Modified:
openmp/runtime/test/ompt/callback.h
Removed:
################################################################################
diff --git a/openmp/runtime/test/ompt/callback.h b/openmp/runtime/test/ompt/callback.h
index 62eff09e28423e..05b2006a280db5 100644
--- a/openmp/runtime/test/ompt/callback.h
+++ b/openmp/runtime/test/ompt/callback.h
@@ -189,17 +189,14 @@ 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 other OSes. However, the proper
+// fix for this is to remove the extra branch instruction being generated by
+// the AArch64 backend. See issue #69627.
#define print_possible_return_addresses(addr) \
printf("%" PRIu64 ": current_address=%p or %p or %p\n", \
ompt_get_thread_data()->value, ((char *)addr) - 4, \
((char *)addr) - 8, ((char *)addr) - 12)
-#else
-#define print_possible_return_addresses(addr) \
- printf("%" PRIu64 ": current_address=%p or %p\n", \
- ompt_get_thread_data()->value, ((char *)addr) - 4, \
- ((char *)addr) - 8)
-#endif
#elif KMP_ARCH_RISCV64
#if __riscv_compressed
// On RV64GC the C.NOP instruction is 2 byte long. In addition, the compiler
More information about the Openmp-commits
mailing list