summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHubert Tong <hubert.reinterpretcast@gmail.com>2019-05-01 15:36:18 +0000
committerHubert Tong <hubert.reinterpretcast@gmail.com>2019-05-01 15:36:18 +0000
commit02d055a269823ebb4b00119db0c4d656cc3f8894 (patch)
tree7f26b39becba3c98156d816645f22eefea5abf06
parent9caa6b5b648535467c6248d3aeaa40fbbe84e0a3 (diff)
downloadbcm5719-llvm-02d055a269823ebb4b00119db0c4d656cc3f8894.tar.gz
bcm5719-llvm-02d055a269823ebb4b00119db0c4d656cc3f8894.zip
[tests] Add host-byteorder-*-endian; update XFAILs of big-endian triples
Summary: Triple components in `XFAIL` lines are tested against the target triple. Various tests that are expected to fail on big-endian hosts are marked as being `XFAIL` for big-endian targets. This patch corrects these tests by having them test against a new `host-byteorder-big-endian` feature. Reviewers: xingxue, sfertile, jasonliu Reviewed By: xingxue Subscribers: jvesely, nhaehnle, fedor.sergeev, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60551 llvm-svn: 359689
-rw-r--r--llvm/test/MC/AMDGPU/hsa-sgpr-init-bug-v3.s2
-rw-r--r--llvm/test/MC/AMDGPU/hsa-v3.s2
-rw-r--r--llvm/test/Transforms/SampleProfile/gcc-simple.ll2
-rw-r--r--llvm/test/Transforms/SampleProfile/indirect-call-gcc.ll2
-rw-r--r--llvm/test/lit.cfg.py2
-rw-r--r--llvm/test/tools/llvm-cov/copy_block_helper.m2
-rw-r--r--llvm/test/tools/llvm-cov/gcov47_compatibility.cpp2
-rw-r--r--llvm/test/tools/llvm-cov/llvm-cov.test2
-rw-r--r--llvm/test/tools/llvm-cov/range_based_for.cpp2
-rw-r--r--llvm/test/tools/llvm-profdata/gcc-gcov-sample-profile.test2
10 files changed, 11 insertions, 9 deletions
diff --git a/llvm/test/MC/AMDGPU/hsa-sgpr-init-bug-v3.s b/llvm/test/MC/AMDGPU/hsa-sgpr-init-bug-v3.s
index c26a2f87181..644d957d59e 100644
--- a/llvm/test/MC/AMDGPU/hsa-sgpr-init-bug-v3.s
+++ b/llvm/test/MC/AMDGPU/hsa-sgpr-init-bug-v3.s
@@ -2,7 +2,7 @@
// RUN: llvm-objdump -s -j .rodata %t | FileCheck --check-prefix=OBJDUMP %s
// big endian not supported
-// XFAIL: powerpc-, powerpc64-, s390x, mips-, mips64-, sparc
+// XFAIL: host-byteorder-big-endian
// Check that SGPR init bug on gfx803 is corrected by the assembler, setting
// GRANULATED_WAVEFRONT_SGPR_COUNT to 11.
diff --git a/llvm/test/MC/AMDGPU/hsa-v3.s b/llvm/test/MC/AMDGPU/hsa-v3.s
index 1eb8f5edd9d..142774b61cd 100644
--- a/llvm/test/MC/AMDGPU/hsa-v3.s
+++ b/llvm/test/MC/AMDGPU/hsa-v3.s
@@ -4,7 +4,7 @@
// RUN: llvm-objdump -s -j .rodata %t | FileCheck --check-prefix=OBJDUMP %s
// big endian not supported
-// XFAIL: powerpc-, powerpc64-, s390x, mips-, mips64-, sparc
+// XFAIL: host-byteorder-big-endian
// READOBJ: Section Headers
// READOBJ: .text PROGBITS {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9]+}} AX {{[0-9]+}} {{[0-9]+}} 256
diff --git a/llvm/test/Transforms/SampleProfile/gcc-simple.ll b/llvm/test/Transforms/SampleProfile/gcc-simple.ll
index 23e990fcd24..149b316db3e 100644
--- a/llvm/test/Transforms/SampleProfile/gcc-simple.ll
+++ b/llvm/test/Transforms/SampleProfile/gcc-simple.ll
@@ -1,6 +1,6 @@
; RUN: opt < %s -sample-profile -sample-profile-file=%S/Inputs/gcc-simple.afdo -S | FileCheck %s
; RUN: opt < %s -passes=sample-profile -sample-profile-file=%S/Inputs/gcc-simple.afdo -S | FileCheck %s
-; XFAIL: powerpc-, powerpc64-, s390x, mips-, mips64-, sparc
+; XFAIL: host-byteorder-big-endian
; Original code:
;
; #include <stdlib.h>
diff --git a/llvm/test/Transforms/SampleProfile/indirect-call-gcc.ll b/llvm/test/Transforms/SampleProfile/indirect-call-gcc.ll
index 678c7931250..b1edb6bfe36 100644
--- a/llvm/test/Transforms/SampleProfile/indirect-call-gcc.ll
+++ b/llvm/test/Transforms/SampleProfile/indirect-call-gcc.ll
@@ -4,7 +4,7 @@
; format profile.
; It is expected to fail on certain architectures as gcc profile reader does
; not work.
-; XFAIL: powerpc64-, s390x, mips-, mips64-, sparc
+; XFAIL: host-byteorder-big-endian
define void @test(void ()*) !dbg !3 {
%2 = alloca void ()*
diff --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py
index fd56b7dc7c1..f92f7912038 100644
--- a/llvm/test/lit.cfg.py
+++ b/llvm/test/lit.cfg.py
@@ -177,6 +177,8 @@ if (config.host_ldflags.find("-m32") < 0
and any(config.llvm_host_triple.startswith(x) for x in known_arches)):
config.available_features.add("llvm-64-bits")
+config.available_features.add("host-byteorder-" + sys.byteorder + "-endian")
+
# Others/can-execute.txt
if sys.platform not in ['win32']:
config.available_features.add('can-execute')
diff --git a/llvm/test/tools/llvm-cov/copy_block_helper.m b/llvm/test/tools/llvm-cov/copy_block_helper.m
index b0cf7ffd227..51d0e62b56d 100644
--- a/llvm/test/tools/llvm-cov/copy_block_helper.m
+++ b/llvm/test/tools/llvm-cov/copy_block_helper.m
@@ -29,4 +29,4 @@ void test(id x) { // GCOV: -: [[@LINE]]:void test
int main(int argc, const char *argv[]) { test(0); }
// llvm-cov doesn't work on big endian yet
-// XFAIL: powerpc-, powerpc64-, s390x, mips-, mips64-, sparc
+// XFAIL: host-byteorder-big-endian
diff --git a/llvm/test/tools/llvm-cov/gcov47_compatibility.cpp b/llvm/test/tools/llvm-cov/gcov47_compatibility.cpp
index c4302e787db..6458d3ba7ea 100644
--- a/llvm/test/tools/llvm-cov/gcov47_compatibility.cpp
+++ b/llvm/test/tools/llvm-cov/gcov47_compatibility.cpp
@@ -27,4 +27,4 @@ int main(int argc, const char *argv[]) { // GCOV: -: [[@LINE]]:int main(
} // GCOV: -: [[@LINE]]:}
// llvm-cov doesn't work on big endian yet
-// XFAIL: powerpc-, powerpc64-, s390x, mips-, mips64-, sparc
+// XFAIL: host-byteorder-big-endian
diff --git a/llvm/test/tools/llvm-cov/llvm-cov.test b/llvm/test/tools/llvm-cov/llvm-cov.test
index 1ddbdad15cd..5db15adfca0 100644
--- a/llvm/test/tools/llvm-cov/llvm-cov.test
+++ b/llvm/test/tools/llvm-cov/llvm-cov.test
@@ -120,4 +120,4 @@ RUN: llvm-cov gcov test.c -gcda=test_func_checksum_fail.gcda
RUN: llvm-cov gcov test_exit_block_arcs.c 2>&1 | FileCheck %s -check-prefix=EXIT_BLOCK_ARCS
EXIT_BLOCK_ARCS: (main) has arcs from exit block.
-XFAIL: powerpc-, powerpc64-, s390x, mips-, mips64-, sparc
+XFAIL: host-byteorder-big-endian
diff --git a/llvm/test/tools/llvm-cov/range_based_for.cpp b/llvm/test/tools/llvm-cov/range_based_for.cpp
index 3331dff55df..173866c711e 100644
--- a/llvm/test/tools/llvm-cov/range_based_for.cpp
+++ b/llvm/test/tools/llvm-cov/range_based_for.cpp
@@ -26,4 +26,4 @@ int main(int argc, const char *argv[]) { // GCOV: 1: [[@LINE]]:int main(
} // GCOV: -: [[@LINE]]:}
// llvm-cov doesn't work on big endian yet
-// XFAIL: powerpc-, powerpc64-, s390x, mips-, mips64-, sparc
+// XFAIL: host-byteorder-big-endian
diff --git a/llvm/test/tools/llvm-profdata/gcc-gcov-sample-profile.test b/llvm/test/tools/llvm-profdata/gcc-gcov-sample-profile.test
index 087c8a7b893..42ae5d23309 100644
--- a/llvm/test/tools/llvm-profdata/gcc-gcov-sample-profile.test
+++ b/llvm/test/tools/llvm-profdata/gcc-gcov-sample-profile.test
@@ -1,7 +1,7 @@
The input gcov file has been generated on a little endian machine. Expect
failures on big endian systems.
-XFAIL: powerpc-, powerpc64-, s390x, mips-, mips64-, sparc
+XFAIL: host-byteorder-big-endian
Tests for sample profiles encoded in GCC's gcov format.
OpenPOWER on IntegriCloud