; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc --mtriple=loongarch32 --mattr=+32s,+lasx < %s | FileCheck %s
; RUN: llc --mtriple=loongarch64 --mattr=+lasx < %s | FileCheck %s

declare i32 @llvm.loongarch.lasx.xvpickve2gr.w(<8 x i32>, i32)

define i32 @lasx_xvpickve2gr_w(<8 x i32> %va) nounwind {
; CHECK-LABEL: lasx_xvpickve2gr_w:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    xvpickve2gr.w $a0, $xr0, 1
; CHECK-NEXT:    ret
entry:
  %res = call i32 @llvm.loongarch.lasx.xvpickve2gr.w(<8 x i32> %va, i32 1)
  ret i32 %res
}

declare i32 @llvm.loongarch.lasx.xvpickve2gr.wu(<8 x i32>, i32)

define i32 @lasx_xvpickve2gr_wu(<8 x i32> %va) nounwind {
; CHECK-LABEL: lasx_xvpickve2gr_wu:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    xvpickve2gr.wu $a0, $xr0, 1
; CHECK-NEXT:    ret
entry:
  %res = call i32 @llvm.loongarch.lasx.xvpickve2gr.wu(<8 x i32> %va, i32 1)
  ret i32 %res
}
