27 lines
787 B
LLVM
27 lines
787 B
LLVM
|
; 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(i8*, i32)
|
||
|
|
||
|
define <32 x i8> @lasx_xvld(i8* %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(i8* %p, i32 1)
|
||
|
ret <32 x i8> %res
|
||
|
}
|
||
|
|
||
|
declare <32 x i8> @llvm.loongarch.lasx.xvldx(i8*, i64)
|
||
|
|
||
|
define <32 x i8> @lasx_xvldx(i8* %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(i8* %p, i64 %b)
|
||
|
ret <32 x i8> %res
|
||
|
}
|