[Hexagon][test] Fix some tests on linux-musl
authorFangrui Song <i@maskray.me>
Wed, 1 Jun 2022 02:55:50 +0000 (19:55 -0700)
committerFangrui Song <i@maskray.me>
Wed, 1 Jun 2022 02:55:50 +0000 (19:55 -0700)
-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/issues/48936
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

index afbef21..30d3a66 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc -march=hexagon  -O2 -spill-func-threshold=2 < %s | FileCheck %s
+; RUN: llc -mtriple=hexagon  -O2 -spill-func-threshold=2 < %s | FileCheck %s
 
 declare i32 @f0(i32, i32, i32, i32, i32, i32)
 
index 6283627..916e74f 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc -march=hexagon -enable-save-restore-long -hexagon-initial-cfg-cleanup=0 < %s | FileCheck %s
+; RUN: llc -mtriple=hexagon -enable-save-restore-long -hexagon-initial-cfg-cleanup=0 < %s | FileCheck %s
 
 ; Check that the -long-calls feature is supported by the backend.
 
index d76b87f..e516b3e 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc -hexagon-long-calls -march=hexagon -enable-save-restore-long=true < %s | FileCheck %s
+; RUN: llc -hexagon-long-calls -mtriple=hexagon -enable-save-restore-long=true < %s | FileCheck %s
 
 ; CHECK: call ##f1
 ; CHECK: jump ##__restore
index 9d3b6ce..36b5072 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc  -march=hexagon -relocation-model=pic < %s | FileCheck %s
+; RUN: llc -mtriple=hexagon -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 66e93d0..2ab0393 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc -march=hexagon -mcpu=hexagonv55 -enable-stackovf-sanitizer < %s | FileCheck %s
+; RUN: llc -mtriple=hexagon -mcpu=hexagonv55 -enable-stackovf-sanitizer < %s | FileCheck %s
 
 ; CHECK-LABEL: foo_1
 ; CHECK: __runtime_stack_check