; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -march=hexagon < %s | FileCheck %s

define void @f0(<128 x i8>* %a0, <128 x i8>* %a1) #0 {
; CHECK-LABEL: f0:
; CHECK:       // %bb.0:
; CHECK-NEXT:    {
; CHECK-NEXT:     jumpr r31
; CHECK-NEXT:     v0.cur = vmem(r0+#1)
; CHECK-NEXT:     vmem(r1+#2) = v0
; CHECK-NEXT:    }
  %v0 = getelementptr <128 x i8>, <128 x i8>* %a0, i32 1
  %v1 = load <128 x i8>, <128 x i8>* %v0, align 128
  %v2 = getelementptr <128 x i8>, <128 x i8>* %a1, i32 2
  store <128 x i8> %v1, <128 x i8>* %v2, align 128
  ret void
}

define void @f1(<64 x i16>* %a0, <64 x i16>* %a1) #0 {
; CHECK-LABEL: f1:
; CHECK:       // %bb.0:
; CHECK-NEXT:    {
; CHECK-NEXT:     jumpr r31
; CHECK-NEXT:     v0.cur = vmem(r0+#1)
; CHECK-NEXT:     vmem(r1+#2) = v0
; CHECK-NEXT:    }
  %v0 = getelementptr <64 x i16>, <64 x i16>* %a0, i32 1
  %v1 = load <64 x i16>, <64 x i16>* %v0, align 128
  %v2 = getelementptr <64 x i16>, <64 x i16>* %a1, i32 2
  store <64 x i16> %v1, <64 x i16>* %v2, align 128
  ret void
}

define void @f2(<32 x i32>* %a0, <32 x i32>* %a1) #0 {
; CHECK-LABEL: f2:
; CHECK:       // %bb.0:
; CHECK-NEXT:    {
; CHECK-NEXT:     jumpr r31
; CHECK-NEXT:     v0.cur = vmem(r0+#1)
; CHECK-NEXT:     vmem(r1+#2) = v0
; CHECK-NEXT:    }
  %v0 = getelementptr <32 x i32>, <32 x i32>* %a0, i32 1
  %v1 = load <32 x i32>, <32 x i32>* %v0, align 128
  %v2 = getelementptr <32 x i32>, <32 x i32>* %a1, i32 2
  store <32 x i32> %v1, <32 x i32>* %v2, align 128
  ret void
}

define void @f3(<64 x half>* %a0, <64 x half>* %a1) #0 {
; CHECK-LABEL: f3:
; CHECK:       // %bb.0:
; CHECK-NEXT:    {
; CHECK-NEXT:     jumpr r31
; CHECK-NEXT:     v0.cur = vmem(r0+#1)
; CHECK-NEXT:     vmem(r1+#2) = v0
; CHECK-NEXT:    }
  %v0 = getelementptr <64 x half>, <64 x half>* %a0, i32 1
  %v1 = load <64 x half>, <64 x half>* %v0, align 128
  %v2 = getelementptr <64 x half>, <64 x half>* %a1, i32 2
  store <64 x half> %v1, <64 x half>* %v2, align 128
  ret void
}

define void @f4(<32 x float>* %a0, <32 x float>* %a1) #0 {
; CHECK-LABEL: f4:
; CHECK:       // %bb.0:
; CHECK-NEXT:    {
; CHECK-NEXT:     jumpr r31
; CHECK-NEXT:     v0.cur = vmem(r0+#1)
; CHECK-NEXT:     vmem(r1+#2) = v0
; CHECK-NEXT:    }
  %v0 = getelementptr <32 x float>, <32 x float>* %a0, i32 1
  %v1 = load <32 x float>, <32 x float>* %v0, align 128
  %v2 = getelementptr <32 x float>, <32 x float>* %a1, i32 2
  store <32 x float> %v1, <32 x float>* %v2, align 128
  ret void
}

define void @f5(<128 x i8>* %a0, <128 x i8>* %a1) #0 {
; CHECK-LABEL: f5:
; CHECK:       // %bb.0:
; CHECK-NEXT:    {
; CHECK-NEXT:     v0 = vmemu(r0+#1)
; CHECK-NEXT:    }
; CHECK-NEXT:    {
; CHECK-NEXT:     jumpr r31
; CHECK-NEXT:     vmemu(r1+#2) = v0
; CHECK-NEXT:    }
  %v0 = getelementptr <128 x i8>, <128 x i8>* %a0, i32 1
  %v1 = load <128 x i8>, <128 x i8>* %v0, align 1
  %v2 = getelementptr <128 x i8>, <128 x i8>* %a1, i32 2
  store <128 x i8> %v1, <128 x i8>* %v2, align 1
  ret void
}

define void @f6(<64 x i16>* %a0, <64 x i16>* %a1) #0 {
; CHECK-LABEL: f6:
; CHECK:       // %bb.0:
; CHECK-NEXT:    {
; CHECK-NEXT:     v0 = vmemu(r0+#1)
; CHECK-NEXT:    }
; CHECK-NEXT:    {
; CHECK-NEXT:     jumpr r31
; CHECK-NEXT:     vmemu(r1+#2) = v0
; CHECK-NEXT:    }
  %v0 = getelementptr <64 x i16>, <64 x i16>* %a0, i32 1
  %v1 = load <64 x i16>, <64 x i16>* %v0, align 1
  %v2 = getelementptr <64 x i16>, <64 x i16>* %a1, i32 2
  store <64 x i16> %v1, <64 x i16>* %v2, align 1
  ret void
}

define void @f7(<32 x i32>* %a0, <32 x i32>* %a1) #0 {
; CHECK-LABEL: f7:
; CHECK:       // %bb.0:
; CHECK-NEXT:    {
; CHECK-NEXT:     v0 = vmemu(r0+#1)
; CHECK-NEXT:    }
; CHECK-NEXT:    {
; CHECK-NEXT:     jumpr r31
; CHECK-NEXT:     vmemu(r1+#2) = v0
; CHECK-NEXT:    }
  %v0 = getelementptr <32 x i32>, <32 x i32>* %a0, i32 1
  %v1 = load <32 x i32>, <32 x i32>* %v0, align 1
  %v2 = getelementptr <32 x i32>, <32 x i32>* %a1, i32 2
  store <32 x i32> %v1, <32 x i32>* %v2, align 1
  ret void
}

define void @f8(<64 x half>* %a0, <64 x half>* %a1) #0 {
; CHECK-LABEL: f8:
; CHECK:       // %bb.0:
; CHECK-NEXT:    {
; CHECK-NEXT:     v0 = vmemu(r0+#1)
; CHECK-NEXT:    }
; CHECK-NEXT:    {
; CHECK-NEXT:     jumpr r31
; CHECK-NEXT:     vmemu(r1+#2) = v0
; CHECK-NEXT:    }
  %v0 = getelementptr <64 x half>, <64 x half>* %a0, i32 1
  %v1 = load <64 x half>, <64 x half>* %v0, align 1
  %v2 = getelementptr <64 x half>, <64 x half>* %a1, i32 2
  store <64 x half> %v1, <64 x half>* %v2, align 1
  ret void
}

define void @f9(<32 x float>* %a0, <32 x float>* %a1) #0 {
; CHECK-LABEL: f9:
; CHECK:       // %bb.0:
; CHECK-NEXT:    {
; CHECK-NEXT:     v0 = vmemu(r0+#1)
; CHECK-NEXT:    }
; CHECK-NEXT:    {
; CHECK-NEXT:     jumpr r31
; CHECK-NEXT:     vmemu(r1+#2) = v0
; CHECK-NEXT:    }
  %v0 = getelementptr <32 x float>, <32 x float>* %a0, i32 1
  %v1 = load <32 x float>, <32 x float>* %v0, align 1
  %v2 = getelementptr <32 x float>, <32 x float>* %a1, i32 2
  store <32 x float> %v1, <32 x float>* %v2, align 1
  ret void
}

attributes #0 = { nounwind "target-cpu"="hexagonv69" "target-features"="+hvxv69,+hvx-length128b,+hvx-qfloat" }
