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 <16 x i8> @llvm.loongarch.lsx.vssrlrn.b.h(<8 x i16>, <8 x i16>)
6 define <16 x i8> @lsx_vssrlrn_b_h(<8 x i16> %va, <8 x i16> %vb) nounwind {
7 ; CHECK-LABEL: lsx_vssrlrn_b_h:
8 ; CHECK: # %bb.0: # %entry
9 ; CHECK-NEXT: vssrlrn.b.h $vr0, $vr0, $vr1
12 %res = call <16 x i8> @llvm.loongarch.lsx.vssrlrn.b.h(<8 x i16> %va, <8 x i16> %vb)
16 declare <8 x i16> @llvm.loongarch.lsx.vssrlrn.h.w(<4 x i32>, <4 x i32>)
18 define <8 x i16> @lsx_vssrlrn_h_w(<4 x i32> %va, <4 x i32> %vb) nounwind {
19 ; CHECK-LABEL: lsx_vssrlrn_h_w:
20 ; CHECK: # %bb.0: # %entry
21 ; CHECK-NEXT: vssrlrn.h.w $vr0, $vr0, $vr1
24 %res = call <8 x i16> @llvm.loongarch.lsx.vssrlrn.h.w(<4 x i32> %va, <4 x i32> %vb)
28 declare <4 x i32> @llvm.loongarch.lsx.vssrlrn.w.d(<2 x i64>, <2 x i64>)
30 define <4 x i32> @lsx_vssrlrn_w_d(<2 x i64> %va, <2 x i64> %vb) nounwind {
31 ; CHECK-LABEL: lsx_vssrlrn_w_d:
32 ; CHECK: # %bb.0: # %entry
33 ; CHECK-NEXT: vssrlrn.w.d $vr0, $vr0, $vr1
36 %res = call <4 x i32> @llvm.loongarch.lsx.vssrlrn.w.d(<2 x i64> %va, <2 x i64> %vb)
40 declare <16 x i8> @llvm.loongarch.lsx.vssrlrn.bu.h(<8 x i16>, <8 x i16>)
42 define <16 x i8> @lsx_vssrlrn_bu_h(<8 x i16> %va, <8 x i16> %vb) nounwind {
43 ; CHECK-LABEL: lsx_vssrlrn_bu_h:
44 ; CHECK: # %bb.0: # %entry
45 ; CHECK-NEXT: vssrlrn.bu.h $vr0, $vr0, $vr1
48 %res = call <16 x i8> @llvm.loongarch.lsx.vssrlrn.bu.h(<8 x i16> %va, <8 x i16> %vb)
52 declare <8 x i16> @llvm.loongarch.lsx.vssrlrn.hu.w(<4 x i32>, <4 x i32>)
54 define <8 x i16> @lsx_vssrlrn_hu_w(<4 x i32> %va, <4 x i32> %vb) nounwind {
55 ; CHECK-LABEL: lsx_vssrlrn_hu_w:
56 ; CHECK: # %bb.0: # %entry
57 ; CHECK-NEXT: vssrlrn.hu.w $vr0, $vr0, $vr1
60 %res = call <8 x i16> @llvm.loongarch.lsx.vssrlrn.hu.w(<4 x i32> %va, <4 x i32> %vb)
64 declare <4 x i32> @llvm.loongarch.lsx.vssrlrn.wu.d(<2 x i64>, <2 x i64>)
66 define <4 x i32> @lsx_vssrlrn_wu_d(<2 x i64> %va, <2 x i64> %vb) nounwind {
67 ; CHECK-LABEL: lsx_vssrlrn_wu_d:
68 ; CHECK: # %bb.0: # %entry
69 ; CHECK-NEXT: vssrlrn.wu.d $vr0, $vr0, $vr1
72 %res = call <4 x i32> @llvm.loongarch.lsx.vssrlrn.wu.d(<2 x i64> %va, <2 x i64> %vb)