27 lines
768 B
LLVM
27 lines
768 B
LLVM
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||
|
; RUN: llc --mtriple=loongarch64 --mattr=+lsx < %s | FileCheck %s
|
||
|
|
||
|
declare <16 x i8> @llvm.loongarch.lsx.vld(i8*, i32)
|
||
|
|
||
|
define <16 x i8> @lsx_vld(i8* %p) nounwind {
|
||
|
; CHECK-LABEL: lsx_vld:
|
||
|
; CHECK: # %bb.0: # %entry
|
||
|
; CHECK-NEXT: vld $vr0, $a0, 1
|
||
|
; CHECK-NEXT: ret
|
||
|
entry:
|
||
|
%res = call <16 x i8> @llvm.loongarch.lsx.vld(i8* %p, i32 1)
|
||
|
ret <16 x i8> %res
|
||
|
}
|
||
|
|
||
|
declare <16 x i8> @llvm.loongarch.lsx.vldx(i8*, i64)
|
||
|
|
||
|
define <16 x i8> @lsx_vldx(i8* %p, i64 %b) nounwind {
|
||
|
; CHECK-LABEL: lsx_vldx:
|
||
|
; CHECK: # %bb.0: # %entry
|
||
|
; CHECK-NEXT: vldx $vr0, $a0, $a1
|
||
|
; CHECK-NEXT: ret
|
||
|
entry:
|
||
|
%res = call <16 x i8> @llvm.loongarch.lsx.vldx(i8* %p, i64 %b)
|
||
|
ret <16 x i8> %res
|
||
|
}
|