llvm-project/llvm/test/CodeGen/Hexagon/struct_copy_sched_r16.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

28 lines
798 B
LLVM

; RUN: llc -mtriple=hexagon -hexagon-small-data-threshold=0 < %s | FileCheck %s
; Disable small-data, or the test will need to be modified to account for g0
; being placed there.
%s.3 = type { i8, i8, i8, i8, i8, i8 }
@g0 = external global %s.3
; CHECK: [[REG1:(r[0-9]+)]] = {{[#]+}}g0
; CHECK: r{{[0-9]+}} = mem{{u?}}b([[REG1]]+#{{[0-9]+}})
; CHECK: r0 = #0
; CHECK: dealloc_return
define i32 @f0() #0 {
b0:
%v0 = alloca %s.3, align 1
call void @llvm.memcpy.p0.p0.i32(ptr align 1 %v0, ptr align 1 @g0, i32 6, i1 false)
call void @f1(ptr %v0) #0
ret i32 0
}
declare void @f1(ptr)
; Function Attrs: argmemonly nounwind
declare void @llvm.memcpy.p0.p0.i32(ptr nocapture writeonly, ptr nocapture readonly, i32, i1) #1
attributes #0 = { nounwind }
attributes #1 = { argmemonly nounwind }