Home | History | Annotate | Download | only in Hexagon
      1 ; RUN: llc -march=hexagon -mattr=+hvxv60,hvx-length64b < %s | FileCheck %s --check-prefix=CHECK-GATHER
      2 ; RUN: not llc -march=hexagon -mattr=+hvxv60,hvx-length64b,-packets %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
      3 
      4 target triple = "hexagon"
      5 
      6 ; CHECK-GATHER-LABEL: fred:
      7 ; CHECK-GATHER: vgather
      8 ; CHECK-ERROR: LLVM ERROR: Support for gather requires packets, which are disabled
      9 
     10 define void @fred(i8* %p, i32 %x, i32 %y) local_unnamed_addr #0 {
     11 entry:
     12   %v = alloca <16 x i32>, align 64
     13   %0 = bitcast <16 x i32>* %v to i8*
     14   call void @llvm.lifetime.start(i64 64, i8* nonnull %0) #3
     15   tail call void @llvm.hexagon.V6.vgathermw(i8* %p, i32 %x, i32 %y, <16 x i32> undef)
     16   call void @foo(i8* nonnull %0) #0
     17   call void @llvm.lifetime.end(i64 64, i8* nonnull %0) #3
     18   ret void
     19 }
     20 
     21 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
     22 declare void @llvm.hexagon.V6.vgathermw(i8*, i32, i32, <16 x i32>) #1
     23 declare void @foo(i8*) local_unnamed_addr #0
     24 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
     25 
     26 attributes #0 = { nounwind "target-cpu"="hexagonv65" }
     27 attributes #1 = { argmemonly nounwind }
     28