Skip to content

Commit a908829

Browse files
committedMar 1, 2019
[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
1 parent 35f55d7 commit a908829

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed
 

‎openmp/runtime/test/lit.cfg

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ if config.has_libatomic:
5555
libs += " -latomic"
5656

5757
# Allow REQUIRES / UNSUPPORTED / XFAIL to work
58+
config.target_triple = [ ]
5859
for feature in config.test_compiler_features:
5960
config.available_features.add(feature)
6061

‎openmp/runtime/test/lit.site.cfg.in

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@AUTO_GEN_COMMENT@
22

3-
config.target_triple = "@TARGET_TRIPLE@"
43
config.test_c_compiler = "@OPENMP_TEST_C_COMPILER@"
54
config.test_cxx_compiler = "@OPENMP_TEST_CXX_COMPILER@"
65
config.test_compiler_features = @OPENMP_TEST_COMPILER_FEATURES@

‎openmp/runtime/test/ompt/callback.h

+5-4
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,12 @@ ompt_label_##id:
154154
ompt_get_thread_data()->value, ((char *)addr) - 1, ((char *)addr) - 4)
155155
#elif KMP_ARCH_PPC64
156156
// On Power the NOP instruction is 4 bytes long. In addition, the compiler
157-
// inserts an LD instruction which accounts for another 4 bytes. In contrast to
158-
// X86 this instruction is always there, even for void runtime functions.
157+
// inserts a second NOP instruction (another 4 bytes). For non-void runtime
158+
// functions Clang inserts a STW instruction (but only if compiling under
159+
// -fno-PIC which will be the default with Clang 8.0, another 4 bytes).
159160
#define print_possible_return_addresses(addr) \
160-
printf("%" PRIu64 ": current_address=%p\n", ompt_get_thread_data()->value, \
161-
((char *)addr) - 8)
161+
printf("%" PRIu64 ": current_address=%p or %p\n", ompt_get_thread_data()->value, \
162+
((char *)addr) - 8, ((char *)addr) - 12)
162163
#elif KMP_ARCH_AARCH64
163164
// On AArch64 the NOP instruction is 4 bytes long, can be followed by inserted
164165
// store instruction (another 4 bytes long).

‎openmp/runtime/test/ompt/misc/control_tool.c

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// RUN: %libomp-compile-and-run | FileCheck %s
22
// REQUIRES: ompt
33
// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7
4-
// XFAIL: powerpc64le, ppc64le
54
#define TEST_NEED_PRINT_FRAME_FROM_OUTLINED_FN
65
#include "callback.h"
76
#include <omp.h>

‎openmp/runtime/test/ompt/synchronization/taskwait.c

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
22
// REQUIRES: ompt
33
// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7
4-
// XFAIL: powerpc64le, ppc64le
54
#include "callback.h"
65
#include <omp.h>
76

0 commit comments

Comments
 (0)
Please sign in to comment.