1 ; RUN: llc -march=hexagon -mattr=+hvxv60,hvx-length64b,-packets < %s | FileCheck %s
3 target triple = "hexagon"
5 ; Check that the only (multi-instruction) packet is the one with vgather.
9 ; CHECK-NEXT: allocframe(r29,#64):raw
15 ; CHECK-NEXT: r29 = and(r29,#-64)
18 ; CHECK-NEXT: vtmp.w = vgather(r1,m0,v0.w).w
19 ; CHECK-NEXT: vmem(r0+#0) = vtmp.new
22 ; CHECK-NEXT: r0 = add(r29,#0)
25 ; CHECK-NEXT: call foo
28 ; CHECK-NEXT: r31:30 = dealloc_return(r30):raw
31 define void @fred(i8* %p, i32 %x, i32 %y) local_unnamed_addr #0 {
33 %v = alloca <16 x i32>, align 64
34 %0 = bitcast <16 x i32>* %v to i8*
35 call void @llvm.lifetime.start(i64 64, i8* nonnull %0) #3
36 tail call void @llvm.hexagon.V6.vgathermw(i8* %p, i32 %x, i32 %y, <16 x i32> undef)
37 call void @foo(i8* nonnull %0) #0
38 call void @llvm.lifetime.end(i64 64, i8* nonnull %0) #3
42 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
43 declare void @llvm.hexagon.V6.vgathermw(i8*, i32, i32, <16 x i32>) #1
44 declare void @foo(i8*) local_unnamed_addr #0
45 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
47 attributes #0 = { nounwind "target-cpu"="hexagonv65" }
48 attributes #1 = { argmemonly nounwind }