llvm-project/llvm/test/CodeGen/Hexagon/isel-bitcast-v1i8-i8.ll
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

23 lines
626 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=hexagon < %s | FileCheck %s
; This shouldn't crash.
define i8 @fred(ptr %a0) #0 {
; CHECK-LABEL: fred:
; CHECK: // %bb.0:
; CHECK-NEXT: {
; CHECK-NEXT: r0 = memw(r0+#0)
; CHECK-NEXT: }
; CHECK-NEXT: {
; CHECK-NEXT: r0 = extractu(r0,#8,#16)
; CHECK-NEXT: jumpr r31
; CHECK-NEXT: }
%v0 = load <4 x i8>, ptr %a0, align 4
%v1 = shufflevector <4 x i8> %v0, <4 x i8> undef, <1 x i32> <i32 2>
%v2 = bitcast <1 x i8> %v1 to i8
ret i8 %v2
}
attributes #0 = { nounwind "target-cpu"="hexagonv66" }