[PATCH] D126637: [Hexagon][Tests] Fix tests on Linux/musl

A. Wilcox via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 30 01:42:51 PDT 2022


awilfox created this revision.
awilfox added reviewers: kparzysz, MaskRay.
awilfox added a project: LLVM.
Herald added subscribers: StephenFan, qcolombet.
Herald added a project: All.
awilfox requested review of this revision.
Herald added a subscriber: llvm-commits.

When running on a host system using musl, the target triple is defined
as hexagon-unknown-linux-musl by default.  The Linux ABI differs from
the non-Linux one with varargs, so this causes the tests to fail.

Closes BZ49592, PR48936.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D126637

Files:
  llvm/test/CodeGen/Hexagon/csr-stubs-spill-threshold.ll
  llvm/test/CodeGen/Hexagon/long-calls.ll
  llvm/test/CodeGen/Hexagon/mlong-calls.ll
  llvm/test/CodeGen/Hexagon/pic-regusage.ll
  llvm/test/CodeGen/Hexagon/runtime-stkchk.ll
  llvm/test/CodeGen/Hexagon/swp-memrefs-epilog.ll
  llvm/test/CodeGen/Hexagon/vararg-formal.ll


Index: llvm/test/CodeGen/Hexagon/vararg-formal.ll
===================================================================
--- llvm/test/CodeGen/Hexagon/vararg-formal.ll
+++ llvm/test/CodeGen/Hexagon/vararg-formal.ll
@@ -1,4 +1,4 @@
-; RUN: llc -march=hexagon < %s | FileCheck %s
+; RUN: llc -march=hexagon -mtriple=hexagon-unknown-linux-gnu < %s | FileCheck %s
 
 ; Make sure that the first formal argument is not loaded from memory.
 ; CHECK-NOT: memw
Index: llvm/test/CodeGen/Hexagon/swp-memrefs-epilog.ll
===================================================================
--- llvm/test/CodeGen/Hexagon/swp-memrefs-epilog.ll
+++ llvm/test/CodeGen/Hexagon/swp-memrefs-epilog.ll
@@ -1,4 +1,4 @@
-; RUN: llc -march=hexagon -O2 -fp-contract=fast < %s -pipeliner-experimental-cg=true | FileCheck %s
+; RUN: llc -march=hexagon -mtriple=hexagon-unknown-linux-gnu -O2 -fp-contract=fast < %s -pipeliner-experimental-cg=true | FileCheck %s
 
 ; Test that the memoperands for instructions in the epilog are updated
 ; correctly. Previously, the pipeliner updated the offset for the memoperands
Index: llvm/test/CodeGen/Hexagon/runtime-stkchk.ll
===================================================================
--- llvm/test/CodeGen/Hexagon/runtime-stkchk.ll
+++ llvm/test/CodeGen/Hexagon/runtime-stkchk.ll
@@ -1,4 +1,4 @@
-; RUN: llc -march=hexagon -mcpu=hexagonv55 -enable-stackovf-sanitizer < %s | FileCheck %s
+; RUN: llc -march=hexagon -mcpu=hexagonv55 -mtriple=hexagon-unknown-linux-gnu -enable-stackovf-sanitizer < %s | FileCheck %s
 
 ; CHECK-LABEL: foo_1
 ; CHECK: __runtime_stack_check
Index: llvm/test/CodeGen/Hexagon/pic-regusage.ll
===================================================================
--- llvm/test/CodeGen/Hexagon/pic-regusage.ll
+++ llvm/test/CodeGen/Hexagon/pic-regusage.ll
@@ -1,4 +1,4 @@
-; RUN: llc  -march=hexagon -relocation-model=pic < %s | FileCheck %s
+; RUN: llc  -march=hexagon -mtriple=hexagon-unknown-linux-gnu -relocation-model=pic < %s | FileCheck %s
 
 ; Force the use of R14 (by clobbering everything else in the inline asm).
 ; Make sure that R14 is not set before the __save call (which will clobber
Index: llvm/test/CodeGen/Hexagon/mlong-calls.ll
===================================================================
--- llvm/test/CodeGen/Hexagon/mlong-calls.ll
+++ llvm/test/CodeGen/Hexagon/mlong-calls.ll
@@ -1,4 +1,4 @@
-; RUN: llc -hexagon-long-calls -march=hexagon -enable-save-restore-long=true < %s | FileCheck %s
+; RUN: llc -hexagon-long-calls -march=hexagon -mtriple=hexagon-unknown-linux-gnu -enable-save-restore-long=true < %s | FileCheck %s
 
 ; CHECK: call ##f1
 ; CHECK: jump ##__restore
Index: llvm/test/CodeGen/Hexagon/long-calls.ll
===================================================================
--- llvm/test/CodeGen/Hexagon/long-calls.ll
+++ llvm/test/CodeGen/Hexagon/long-calls.ll
@@ -1,4 +1,4 @@
-; RUN: llc -march=hexagon -enable-save-restore-long -hexagon-initial-cfg-cleanup=0 < %s | FileCheck %s
+; RUN: llc -march=hexagon -mtriple=hexagon-unknown-linux-gnu -enable-save-restore-long -hexagon-initial-cfg-cleanup=0 < %s | FileCheck %s
 
 ; Check that the -long-calls feature is supported by the backend.
 
Index: llvm/test/CodeGen/Hexagon/csr-stubs-spill-threshold.ll
===================================================================
--- llvm/test/CodeGen/Hexagon/csr-stubs-spill-threshold.ll
+++ llvm/test/CodeGen/Hexagon/csr-stubs-spill-threshold.ll
@@ -1,4 +1,4 @@
-; RUN: llc -march=hexagon  -O2 -spill-func-threshold=2 < %s | FileCheck %s
+; RUN: llc -march=hexagon -mtriple=hexagon-unknown-linux-gnu -O2 -spill-func-threshold=2 < %s | FileCheck %s
 
 declare i32 @f0(i32, i32, i32, i32, i32, i32)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126637.432859.patch
Type: text/x-patch
Size: 3675 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220530/8cc99598/attachment.bin>


More information about the llvm-commits mailing list