Fangrui Song 2208c97c1b [Hexagon,test] Change llc -march= to -mtriple=
Similar to 806761a7629df268c8aed49657aeccffa6bca449

-mtriple= specifies the full target triple while -march= merely sets the
architecture part of the default target triple, leaving a target triple which
may not make sense.

Therefore, -march= is error-prone and not recommended for tests without a target
triple. The issue has been benign as we recognize $unknown-apple-darwin as ELF instead
of rejecting it outrightly.
2024-12-15 10:20:22 -08:00

24 lines
851 B
LLVM

; RUN: llc -mtriple=hexagon -disable-cgp-delete-phis < %s | FileCheck %s
; REQUIRES: asserts
; Check that this testcase compiles successfully.
; CHECK: vextract
target datalayout = "e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048"
target triple = "hexagon-unknown--elf"
define void @fred() local_unnamed_addr #0 {
b0:
%v1 = load <64 x i8>, ptr undef, align 64
%v2 = insertelement <64 x i8> %v1, i8 0, i32 0
br label %b3
b3: ; preds = %b3, %b0
%v4 = phi <64 x i8> [ %v2, %b0 ], [ %v6, %b3 ]
%v5 = extractelement <64 x i8> %v4, i32 0
%v6 = insertelement <64 x i8> %v4, i8 undef, i32 0
br label %b3
}
attributes #0 = { "target-cpu"="hexagonv60" "target-features"="+hvx,+hvx-length64b" }