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

32 lines
1.0 KiB
LLVM

; RUN: llc -mtriple=hexagon -mcpu=hexagonv67t < %s | FileCheck %s
target triple = "hexagon"
; Disable CONST64 for tiny core since it is a memory operation and tiny core has
; only one memory resource per packet.
; CHECK: ##
; CHECK: ##
define void @analyze(ptr nocapture %in) local_unnamed_addr {
entry:
%0 = tail call i64 @llvm.hexagon.M2.mmachs.s1(i64 10230955697128160, i64 10230955697128160, i64 0)
store i64 %0, ptr %in, align 8
ret void
}
; CHECK-NOT: CONST64
define dso_local void @analyze2(ptr nocapture %in) local_unnamed_addr {
entry:
%arrayidx = getelementptr inbounds i16, ptr %in, i32 3
%0 = load i16, ptr %arrayidx, align 2
%conv = sext i16 %0 to i64
%1 = tail call i64 @llvm.hexagon.M2.mmacls.s1(i64 undef, i64 30432282833584128, i64 %conv)
%arrayidx4 = getelementptr inbounds i16, ptr %in, i32 4
store i64 %1, ptr %arrayidx4, align 8
ret void
}
; Function Attrs: nounwind readnone
declare i64 @llvm.hexagon.M2.mmachs.s1(i64, i64, i64)
declare i64 @llvm.hexagon.M2.mmacls.s1(i64, i64, i64)