summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Pintilie <stefanp@ca.ibm.com>2019-03-01 21:16:45 +0000
committerStefan Pintilie <stefanp@ca.ibm.com>2019-03-01 21:16:45 +0000
commita908829bf5dca378233c1a4175e25f6acb217d15 (patch)
tree50bc26ddca41944bf8af8119480d78563b58ae32
parent35f55d72f6f8895d64171a42ee0635ef8d76c61d (diff)
downloadbcm5719-llvm-a908829bf5dca378233c1a4175e25f6acb217d15.tar.gz
bcm5719-llvm-a908829bf5dca378233c1a4175e25f6acb217d15.zip
[OPENMP] Deal with additional store inserted by Clang under -fno-PIC for PowerPC.
Changing the default from -fPIC to -fno-PIC on PowerPC exposed an issue in OpenMP for PowerPC. The issue is reported here: https://bugs.llvm.org/show_bug.cgi?id=40082 This is a fix for that issue. Also removed the XFAIL from the two tests that were failing under -fno-PIC. Differential Revision: https://reviews.llvm.org/D56286 llvm-svn: 355229
-rw-r--r--openmp/runtime/test/lit.cfg1
-rw-r--r--openmp/runtime/test/lit.site.cfg.in1
-rwxr-xr-xopenmp/runtime/test/ompt/callback.h9
-rw-r--r--openmp/runtime/test/ompt/misc/control_tool.c1
-rw-r--r--openmp/runtime/test/ompt/synchronization/taskwait.c1
5 files changed, 6 insertions, 7 deletions
diff --git a/openmp/runtime/test/lit.cfg b/openmp/runtime/test/lit.cfg
index 1d050c459d8..6316ae7481b 100644
--- a/openmp/runtime/test/lit.cfg
+++ b/openmp/runtime/test/lit.cfg
@@ -55,6 +55,7 @@ if config.has_libatomic:
libs += " -latomic"
# Allow REQUIRES / UNSUPPORTED / XFAIL to work
+config.target_triple = [ ]
for feature in config.test_compiler_features:
config.available_features.add(feature)
diff --git a/openmp/runtime/test/lit.site.cfg.in b/openmp/runtime/test/lit.site.cfg.in
index fe4a3724526..0964cfceabc 100644
--- a/openmp/runtime/test/lit.site.cfg.in
+++ b/openmp/runtime/test/lit.site.cfg.in
@@ -1,6 +1,5 @@
@AUTO_GEN_COMMENT@
-config.target_triple = "@TARGET_TRIPLE@"
config.test_c_compiler = "@OPENMP_TEST_C_COMPILER@"
config.test_cxx_compiler = "@OPENMP_TEST_CXX_COMPILER@"
config.test_compiler_features = @OPENMP_TEST_COMPILER_FEATURES@
diff --git a/openmp/runtime/test/ompt/callback.h b/openmp/runtime/test/ompt/callback.h
index a7bd7fe7a0b..d49c4c7c014 100755
--- a/openmp/runtime/test/ompt/callback.h
+++ b/openmp/runtime/test/ompt/callback.h
@@ -154,11 +154,12 @@ ompt_label_##id:
ompt_get_thread_data()->value, ((char *)addr) - 1, ((char *)addr) - 4)
#elif KMP_ARCH_PPC64
// On Power the NOP instruction is 4 bytes long. In addition, the compiler
-// inserts an LD instruction which accounts for another 4 bytes. In contrast to
-// X86 this instruction is always there, even for void runtime functions.
+// inserts a second NOP instruction (another 4 bytes). For non-void runtime
+// functions Clang inserts a STW instruction (but only if compiling under
+// -fno-PIC which will be the default with Clang 8.0, another 4 bytes).
#define print_possible_return_addresses(addr) \
- printf("%" PRIu64 ": current_address=%p\n", ompt_get_thread_data()->value, \
- ((char *)addr) - 8)
+ printf("%" PRIu64 ": current_address=%p or %p\n", ompt_get_thread_data()->value, \
+ ((char *)addr) - 8, ((char *)addr) - 12)
#elif KMP_ARCH_AARCH64
// On AArch64 the NOP instruction is 4 bytes long, can be followed by inserted
// store instruction (another 4 bytes long).
diff --git a/openmp/runtime/test/ompt/misc/control_tool.c b/openmp/runtime/test/ompt/misc/control_tool.c
index 79956148916..0c3c1b0e708 100644
--- a/openmp/runtime/test/ompt/misc/control_tool.c
+++ b/openmp/runtime/test/ompt/misc/control_tool.c
@@ -1,7 +1,6 @@
// RUN: %libomp-compile-and-run | FileCheck %s
// REQUIRES: ompt
// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7
-// XFAIL: powerpc64le, ppc64le
#define TEST_NEED_PRINT_FRAME_FROM_OUTLINED_FN
#include "callback.h"
#include <omp.h>
diff --git a/openmp/runtime/test/ompt/synchronization/taskwait.c b/openmp/runtime/test/ompt/synchronization/taskwait.c
index cb30f3b5d51..c4310246b7e 100644
--- a/openmp/runtime/test/ompt/synchronization/taskwait.c
+++ b/openmp/runtime/test/ompt/synchronization/taskwait.c
@@ -1,7 +1,6 @@
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
// REQUIRES: ompt
// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7
-// XFAIL: powerpc64le, ppc64le
#include "callback.h"
#include <omp.h>
OpenPOWER on IntegriCloud