]> granicus.if.org Git - llvm/commitdiff
[tests] Add host-byteorder-*-endian; update XFAILs of big-endian triples
authorHubert Tong <hubert.reinterpretcast@gmail.com>
Wed, 1 May 2019 15:36:18 +0000 (15:36 +0000)
committerHubert Tong <hubert.reinterpretcast@gmail.com>
Wed, 1 May 2019 15:36:18 +0000 (15:36 +0000)
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

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

index c26a2f87181fd9facc93fba0f8e08b595f69d7c1..644d957d59ea11a326df5b9f0d1c41a9d784eaf5 100644 (file)
@@ -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.
index 1eb8f5edd9d779ec7872328356ac889bc95faca9..142774b61cd31eb5515eef66ae2c53a42b41209f 100644 (file)
@@ -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
index 23e990fcd24a83b2f9b9578f46edc6c3327657b8..149b316db3ecefa4a1150fb54c10ea37005db195 100644 (file)
@@ -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>
index 678c7931250eb889f9bc28362b5cb48e1b641d00..b1edb6bfe361cfdd70625535e22ede802de643a9 100644 (file)
@@ -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 ()*
index fd56b7dc7c161d4d299558971f6a67956c3832e9..f92f7912038bdd834aa4ee984107e19676155940 100644 (file)
@@ -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')
index b0cf7ffd227cb9f7fb988fc7a61e0c6e91c3eb69..51d0e62b56de0e34f8371d090a0362ef33da8a99 100644 (file)
@@ -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
index c4302e787db8d06c314abf47dee2921313ee0a72..6458d3ba7ea6f572e070fabddb6fc23c1ea34916 100644 (file)
@@ -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
index 1ddbdad15cd281418934fa882885fa81ec80a7d1..5db15adfca0f71d5176413a17b50f16287de5cf9 100644 (file)
@@ -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
index 3331dff55dff2cb7db5badee5f473265218a5a6a..173866c711e6497d0739e775a40fed15a1bcb45d 100644 (file)
@@ -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
index 087c8a7b89398688345fd170a2f7284fff4b4bc2..42ae5d233092703e007b104151912d0077709f1b 100644 (file)
@@ -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.