From: Hubert Tong Date: Wed, 1 May 2019 15:36:18 +0000 (+0000) Subject: [tests] Add host-byteorder-*-endian; update XFAILs of big-endian triples X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4a06880a6beb949c1751c7d66673ba98b801613a;p=llvm [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359689 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/MC/AMDGPU/hsa-sgpr-init-bug-v3.s b/test/MC/AMDGPU/hsa-sgpr-init-bug-v3.s index c26a2f87181..644d957d59e 100644 --- a/test/MC/AMDGPU/hsa-sgpr-init-bug-v3.s +++ b/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/test/MC/AMDGPU/hsa-v3.s b/test/MC/AMDGPU/hsa-v3.s index 1eb8f5edd9d..142774b61cd 100644 --- a/test/MC/AMDGPU/hsa-v3.s +++ b/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/test/Transforms/SampleProfile/gcc-simple.ll b/test/Transforms/SampleProfile/gcc-simple.ll index 23e990fcd24..149b316db3e 100644 --- a/test/Transforms/SampleProfile/gcc-simple.ll +++ b/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 diff --git a/test/Transforms/SampleProfile/indirect-call-gcc.ll b/test/Transforms/SampleProfile/indirect-call-gcc.ll index 678c7931250..b1edb6bfe36 100644 --- a/test/Transforms/SampleProfile/indirect-call-gcc.ll +++ b/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/test/lit.cfg.py b/test/lit.cfg.py index fd56b7dc7c1..f92f7912038 100644 --- a/test/lit.cfg.py +++ b/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/test/tools/llvm-cov/copy_block_helper.m b/test/tools/llvm-cov/copy_block_helper.m index b0cf7ffd227..51d0e62b56d 100644 --- a/test/tools/llvm-cov/copy_block_helper.m +++ b/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/test/tools/llvm-cov/gcov47_compatibility.cpp b/test/tools/llvm-cov/gcov47_compatibility.cpp index c4302e787db..6458d3ba7ea 100644 --- a/test/tools/llvm-cov/gcov47_compatibility.cpp +++ b/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/test/tools/llvm-cov/llvm-cov.test b/test/tools/llvm-cov/llvm-cov.test index 1ddbdad15cd..5db15adfca0 100644 --- a/test/tools/llvm-cov/llvm-cov.test +++ b/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/test/tools/llvm-cov/range_based_for.cpp b/test/tools/llvm-cov/range_based_for.cpp index 3331dff55df..173866c711e 100644 --- a/test/tools/llvm-cov/range_based_for.cpp +++ b/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/test/tools/llvm-profdata/gcc-gcov-sample-profile.test b/test/tools/llvm-profdata/gcc-gcov-sample-profile.test index 087c8a7b893..42ae5d23309 100644 --- a/test/tools/llvm-profdata/gcc-gcov-sample-profile.test +++ b/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.