1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc --mtriple=loongarch64 --mattr=+lsx < %s | FileCheck %s
4 declare void @llvm.loongarch.lsx.vstelm.b(<16 x i8>, i8*, i32, i32)
6 define void @lsx_vstelm_b(<16 x i8> %va, i8* %p) nounwind {
7 ; CHECK-LABEL: lsx_vstelm_b:
8 ; CHECK: # %bb.0: # %entry
9 ; CHECK-NEXT: vstelm.b $vr0, $a0, 1, 15
12 call void @llvm.loongarch.lsx.vstelm.b(<16 x i8> %va, i8* %p, i32 1, i32 15)
16 declare void @llvm.loongarch.lsx.vstelm.h(<8 x i16>, i8*, i32, i32)
18 define void @lsx_vstelm_h(<8 x i16> %va, i8* %p) nounwind {
19 ; CHECK-LABEL: lsx_vstelm_h:
20 ; CHECK: # %bb.0: # %entry
21 ; CHECK-NEXT: vstelm.h $vr0, $a0, 2, 7
24 call void @llvm.loongarch.lsx.vstelm.h(<8 x i16> %va, i8* %p, i32 2, i32 7)
28 declare void @llvm.loongarch.lsx.vstelm.w(<4 x i32>, i8*, i32, i32)
30 define void @lsx_vstelm_w(<4 x i32> %va, i8* %p) nounwind {
31 ; CHECK-LABEL: lsx_vstelm_w:
32 ; CHECK: # %bb.0: # %entry
33 ; CHECK-NEXT: vstelm.w $vr0, $a0, 4, 3
36 call void @llvm.loongarch.lsx.vstelm.w(<4 x i32> %va, i8* %p, i32 4, i32 3)
40 declare void @llvm.loongarch.lsx.vstelm.d(<2 x i64>, i8*, i32, i32)
42 define void @lsx_vstelm_d(<2 x i64> %va, i8* %p) nounwind {
43 ; CHECK-LABEL: lsx_vstelm_d:
44 ; CHECK: # %bb.0: # %entry
45 ; CHECK-NEXT: vstelm.d $vr0, $a0, 8, 1
48 call void @llvm.loongarch.lsx.vstelm.d(<2 x i64> %va, i8* %p, i32 8, i32 1)