[llvm] 2881696 - [tests] Force (some) X86-specific tests to use an explicit triple

Igor Kudrin via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 22 05:49:50 PDT 2022


Author: Igor Kudrin
Date: 2022-03-22T16:46:47+04:00
New Revision: 2881696b4062db320dc2d1456bb4269687133f3c

URL: https://github.com/llvm/llvm-project/commit/2881696b4062db320dc2d1456bb4269687133f3c
DIFF: https://github.com/llvm/llvm-project/commit/2881696b4062db320dc2d1456bb4269687133f3c.diff

LOG: [tests] Force (some) X86-specific tests to use an explicit triple

These tests are located in 'X86' subfolders which means that they should
be compiled for that target. As they did not have the target specified
explicitly, they in fact were compiled for a default target triple. Not
all targets support all required features for these tests; for example,
if NVPTX is used as a default triple, the tests fail. The patch makes the
tests run for 'x86_64', thus they pass regardless of the default target.

Differential Revision: https://reviews.llvm.org/D121998

Added: 
    

Modified: 
    llvm/test/CodeGen/X86/2010-02-01-DbgValueCrash.ll
    llvm/test/CodeGen/X86/GC/alloc_loop.ll
    llvm/test/CodeGen/X86/GC/cg-O0.ll
    llvm/test/CodeGen/X86/GC/lower_gcroot.ll
    llvm/test/CodeGen/X86/dbg-distringtype-uint.ll
    llvm/test/DebugInfo/X86/dwarfdump-generic_subrange.ll
    llvm/test/DebugInfo/X86/dwarfdump-generic_subrange_const.ll
    llvm/test/DebugInfo/X86/dwarfdump-generic_subrange_count.ll
    llvm/test/DebugInfo/X86/dwarfdump-rankConst.ll
    llvm/test/DebugInfo/X86/dwarfdump-rankExp.ll
    llvm/test/DebugInfo/X86/dwarfdump-signed_const.ll
    llvm/test/DebugInfo/X86/global-constants.ll
    llvm/test/DebugInfo/X86/invalid-global-constants.ll
    llvm/test/DebugInfo/X86/objc_direct.ll
    llvm/test/LTO/X86/Inputs/remangle_intrinsics.ll
    llvm/test/LTO/X86/remangle_intrinsics.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/X86/2010-02-01-DbgValueCrash.ll b/llvm/test/CodeGen/X86/2010-02-01-DbgValueCrash.ll
index b4bb865f7f7e0..4434623ace595 100644
--- a/llvm/test/CodeGen/X86/2010-02-01-DbgValueCrash.ll
+++ b/llvm/test/CodeGen/X86/2010-02-01-DbgValueCrash.ll
@@ -1,5 +1,4 @@
-; RUN: llc -O1 < %s
-; REQUIRES: default_triple
+; RUN: llc -mtriple=x86_64 -O1 < %s
 
 ; ModuleID = 'pr6157.bc'
 ; formerly crashed in SelectionDAGBuilder

diff  --git a/llvm/test/CodeGen/X86/GC/alloc_loop.ll b/llvm/test/CodeGen/X86/GC/alloc_loop.ll
index b924e1cee069e..dc492c9e81c97 100644
--- a/llvm/test/CodeGen/X86/GC/alloc_loop.ll
+++ b/llvm/test/CodeGen/X86/GC/alloc_loop.ll
@@ -1,6 +1,4 @@
-; RUN: llc < %s
-; REQUIRES: default_triple
-
+; RUN: llc -mtriple=x86_64 < %s
 
 declare i8* @llvm_gc_allocate(i32)
 declare void @llvm_gc_initialize(i32)

diff  --git a/llvm/test/CodeGen/X86/GC/cg-O0.ll b/llvm/test/CodeGen/X86/GC/cg-O0.ll
index 1a390c9eb1c1b..96212868fc538 100644
--- a/llvm/test/CodeGen/X86/GC/cg-O0.ll
+++ b/llvm/test/CodeGen/X86/GC/cg-O0.ll
@@ -1,5 +1,4 @@
-; RUN: llc < %s -O0
-; REQUIRES: default_triple
+; RUN: llc -mtriple=x86_64 < %s -O0
 
 define i32 @main() {
 entry:

diff  --git a/llvm/test/CodeGen/X86/GC/lower_gcroot.ll b/llvm/test/CodeGen/X86/GC/lower_gcroot.ll
index 8cccd78100f52..ee4141c732df2 100644
--- a/llvm/test/CodeGen/X86/GC/lower_gcroot.ll
+++ b/llvm/test/CodeGen/X86/GC/lower_gcroot.ll
@@ -1,5 +1,4 @@
-; RUN: llc < %s
-; REQUIRES: default_triple
+; RUN: llc -mtriple=x86_64 < %s
 
 	%Env = type i8*
 

diff  --git a/llvm/test/CodeGen/X86/dbg-distringtype-uint.ll b/llvm/test/CodeGen/X86/dbg-distringtype-uint.ll
index 0e79553842438..9b4607c9695ef 100644
--- a/llvm/test/CodeGen/X86/dbg-distringtype-uint.ll
+++ b/llvm/test/CodeGen/X86/dbg-distringtype-uint.ll
@@ -1,4 +1,4 @@
-; RUN: llc -filetype=obj < %s | llvm-dwarfdump -debug-info - | FileCheck %s
+; RUN: llc -mtriple=x86_64 -filetype=obj < %s | llvm-dwarfdump -debug-info - | FileCheck %s
 ;
 ; CHECK: [[SYM:[a-z0-9]+]]:  DW_TAG_formal_parameter
 ; CHECK:                     DW_AT_name	("esym")

diff  --git a/llvm/test/DebugInfo/X86/dwarfdump-generic_subrange.ll b/llvm/test/DebugInfo/X86/dwarfdump-generic_subrange.ll
index f26b33429a86c..9ae0f14b8aad1 100644
--- a/llvm/test/DebugInfo/X86/dwarfdump-generic_subrange.ll
+++ b/llvm/test/DebugInfo/X86/dwarfdump-generic_subrange.ll
@@ -1,6 +1,6 @@
 ;; This test checks whether DW_AT_rank attribute accepts DIExpression.
 
-; RUN: llc %s -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s
+; RUN: llc %s -mtriple=x86_64 -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s
 
 ;; Test whether DW_AT_data_location is generated.
 ; CHECK-LABEL:  DW_TAG_array_type

diff  --git a/llvm/test/DebugInfo/X86/dwarfdump-generic_subrange_const.ll b/llvm/test/DebugInfo/X86/dwarfdump-generic_subrange_const.ll
index 42e69fbeb4559..28bf70a5380ad 100644
--- a/llvm/test/DebugInfo/X86/dwarfdump-generic_subrange_const.ll
+++ b/llvm/test/DebugInfo/X86/dwarfdump-generic_subrange_const.ll
@@ -1,7 +1,7 @@
 ;; This test checks whether DW_AT_rank attribute accepts constants.
 ;; constants are interally stored as DIExpression.
 
-; RUN: llc %s -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s
+; RUN: llc %s -mtriple=x86_64 -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s
 
 ;; Test whether DW_AT_data_location is generated.
 ; CHECK-LABEL:  DW_TAG_array_type

diff  --git a/llvm/test/DebugInfo/X86/dwarfdump-generic_subrange_count.ll b/llvm/test/DebugInfo/X86/dwarfdump-generic_subrange_count.ll
index a139b02071ad9..c66912ddf3a62 100644
--- a/llvm/test/DebugInfo/X86/dwarfdump-generic_subrange_count.ll
+++ b/llvm/test/DebugInfo/X86/dwarfdump-generic_subrange_count.ll
@@ -1,6 +1,6 @@
 ;; This test checks whether DW_AT_rank attribute accepts DIExpression.
 
-; RUN: llc %s -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s
+; RUN: llc %s -mtriple=x86_64 -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s
 
 ;; Test whether DW_AT_data_location is generated.
 ; CHECK-LABEL:  DW_TAG_array_type

diff  --git a/llvm/test/DebugInfo/X86/dwarfdump-rankConst.ll b/llvm/test/DebugInfo/X86/dwarfdump-rankConst.ll
index 9c4d08bfd4427..758b091e34133 100644
--- a/llvm/test/DebugInfo/X86/dwarfdump-rankConst.ll
+++ b/llvm/test/DebugInfo/X86/dwarfdump-rankConst.ll
@@ -1,6 +1,6 @@
 ;; This test checks whether DW_AT_rank attribute accepts DIExpression.
 
-; RUN: llc %s -filetype=obj -o %t.o
+; RUN: llc %s -mtriple=x86_64 -filetype=obj -o %t.o
 ; RUN: llvm-dwarfdump  %t.o | FileCheck %s
 
 ;; Test whether DW_AT_data_location is generated.

diff  --git a/llvm/test/DebugInfo/X86/dwarfdump-rankExp.ll b/llvm/test/DebugInfo/X86/dwarfdump-rankExp.ll
index da99c46d328b1..a295863de52f7 100644
--- a/llvm/test/DebugInfo/X86/dwarfdump-rankExp.ll
+++ b/llvm/test/DebugInfo/X86/dwarfdump-rankExp.ll
@@ -1,6 +1,6 @@
 ;; This test checks whether DW_AT_rank attribute accepts DIExpression.
 
-; RUN: llc %s -filetype=obj -o %t.o
+; RUN: llc %s -mtriple=x86_64 -filetype=obj -o %t.o
 ; RUN: llvm-dwarfdump  %t.o | FileCheck %s
 
 ;; Test whether DW_AT_data_location is generated.

diff  --git a/llvm/test/DebugInfo/X86/dwarfdump-signed_const.ll b/llvm/test/DebugInfo/X86/dwarfdump-signed_const.ll
index 26f38ece1b562..f75142b184173 100644
--- a/llvm/test/DebugInfo/X86/dwarfdump-signed_const.ll
+++ b/llvm/test/DebugInfo/X86/dwarfdump-signed_const.ll
@@ -1,6 +1,6 @@
 ;; This test checks whether DW_OP_consts is emitted correctly.
 
-; RUN: llc %s -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s
+; RUN: llc %s -mtriple=x86_64 -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s
 
 ;; Test whether DW_AT_data_location is generated.
 ; CHECK-LABEL:  DW_TAG_array_type

diff  --git a/llvm/test/DebugInfo/X86/global-constants.ll b/llvm/test/DebugInfo/X86/global-constants.ll
index bf23beccc7318..bb4bd12839cec 100644
--- a/llvm/test/DebugInfo/X86/global-constants.ll
+++ b/llvm/test/DebugInfo/X86/global-constants.ll
@@ -1,4 +1,4 @@
-; RUN: llc %s -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s
+; RUN: llc %s -mtriple=x86_64 -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s
 
 ; CHECK-DAG-LABEL:  DW_AT_name ("negconstant")
 ; CHECK:  DW_AT_const_value (-1)

diff  --git a/llvm/test/DebugInfo/X86/invalid-global-constants.ll b/llvm/test/DebugInfo/X86/invalid-global-constants.ll
index 9b9961568174d..710b74aefdf0c 100644
--- a/llvm/test/DebugInfo/X86/invalid-global-constants.ll
+++ b/llvm/test/DebugInfo/X86/invalid-global-constants.ll
@@ -1,4 +1,4 @@
-; RUN: llc %s -filetype=obj -o - 2>&1 | FileCheck %s --check-prefix=ERROR
+; RUN: llc %s -mtriple=x86_64 -filetype=obj -o - 2>&1 | FileCheck %s --check-prefix=ERROR
 ; ERROR: invalid expression
 
 !llvm.dbg.cu = !{!0}

diff  --git a/llvm/test/DebugInfo/X86/objc_direct.ll b/llvm/test/DebugInfo/X86/objc_direct.ll
index 87e0f08241a3e..b6435149108ae 100644
--- a/llvm/test/DebugInfo/X86/objc_direct.ll
+++ b/llvm/test/DebugInfo/X86/objc_direct.ll
@@ -1,5 +1,4 @@
-; UNSUPPORTED: -zos, -aix
-; RUN: llc < %s -filetype=obj -o %t
+; RUN: llc < %s -mtriple=x86_64 -filetype=obj -o %t
 ; RUN: llvm-dwarfdump -v %t | FileCheck %s
 
 ; Source code to regenerate:

diff  --git a/llvm/test/LTO/X86/Inputs/remangle_intrinsics.ll b/llvm/test/LTO/X86/Inputs/remangle_intrinsics.ll
index 0559266d1fc01..e23973dc3172a 100644
--- a/llvm/test/LTO/X86/Inputs/remangle_intrinsics.ll
+++ b/llvm/test/LTO/X86/Inputs/remangle_intrinsics.ll
@@ -1,3 +1,5 @@
+target triple = "x86_64-unknown-linux-gnu"
+
 %struct.rtx_def = type { i16, i16 }
 
 define void @bar(%struct.rtx_def* %a, i8 %b, i32 %c) {

diff  --git a/llvm/test/LTO/X86/remangle_intrinsics.ll b/llvm/test/LTO/X86/remangle_intrinsics.ll
index 523e78e5d30d9..ffeb92be09628 100644
--- a/llvm/test/LTO/X86/remangle_intrinsics.ll
+++ b/llvm/test/LTO/X86/remangle_intrinsics.ll
@@ -1,8 +1,6 @@
-; UNSUPPORTED: powerpc64-ibm-aix
 ; RUN: llvm-as < %s > %t1
 ; RUN: llvm-as < %p/Inputs/remangle_intrinsics.ll > %t2
 ; RUN: llvm-lto %t1 %t2 | FileCheck %s
-; REQUIRES: default_triple
 
 ; We have "struct.rtx_def" type in both modules being LTOed. Both modules use
 ; an overloaded intrinsic which has this type in its signature/name. When
@@ -12,6 +10,8 @@
 
 ; CHECK: Wrote native object file
 
+target triple = "x86_64-unknown-linux-gnu"
+
 %struct.rtx_def = type { i16 }
 
 define void @foo(%struct.rtx_def* %a, i8 %b, i32 %c) {


        


More information about the llvm-commits mailing list