[llvm] r359689 - [tests] Add host-byteorder-*-endian; update XFAILs of big-endian triples

Hubert Tong via llvm-commits llvm-commits at lists.llvm.org
Wed May 1 08:36:18 PDT 2019


Author: hubert.reinterpretcast
Date: Wed May  1 08:36:18 2019
New Revision: 359689

URL: http://llvm.org/viewvc/llvm-project?rev=359689&view=rev
Log:
[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

Modified:
    llvm/trunk/test/MC/AMDGPU/hsa-sgpr-init-bug-v3.s
    llvm/trunk/test/MC/AMDGPU/hsa-v3.s
    llvm/trunk/test/Transforms/SampleProfile/gcc-simple.ll
    llvm/trunk/test/Transforms/SampleProfile/indirect-call-gcc.ll
    llvm/trunk/test/lit.cfg.py
    llvm/trunk/test/tools/llvm-cov/copy_block_helper.m
    llvm/trunk/test/tools/llvm-cov/gcov47_compatibility.cpp
    llvm/trunk/test/tools/llvm-cov/llvm-cov.test
    llvm/trunk/test/tools/llvm-cov/range_based_for.cpp
    llvm/trunk/test/tools/llvm-profdata/gcc-gcov-sample-profile.test

Modified: llvm/trunk/test/MC/AMDGPU/hsa-sgpr-init-bug-v3.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AMDGPU/hsa-sgpr-init-bug-v3.s?rev=359689&r1=359688&r2=359689&view=diff
==============================================================================
--- llvm/trunk/test/MC/AMDGPU/hsa-sgpr-init-bug-v3.s (original)
+++ llvm/trunk/test/MC/AMDGPU/hsa-sgpr-init-bug-v3.s Wed May  1 08:36:18 2019
@@ -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.

Modified: llvm/trunk/test/MC/AMDGPU/hsa-v3.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AMDGPU/hsa-v3.s?rev=359689&r1=359688&r2=359689&view=diff
==============================================================================
--- llvm/trunk/test/MC/AMDGPU/hsa-v3.s (original)
+++ llvm/trunk/test/MC/AMDGPU/hsa-v3.s Wed May  1 08:36:18 2019
@@ -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

Modified: llvm/trunk/test/Transforms/SampleProfile/gcc-simple.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SampleProfile/gcc-simple.ll?rev=359689&r1=359688&r2=359689&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SampleProfile/gcc-simple.ll (original)
+++ llvm/trunk/test/Transforms/SampleProfile/gcc-simple.ll Wed May  1 08:36:18 2019
@@ -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>

Modified: llvm/trunk/test/Transforms/SampleProfile/indirect-call-gcc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SampleProfile/indirect-call-gcc.ll?rev=359689&r1=359688&r2=359689&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SampleProfile/indirect-call-gcc.ll (original)
+++ llvm/trunk/test/Transforms/SampleProfile/indirect-call-gcc.ll Wed May  1 08:36:18 2019
@@ -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 ()*

Modified: llvm/trunk/test/lit.cfg.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg.py?rev=359689&r1=359688&r2=359689&view=diff
==============================================================================
--- llvm/trunk/test/lit.cfg.py (original)
+++ llvm/trunk/test/lit.cfg.py Wed May  1 08:36:18 2019
@@ -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')

Modified: llvm/trunk/test/tools/llvm-cov/copy_block_helper.m
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/copy_block_helper.m?rev=359689&r1=359688&r2=359689&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-cov/copy_block_helper.m (original)
+++ llvm/trunk/test/tools/llvm-cov/copy_block_helper.m Wed May  1 08:36:18 2019
@@ -29,4 +29,4 @@ void test(id x) { // GCOV: -:    [[@LINE
 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

Modified: llvm/trunk/test/tools/llvm-cov/gcov47_compatibility.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/gcov47_compatibility.cpp?rev=359689&r1=359688&r2=359689&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-cov/gcov47_compatibility.cpp (original)
+++ llvm/trunk/test/tools/llvm-cov/gcov47_compatibility.cpp Wed May  1 08:36:18 2019
@@ -27,4 +27,4 @@ int main(int argc, const char *argv[]) {
 }                                        // GCOV: -:    [[@LINE]]:}
 
 // llvm-cov doesn't work on big endian yet
-// XFAIL: powerpc-, powerpc64-, s390x, mips-, mips64-, sparc
+// XFAIL: host-byteorder-big-endian

Modified: llvm/trunk/test/tools/llvm-cov/llvm-cov.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/llvm-cov.test?rev=359689&r1=359688&r2=359689&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-cov/llvm-cov.test (original)
+++ llvm/trunk/test/tools/llvm-cov/llvm-cov.test Wed May  1 08:36:18 2019
@@ -120,4 +120,4 @@ RUN: llvm-cov gcov test.c -gcda=test_fun
 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

Modified: llvm/trunk/test/tools/llvm-cov/range_based_for.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/range_based_for.cpp?rev=359689&r1=359688&r2=359689&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-cov/range_based_for.cpp (original)
+++ llvm/trunk/test/tools/llvm-cov/range_based_for.cpp Wed May  1 08:36:18 2019
@@ -26,4 +26,4 @@ int main(int argc, const char *argv[]) {
 }                                        // GCOV: -:    [[@LINE]]:}
 
 // llvm-cov doesn't work on big endian yet
-// XFAIL: powerpc-, powerpc64-, s390x, mips-, mips64-, sparc
+// XFAIL: host-byteorder-big-endian

Modified: llvm/trunk/test/tools/llvm-profdata/gcc-gcov-sample-profile.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-profdata/gcc-gcov-sample-profile.test?rev=359689&r1=359688&r2=359689&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-profdata/gcc-gcov-sample-profile.test (original)
+++ llvm/trunk/test/tools/llvm-profdata/gcc-gcov-sample-profile.test Wed May  1 08:36:18 2019
@@ -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.
 




More information about the llvm-commits mailing list