[PATCH] D136066: [ARM] Specify Triple in DebugInfo Tests

Sam Elliott via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 17 03:49:55 PDT 2022


lenary created this revision.
Herald added a subscriber: kristof.beyls.
Herald added a project: All.
lenary requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136066

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


Index: llvm/test/DebugInfo/ARM/split-complex.ll
===================================================================
--- llvm/test/DebugInfo/ARM/split-complex.ll
+++ llvm/test/DebugInfo/ARM/split-complex.ll
@@ -1,5 +1,4 @@
-; 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"
Index: llvm/test/DebugInfo/ARM/float-args.ll
===================================================================
--- llvm/test/DebugInfo/ARM/float-args.ll
+++ 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) {
Index: llvm/test/DebugInfo/ARM/bitfield.ll
===================================================================
--- llvm/test/DebugInfo/ARM/bitfield.ll
+++ 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:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136066.468152.patch
Type: text/x-patch
Size: 1748 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221017/23560ce3/attachment.bin>


More information about the llvm-commits mailing list