[llvm] d59ce7d - [ARM] Specify Triple in DebugInfo Tests

Archibald Elliott via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 1 07:56:16 PDT 2022


Author: Archibald Elliott
Date: 2022-11-01T14:55:33Z
New Revision: d59ce7d0eaada995e1a8f262f1ff33888575332c

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

LOG: [ARM] Specify Triple in DebugInfo Tests

When the host's target triple ends in `-windows-msvc`, `%llc_dwarf`
contains an explicit `-windows-gnu` triple which ensures that dwarf will
be used. This is useful in target-independent tests, where no triple is
specified, and no target-specific features are used. However, this is
not compatible with target-dependent tests (such as those in
llvm/test/DebugInfo/ARM), as the command-line triple will override the
triple in the LLVM IR program, causing test issues on windows.

This change switches these tests to use an explicit triple, so the tests
test what was expected, and there is no flakiness on windows.

Fixes #58053

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

Added: 
    

Modified: 
    llvm/test/DebugInfo/ARM/bitfield.ll
    llvm/test/DebugInfo/ARM/float-args.ll
    llvm/test/DebugInfo/ARM/split-complex.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/DebugInfo/ARM/bitfield.ll b/llvm/test/DebugInfo/ARM/bitfield.ll
index c33fc36e40591..f1a98c332a897 100644
--- a/llvm/test/DebugInfo/ARM/bitfield.ll
+++ b/llvm/test/DebugInfo/ARM/bitfield.ll
@@ -1,4 +1,4 @@
-; RUN: %llc_dwarf -O0 -filetype=obj -o %t.o %s
+; RUN: llc -mtriple=thumbv7-apple-ios -O0 -filetype=obj -o %t.o %s
 ; RUN: llvm-dwarfdump -v -debug-info %t.o | FileCheck %s
 ;
 ; Generated from:
@@ -14,9 +14,6 @@
 ; CHECK:          DW_AT_bit_size   {{.*}} (0x1c)
 ; CHECK:          DW_AT_bit_offset {{.*}} (0xfffffffffffffff8)
 ; CHECK:          DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x0)
-source_filename = "test/DebugInfo/ARM/bitfield.ll"
-target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
-target triple = "thumbv7-apple-ios"
 
 %struct.anon = type { i8, [5 x i8] }
 

diff  --git a/llvm/test/DebugInfo/ARM/float-args.ll b/llvm/test/DebugInfo/ARM/float-args.ll
index 56a7c89a671ca..859a1d5238403 100644
--- a/llvm/test/DebugInfo/ARM/float-args.ll
+++ b/llvm/test/DebugInfo/ARM/float-args.ll
@@ -1,5 +1,5 @@
-; RUN: %llc_dwarf -filetype=obj -mattr=+vfp2 -float-abi=hard < %s | llvm-dwarfdump -debug-info - | FileCheck %s
-; RUN: %llc_dwarf -filetype=obj -mattr=-vfp2 -float-abi=soft < %s | llvm-dwarfdump -debug-info - | FileCheck %s
+; RUN: llc -mtriple=armv7--none-eabi -filetype=obj -mattr=+vfp2 -float-abi=hard < %s | llvm-dwarfdump -debug-info - | FileCheck %s
+; RUN: llc -mtriple=armv7--none-eabi -filetype=obj -mattr=-vfp2 -float-abi=soft < %s | llvm-dwarfdump -debug-info - | FileCheck %s
 
 ; Generated by clang -O1 -g from the following C source:
 ; float foo(float p) {
@@ -12,9 +12,6 @@
 ; CHECK:     0x{{[0-9a-f]*}}:  DW_TAG_formal_parameter
 ; CHECK-NEXT:                      DW_AT_location
 
-target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
-target triple = "armv7--none-eabi"
-
 define float @foo(float %p) !dbg !4 {
 entry:
   tail call void @llvm.dbg.value(metadata float %p, metadata !9, metadata !15), !dbg !16

diff  --git a/llvm/test/DebugInfo/ARM/split-complex.ll b/llvm/test/DebugInfo/ARM/split-complex.ll
index 6de3406f0e98c..5ac25c5e9b56f 100644
--- a/llvm/test/DebugInfo/ARM/split-complex.ll
+++ b/llvm/test/DebugInfo/ARM/split-complex.ll
@@ -1,8 +1,5 @@
-; XFAIL: aarch64-pc-windows-msvc
-; RUN: %llc_dwarf -O0 -filetype=obj -o %t.o %s
+; RUN: llc -mtriple=thumbv7-apple-unknown-macho -O0 -filetype=obj -o %t.o %s
 ; RUN: llvm-dwarfdump -v -debug-info %t.o | FileCheck %s
-target datalayout = "e-m:o-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
-target triple = "thumbv7-apple-unknown-macho"
 
 ; generated from (-triple thumbv7-apple-unknown-macho -Os):
 ;   void f(_Complex double c) { c = 0; }


        


More information about the llvm-commits mailing list