[llvm] [Hexagon][test] Fix more tests on linux-musl (PR #66785)

Natanael Copa via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 08:16:53 PDT 2023


https://github.com/ncopa created https://github.com/llvm/llvm-project/pull/66785

-march=hexagon uses the default target triple and changes the arch part of hexagon. On linux-musl, this essentially becomes hexagon-unknown-linux-musl which has different code generation. Use -mtriple instead.

Link: https://github.com/llvm/llvm-project/commit/944110353b970fc99de3f012292b4c29d4d91999
Link: https://github.com/llvm/llvm-project/issues/48936

>From 03160ed7b3c1be7884dae94635a4dcee787034ef Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa at alpinelinux.org>
Date: Tue, 19 Sep 2023 17:13:42 +0200
Subject: [PATCH] [Hexagon][test] Fix more tests on linux-musl

-march=hexagon uses the default target triple and changes the arch part of
hexagon. On linux-musl, this essentially becomes hexagon-unknown-linux-musl
which has different code generation. Use -mtriple instead.

Link: https://github.com/llvm/llvm-project/commit/944110353b970fc99de3f012292b4c29d4d91999
Link: https://github.com/llvm/llvm-project/issues/48936
---
 llvm/test/CodeGen/Hexagon/swp-memrefs-epilog.ll | 2 +-
 llvm/test/CodeGen/Hexagon/vararg-formal.ll      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/test/CodeGen/Hexagon/swp-memrefs-epilog.ll b/llvm/test/CodeGen/Hexagon/swp-memrefs-epilog.ll
index 20e39dd08fd727a..bdb0ad459f6fb54 100644
--- a/llvm/test/CodeGen/Hexagon/swp-memrefs-epilog.ll
+++ b/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 -mtriple=hexagon -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
diff --git a/llvm/test/CodeGen/Hexagon/vararg-formal.ll b/llvm/test/CodeGen/Hexagon/vararg-formal.ll
index 6bba65fcab16900..07a53c79020be0e 100644
--- a/llvm/test/CodeGen/Hexagon/vararg-formal.ll
+++ b/llvm/test/CodeGen/Hexagon/vararg-formal.ll
@@ -1,4 +1,4 @@
-; RUN: llc -march=hexagon < %s | FileCheck %s
+; RUN: llc -mtriple=hexagon < %s | FileCheck %s
 
 ; Make sure that the first formal argument is not loaded from memory.
 ; CHECK-NOT: memw



More information about the llvm-commits mailing list