1; RUN: llc -march=hexagon -mcpu=hexagonv67t < %s | FileCheck %s
2
3target triple = "hexagon"
4
5; Disable CONST64 for tiny core since it is a memory operation and tiny core has
6; only one memory resource per packet.
7; CHECK: ##
8; CHECK: ##
9
10define void @analyze(i16* nocapture %in) local_unnamed_addr {
11entry:
12  %0 = bitcast i16* %in to i64*
13  %1 = tail call i64 @llvm.hexagon.M2.mmachs.s1(i64 10230955697128160, i64 10230955697128160, i64 0)
14  store i64 %1, i64* %0, align 8
15  ret void
16}
17
18; CHECK-NOT: CONST64
19define dso_local void @analyze2(i16* nocapture %in) local_unnamed_addr {
20entry:
21  %arrayidx = getelementptr inbounds i16, i16* %in, i32 3
22  %0 = load i16, i16* %arrayidx, align 2
23  %conv = sext i16 %0 to i64
24  %1 = tail call i64 @llvm.hexagon.M2.mmacls.s1(i64 undef, i64 30432282833584128, i64 %conv)
25  %arrayidx4 = getelementptr inbounds i16, i16* %in, i32 4
26  %2 = bitcast i16* %arrayidx4 to i64*
27  store i64 %1, i64* %2, align 8
28  ret void
29}
30
31; Function Attrs: nounwind readnone
32declare i64 @llvm.hexagon.M2.mmachs.s1(i64, i64, i64)
33declare i64 @llvm.hexagon.M2.mmacls.s1(i64, i64, i64)
34