; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc --mtriple=loongarch64 --mattr=+lasx < %s | FileCheck %s
declare <32 x i8> @llvm.loongarch.lasx.xvld(ptr, i32)
define <32 x i8> @lasx_xvld(ptr %p) nounwind {
; CHECK-LABEL: lasx_xvld:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xvld $xr0, $a0, 1
; CHECK-NEXT: ret
entry:
%res = call <32 x i8> @llvm.loongarch.lasx.xvld(ptr %p, i32 1)
ret <32 x i8> %res
}
declare <32 x i8> @llvm.loongarch.lasx.xvldx(ptr, i64)
define <32 x i8> @lasx_xvldx(ptr %p, i64 %b) nounwind {
; CHECK-LABEL: lasx_xvldx:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xvldx $xr0, $a0, $a1
; CHECK-NEXT: ret
entry:
%res = call <32 x i8> @llvm.loongarch.lasx.xvldx(ptr %p, i64 %b)
ret <32 x i8> %res
}