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 i32 @llvm.loongarch.lsx.vpickve2gr.b(<16 x i8>, i32)
6 define i32 @lsx_vpickve2gr_b(<16 x i8> %va) nounwind {
7 ; CHECK-LABEL: lsx_vpickve2gr_b:
8 ; CHECK: # %bb.0: # %entry
9 ; CHECK-NEXT: vpickve2gr.b $a0, $vr0, 15
12 %res = call i32 @llvm.loongarch.lsx.vpickve2gr.b(<16 x i8> %va, i32 15)
16 declare i32 @llvm.loongarch.lsx.vpickve2gr.h(<8 x i16>, i32)
18 define i32 @lsx_vpickve2gr_h(<8 x i16> %va) nounwind {
19 ; CHECK-LABEL: lsx_vpickve2gr_h:
20 ; CHECK: # %bb.0: # %entry
21 ; CHECK-NEXT: vpickve2gr.h $a0, $vr0, 7
24 %res = call i32 @llvm.loongarch.lsx.vpickve2gr.h(<8 x i16> %va, i32 7)
28 declare i32 @llvm.loongarch.lsx.vpickve2gr.w(<4 x i32>, i32)
30 define i32 @lsx_vpickve2gr_w(<4 x i32> %va) nounwind {
31 ; CHECK-LABEL: lsx_vpickve2gr_w:
32 ; CHECK: # %bb.0: # %entry
33 ; CHECK-NEXT: vpickve2gr.w $a0, $vr0, 3
36 %res = call i32 @llvm.loongarch.lsx.vpickve2gr.w(<4 x i32> %va, i32 3)
40 declare i64 @llvm.loongarch.lsx.vpickve2gr.d(<2 x i64>, i32)
42 define i64 @lsx_vpickve2gr_d(<2 x i64> %va) nounwind {
43 ; CHECK-LABEL: lsx_vpickve2gr_d:
44 ; CHECK: # %bb.0: # %entry
45 ; CHECK-NEXT: vpickve2gr.d $a0, $vr0, 1
48 %res = call i64 @llvm.loongarch.lsx.vpickve2gr.d(<2 x i64> %va, i32 1)
52 declare i32 @llvm.loongarch.lsx.vpickve2gr.bu(<16 x i8>, i32)
54 define i32 @lsx_vpickve2gr_bu(<16 x i8> %va) nounwind {
55 ; CHECK-LABEL: lsx_vpickve2gr_bu:
56 ; CHECK: # %bb.0: # %entry
57 ; CHECK-NEXT: vpickve2gr.bu $a0, $vr0, 15
60 %res = call i32 @llvm.loongarch.lsx.vpickve2gr.bu(<16 x i8> %va, i32 15)
64 declare i32 @llvm.loongarch.lsx.vpickve2gr.hu(<8 x i16>, i32)
66 define i32 @lsx_vpickve2gr_hu(<8 x i16> %va) nounwind {
67 ; CHECK-LABEL: lsx_vpickve2gr_hu:
68 ; CHECK: # %bb.0: # %entry
69 ; CHECK-NEXT: vpickve2gr.hu $a0, $vr0, 7
72 %res = call i32 @llvm.loongarch.lsx.vpickve2gr.hu(<8 x i16> %va, i32 7)
76 declare i32 @llvm.loongarch.lsx.vpickve2gr.wu(<4 x i32>, i32)
78 define i32 @lsx_vpickve2gr_wu(<4 x i32> %va) nounwind {
79 ; CHECK-LABEL: lsx_vpickve2gr_wu:
80 ; CHECK: # %bb.0: # %entry
81 ; CHECK-NEXT: vpickve2gr.wu $a0, $vr0, 3
84 %res = call i32 @llvm.loongarch.lsx.vpickve2gr.wu(<4 x i32> %va, i32 3)
88 declare i64 @llvm.loongarch.lsx.vpickve2gr.du(<2 x i64>, i32)
90 define i64 @lsx_vpickve2gr_du(<2 x i64> %va) nounwind {
91 ; CHECK-LABEL: lsx_vpickve2gr_du:
92 ; CHECK: # %bb.0: # %entry
93 ; CHECK-NEXT: vpickve2gr.du $a0, $vr0, 1
96 %res = call i64 @llvm.loongarch.lsx.vpickve2gr.du(<2 x i64> %va, i32 1)