Skip to content

Commit a088c6f

Browse files
committed
[llvm][LoongArch] Introduce LASX and LSX conversion intrinsics
This patch introduces the LASX and LSX conversion intrinsics: - <8 x float> @llvm.loongarch.lasx.cast.128.s(<4 x float>) - <4 x double> @llvm.loongarch.lasx.cast.128.d(<2 x double>) - <32 x i8> @llvm.loongarch.lasx.cast.128(<16 x i8>) - <8 x float> @llvm.loongarch.lasx.concat.128.s(<4 x float>, <4 x float>) - <4 x double> @llvm.loongarch.lasx.concat.128.d(<2 x double>, <2 x double>) - <32 x i8> @llvm.loongarch.lasx.concat.128(<16 x i8>, <16 x i8>) - <4 x float> @llvm.loongarch.lasx.extract.128.lo.s(<8 x float>) - <2 x double> @llvm.loongarch.lasx.extract.128.lo.d(<4 x double>) - <16 x i8> @llvm.loongarch.lasx.extract.128.lo(<32 x i8>) - <4 x float> @llvm.loongarch.lasx.extract.128.hi.s(<8 x float>) - <2 x double> @llvm.loongarch.lasx.extract.128.hi.d(<4 x double>) - <16 x i8> @llvm.loongarch.lasx.extract.128.hi(<32 x i8>) - <8 x float> @llvm.loongarch.lasx.insert.128.lo.s(<8 x float>, <4 x float>) - <4 x double> @llvm.loongarch.lasx.insert.128.lo.d(<4 x double>, <2 x double>) - <32 x i8> @llvm.loongarch.lasx.insert.128.lo(<32 x i8>, <16 x i8>) - <8 x float> @llvm.loongarch.lasx.insert.128.hi.s(<8 x float>, <4 x float>) - <4 x double> @llvm.loongarch.lasx.insert.128.hi.d(<4 x double>, <2 x double>) - <32 x i8> @llvm.loongarch.lasx.insert.128.hi(<32 x i8>, <16 x i8>)
1 parent 39c8df3 commit a088c6f

File tree

4 files changed

+308
-0
lines changed

4 files changed

+308
-0
lines changed

llvm/include/llvm/IR/IntrinsicsLoongArch.td

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,4 +1192,42 @@ def int_loongarch_lasx_xvstelm_w
11921192
def int_loongarch_lasx_xvstelm_d
11931193
: VecInt<[], [llvm_v4i64_ty, llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty],
11941194
[IntrWriteMem, IntrArgMemOnly, ImmArg<ArgIndex<2>>, ImmArg<ArgIndex<3>>]>;
1195+
1196+
// LASX and LSX conversion
1197+
def int_loongarch_lasx_cast_128_s
1198+
: VecInt<[llvm_v8f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
1199+
def int_loongarch_lasx_cast_128_d
1200+
: VecInt<[llvm_v4f64_ty], [llvm_v2f64_ty], [IntrNoMem]>;
1201+
def int_loongarch_lasx_cast_128
1202+
: VecInt<[llvm_v32i8_ty], [llvm_v16i8_ty], [IntrNoMem]>;
1203+
def int_loongarch_lasx_concat_128_s
1204+
: VecInt<[llvm_v8f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1205+
def int_loongarch_lasx_concat_128_d
1206+
: VecInt<[llvm_v4f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1207+
def int_loongarch_lasx_concat_128
1208+
: VecInt<[llvm_v32i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1209+
def int_loongarch_lasx_extract_128_lo_s
1210+
: VecInt<[llvm_v4f32_ty], [llvm_v8f32_ty], [IntrNoMem]>;
1211+
def int_loongarch_lasx_extract_128_lo_d
1212+
: VecInt<[llvm_v2f64_ty], [llvm_v4f64_ty], [IntrNoMem]>;
1213+
def int_loongarch_lasx_extract_128_lo
1214+
: VecInt<[llvm_v16i8_ty], [llvm_v32i8_ty], [IntrNoMem]>;
1215+
def int_loongarch_lasx_extract_128_hi_s
1216+
: VecInt<[llvm_v4f32_ty], [llvm_v8f32_ty], [IntrNoMem]>;
1217+
def int_loongarch_lasx_extract_128_hi_d
1218+
: VecInt<[llvm_v2f64_ty], [llvm_v4f64_ty], [IntrNoMem]>;
1219+
def int_loongarch_lasx_extract_128_hi
1220+
: VecInt<[llvm_v16i8_ty], [llvm_v32i8_ty], [IntrNoMem]>;
1221+
def int_loongarch_lasx_insert_128_lo_s
1222+
: VecInt<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1223+
def int_loongarch_lasx_insert_128_lo_d
1224+
: VecInt<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1225+
def int_loongarch_lasx_insert_128_lo
1226+
: VecInt<[llvm_v32i8_ty], [llvm_v32i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1227+
def int_loongarch_lasx_insert_128_hi_s
1228+
: VecInt<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1229+
def int_loongarch_lasx_insert_128_hi_d
1230+
: VecInt<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1231+
def int_loongarch_lasx_insert_128_hi
1232+
: VecInt<[llvm_v32i8_ty], [llvm_v32i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
11951233
} // TargetPrefix = "loongarch"

llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6168,6 +6168,11 @@ performINTRINSIC_WO_CHAINCombine(SDNode *N, SelectionDAG &DAG,
61686168
N->getOperand(1),
61696169
DAG.getNode(ISD::ANY_EXTEND, DL, Subtarget.getGRLenVT(),
61706170
N->getOperand(2)));
6171+
case Intrinsic::loongarch_lasx_concat_128_s:
6172+
case Intrinsic::loongarch_lasx_concat_128_d:
6173+
case Intrinsic::loongarch_lasx_concat_128:
6174+
return DAG.getNode(ISD::CONCAT_VECTORS, DL, N->getValueType(0),
6175+
N->getOperand(1), N->getOperand(2));
61716176
}
61726177
return SDValue();
61736178
}

llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2028,6 +2028,37 @@ defm : subvector_subreg_lowering<LSX128, v2f64, LASX256, v4f64, 2, sub_128>;
20282028
defm : subvector_subreg_lowering<LSX128, v8i16, LASX256, v16i16, 8, sub_128>;
20292029
defm : subvector_subreg_lowering<LSX128, v16i8, LASX256, v32i8, 16, sub_128>;
20302030

2031+
// LASX and LSX conversion
2032+
def : Pat<(int_loongarch_lasx_cast_128_s (v4f32 LSX128:$src)),
2033+
(INSERT_SUBREG (IMPLICIT_DEF), LSX128:$src, sub_128)>;
2034+
def : Pat<(int_loongarch_lasx_cast_128_d (v2f64 LSX128:$src)),
2035+
(INSERT_SUBREG (IMPLICIT_DEF), LSX128:$src, sub_128)>;
2036+
def : Pat<(int_loongarch_lasx_cast_128 (v16i8 LSX128:$src)),
2037+
(INSERT_SUBREG (IMPLICIT_DEF), LSX128:$src, sub_128)>;
2038+
def : Pat<(int_loongarch_lasx_extract_128_lo_s (v8f32 LASX256:$src)),
2039+
(EXTRACT_SUBREG LASX256:$src, sub_128)>;
2040+
def : Pat<(int_loongarch_lasx_extract_128_lo_d (v4f64 LASX256:$src)),
2041+
(EXTRACT_SUBREG LASX256:$src, sub_128)>;
2042+
def : Pat<(int_loongarch_lasx_extract_128_lo (v32i8 LASX256:$src)),
2043+
(EXTRACT_SUBREG LASX256:$src, sub_128)>;
2044+
def : Pat<(int_loongarch_lasx_extract_128_hi_s (v8f32 LASX256:$src)),
2045+
(EXTRACT_SUBREG (XVPERMI_Q (IMPLICIT_DEF), LASX256:$src, 1), sub_128)>;
2046+
def : Pat<(int_loongarch_lasx_extract_128_hi_d (v4f64 LASX256:$src)),
2047+
(EXTRACT_SUBREG (XVPERMI_Q (IMPLICIT_DEF), LASX256:$src, 1), sub_128)>;
2048+
def : Pat<(int_loongarch_lasx_extract_128_hi (v32i8 LASX256:$src)),
2049+
(EXTRACT_SUBREG (XVPERMI_Q (IMPLICIT_DEF), LASX256:$src, 1), sub_128)>;
2050+
def : Pat<(int_loongarch_lasx_insert_128_lo_s (v8f32 LASX256:$src), (v4f32 LSX128:$lo)),
2051+
(XVPERMI_Q LASX256:$src, (INSERT_SUBREG (IMPLICIT_DEF), LSX128:$lo, sub_128), 48)>;
2052+
def : Pat<(int_loongarch_lasx_insert_128_lo_d (v4f64 LASX256:$src), (v2f64 LSX128:$lo)),
2053+
(XVPERMI_Q LASX256:$src, (INSERT_SUBREG (IMPLICIT_DEF), LSX128:$lo, sub_128), 48)>;
2054+
def : Pat<(int_loongarch_lasx_insert_128_lo (v32i8 LASX256:$src), (v16i8 LSX128:$lo)),
2055+
(XVPERMI_Q LASX256:$src, (INSERT_SUBREG (IMPLICIT_DEF), LSX128:$lo, sub_128), 48)>;
2056+
def : Pat<(int_loongarch_lasx_insert_128_hi_s (v8f32 LASX256:$src), (v4f32 LSX128:$lo)),
2057+
(XVPERMI_Q LASX256:$src, (INSERT_SUBREG (IMPLICIT_DEF), LSX128:$lo, sub_128), 2)>;
2058+
def : Pat<(int_loongarch_lasx_insert_128_hi_d (v4f64 LASX256:$src), (v2f64 LSX128:$lo)),
2059+
(XVPERMI_Q LASX256:$src, (INSERT_SUBREG (IMPLICIT_DEF), LSX128:$lo, sub_128), 2)>;
2060+
def : Pat<(int_loongarch_lasx_insert_128_hi (v32i8 LASX256:$src), (v16i8 LSX128:$lo)),
2061+
(XVPERMI_Q LASX256:$src, (INSERT_SUBREG (IMPLICIT_DEF), LSX128:$lo, sub_128), 2)>;
20312062
} // Predicates = [HasExtLASX]
20322063

20332064
/// Intrinsic pattern
Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2+
; RUN: llc --mtriple=loongarch32 --mattr=+32s,+lasx < %s | FileCheck %s
3+
; RUN: llc --mtriple=loongarch64 --mattr=+lasx < %s | FileCheck %s
4+
5+
declare <8 x float> @llvm.loongarch.lasx.cast.128.s(<4 x float>)
6+
7+
define <8 x float> @lasx_cast_128_s(<4 x float> %va) {
8+
; CHECK-LABEL: lasx_cast_128_s:
9+
; CHECK: # %bb.0: # %entry
10+
; CHECK-NEXT: # kill: def $vr0 killed $vr0 def $xr0
11+
; CHECK-NEXT: ret
12+
entry:
13+
%res = call <8 x float> @llvm.loongarch.lasx.cast.128.s(<4 x float> %va)
14+
ret <8 x float> %res
15+
}
16+
17+
declare <4 x double> @llvm.loongarch.lasx.cast.128.d(<2 x double>)
18+
19+
define <4 x double> @lasx_cast_128_d(<2 x double> %va) {
20+
; CHECK-LABEL: lasx_cast_128_d:
21+
; CHECK: # %bb.0: # %entry
22+
; CHECK-NEXT: # kill: def $vr0 killed $vr0 def $xr0
23+
; CHECK-NEXT: ret
24+
entry:
25+
%res = call <4 x double> @llvm.loongarch.lasx.cast.128.d(<2 x double> %va)
26+
ret <4 x double> %res
27+
}
28+
29+
declare <32 x i8> @llvm.loongarch.lasx.cast.128(<16 x i8>)
30+
31+
define <32 x i8> @lasx_cast_128(<16 x i8> %va) {
32+
; CHECK-LABEL: lasx_cast_128:
33+
; CHECK: # %bb.0: # %entry
34+
; CHECK-NEXT: # kill: def $vr0 killed $vr0 def $xr0
35+
; CHECK-NEXT: ret
36+
entry:
37+
%res = call <32 x i8> @llvm.loongarch.lasx.cast.128(<16 x i8> %va)
38+
ret <32 x i8> %res
39+
}
40+
41+
declare <8 x float> @llvm.loongarch.lasx.concat.128.s(<4 x float>, <4 x float>)
42+
43+
define <8 x float> @lasx_concat_128_s(<4 x float> %va, <4 x float> %vb) {
44+
; CHECK-LABEL: lasx_concat_128_s:
45+
; CHECK: # %bb.0: # %entry
46+
; CHECK-NEXT: # kill: def $vr1 killed $vr1 def $xr1
47+
; CHECK-NEXT: # kill: def $vr0 killed $vr0 def $xr0
48+
; CHECK-NEXT: xvpermi.q $xr0, $xr1, 2
49+
; CHECK-NEXT: ret
50+
entry:
51+
%res = call <8 x float> @llvm.loongarch.lasx.concat.128.s(<4 x float> %va, <4 x float> %vb)
52+
ret <8 x float> %res
53+
}
54+
55+
declare <4 x double> @llvm.loongarch.lasx.concat.128.d(<2 x double>, <2 x double>)
56+
57+
define <4 x double> @lasx_concat_128_d(<2 x double> %va, <2 x double> %vb) {
58+
; CHECK-LABEL: lasx_concat_128_d:
59+
; CHECK: # %bb.0: # %entry
60+
; CHECK-NEXT: # kill: def $vr1 killed $vr1 def $xr1
61+
; CHECK-NEXT: # kill: def $vr0 killed $vr0 def $xr0
62+
; CHECK-NEXT: xvpermi.q $xr0, $xr1, 2
63+
; CHECK-NEXT: ret
64+
entry:
65+
%res = call <4 x double> @llvm.loongarch.lasx.concat.128.d(<2 x double> %va, <2 x double> %vb)
66+
ret <4 x double> %res
67+
}
68+
69+
declare <32 x i8> @llvm.loongarch.lasx.concat.128(<16 x i8>, <16 x i8>)
70+
71+
define <32 x i8> @lasx_concat_128(<16 x i8> %va, <16 x i8> %vb) {
72+
; CHECK-LABEL: lasx_concat_128:
73+
; CHECK: # %bb.0: # %entry
74+
; CHECK-NEXT: # kill: def $vr1 killed $vr1 def $xr1
75+
; CHECK-NEXT: # kill: def $vr0 killed $vr0 def $xr0
76+
; CHECK-NEXT: xvpermi.q $xr0, $xr1, 2
77+
; CHECK-NEXT: ret
78+
entry:
79+
%res = call <32 x i8> @llvm.loongarch.lasx.concat.128(<16 x i8> %va, <16 x i8> %vb)
80+
ret <32 x i8> %res
81+
}
82+
83+
declare <4 x float> @llvm.loongarch.lasx.extract.128.lo.s(<8 x float>)
84+
85+
define <4 x float> @lasx_extract_128_lo_s(<8 x float> %va) {
86+
; CHECK-LABEL: lasx_extract_128_lo_s:
87+
; CHECK: # %bb.0: # %entry
88+
; CHECK-NEXT: # kill: def $vr0 killed $vr0 killed $xr0
89+
; CHECK-NEXT: ret
90+
entry:
91+
%res = call <4 x float> @llvm.loongarch.lasx.extract.128.lo.s(<8 x float> %va)
92+
ret <4 x float> %res
93+
}
94+
95+
declare <2 x double> @llvm.loongarch.lasx.extract.128.lo.d(<4 x double>)
96+
97+
define <2 x double> @lasx_extract_128_lo_d(<4 x double> %va) {
98+
; CHECK-LABEL: lasx_extract_128_lo_d:
99+
; CHECK: # %bb.0: # %entry
100+
; CHECK-NEXT: # kill: def $vr0 killed $vr0 killed $xr0
101+
; CHECK-NEXT: ret
102+
entry:
103+
%res = call <2 x double> @llvm.loongarch.lasx.extract.128.lo.d(<4 x double> %va)
104+
ret <2 x double> %res
105+
}
106+
107+
declare <16 x i8> @llvm.loongarch.lasx.extract.128.lo(<32 x i8>)
108+
109+
define <16 x i8> @lasx_extract_128_lo(<32 x i8> %va) {
110+
; CHECK-LABEL: lasx_extract_128_lo:
111+
; CHECK: # %bb.0: # %entry
112+
; CHECK-NEXT: # kill: def $vr0 killed $vr0 killed $xr0
113+
; CHECK-NEXT: ret
114+
entry:
115+
%res = call <16 x i8> @llvm.loongarch.lasx.extract.128.lo(<32 x i8> %va)
116+
ret <16 x i8> %res
117+
}
118+
119+
declare <4 x float> @llvm.loongarch.lasx.extract.128.hi.s(<8 x float>)
120+
121+
define <4 x float> @lasx_extract_128_hi_s(<8 x float> %va) {
122+
; CHECK-LABEL: lasx_extract_128_hi_s:
123+
; CHECK: # %bb.0: # %entry
124+
; CHECK-NEXT: xvpermi.q $xr0, $xr0, 1
125+
; CHECK-NEXT: # kill: def $vr0 killed $vr0 killed $xr0
126+
; CHECK-NEXT: ret
127+
entry:
128+
%res = call <4 x float> @llvm.loongarch.lasx.extract.128.hi.s(<8 x float> %va)
129+
ret <4 x float> %res
130+
}
131+
132+
declare <2 x double> @llvm.loongarch.lasx.extract.128.hi.d(<4 x double>)
133+
134+
define <2 x double> @lasx_extract_128_hi_d(<4 x double> %va) {
135+
; CHECK-LABEL: lasx_extract_128_hi_d:
136+
; CHECK: # %bb.0: # %entry
137+
; CHECK-NEXT: xvpermi.q $xr0, $xr0, 1
138+
; CHECK-NEXT: # kill: def $vr0 killed $vr0 killed $xr0
139+
; CHECK-NEXT: ret
140+
entry:
141+
%res = call <2 x double> @llvm.loongarch.lasx.extract.128.hi.d(<4 x double> %va)
142+
ret <2 x double> %res
143+
}
144+
145+
declare <16 x i8> @llvm.loongarch.lasx.extract.128.hi(<32 x i8>)
146+
147+
define <16 x i8> @lasx_extract_128_hi(<32 x i8> %va) {
148+
; CHECK-LABEL: lasx_extract_128_hi:
149+
; CHECK: # %bb.0: # %entry
150+
; CHECK-NEXT: xvpermi.q $xr0, $xr0, 1
151+
; CHECK-NEXT: # kill: def $vr0 killed $vr0 killed $xr0
152+
; CHECK-NEXT: ret
153+
entry:
154+
%res = call <16 x i8> @llvm.loongarch.lasx.extract.128.hi(<32 x i8> %va)
155+
ret <16 x i8> %res
156+
}
157+
158+
declare <8 x float> @llvm.loongarch.lasx.insert.128.lo.s(<8 x float>, <4 x float>)
159+
160+
define <8 x float> @lasx_insert_128_lo_s(<8 x float> %va, <4 x float> %vb) {
161+
; CHECK-LABEL: lasx_insert_128_lo_s:
162+
; CHECK: # %bb.0: # %entry
163+
; CHECK-NEXT: # kill: def $vr1 killed $vr1 def $xr1
164+
; CHECK-NEXT: xvpermi.q $xr0, $xr1, 48
165+
; CHECK-NEXT: ret
166+
entry:
167+
%res = call <8 x float> @llvm.loongarch.lasx.insert.128.lo.s(<8 x float> %va, <4 x float> %vb)
168+
ret <8 x float> %res
169+
}
170+
171+
declare <4 x double> @llvm.loongarch.lasx.insert.128.lo.d(<4 x double>, <2 x double>)
172+
173+
define <4 x double> @lasx_insert_128_lo_d(<4 x double> %va, <2 x double> %vb) {
174+
; CHECK-LABEL: lasx_insert_128_lo_d:
175+
; CHECK: # %bb.0: # %entry
176+
; CHECK-NEXT: # kill: def $vr1 killed $vr1 def $xr1
177+
; CHECK-NEXT: xvpermi.q $xr0, $xr1, 48
178+
; CHECK-NEXT: ret
179+
entry:
180+
%res = call <4 x double> @llvm.loongarch.lasx.insert.128.lo.d(<4 x double> %va, <2 x double> %vb)
181+
ret <4 x double> %res
182+
}
183+
184+
declare <32 x i8> @llvm.loongarch.lasx.insert.128.lo(<32 x i8>, <16 x i8>)
185+
186+
define <32 x i8> @lasx_insert_128_lo(<32 x i8> %va, <16 x i8> %vb) {
187+
; CHECK-LABEL: lasx_insert_128_lo:
188+
; CHECK: # %bb.0: # %entry
189+
; CHECK-NEXT: # kill: def $vr1 killed $vr1 def $xr1
190+
; CHECK-NEXT: xvpermi.q $xr0, $xr1, 48
191+
; CHECK-NEXT: ret
192+
entry:
193+
%res = call <32 x i8> @llvm.loongarch.lasx.insert.128.lo(<32 x i8> %va, <16 x i8> %vb)
194+
ret <32 x i8> %res
195+
}
196+
197+
declare <8 x float> @llvm.loongarch.lasx.insert.128.hi.s(<8 x float>, <4 x float>)
198+
199+
define <8 x float> @lasx_insert_128_hi_s(<8 x float> %va, <4 x float> %vb) {
200+
; CHECK-LABEL: lasx_insert_128_hi_s:
201+
; CHECK: # %bb.0: # %entry
202+
; CHECK-NEXT: # kill: def $vr1 killed $vr1 def $xr1
203+
; CHECK-NEXT: xvpermi.q $xr0, $xr1, 2
204+
; CHECK-NEXT: ret
205+
entry:
206+
%res = call <8 x float> @llvm.loongarch.lasx.insert.128.hi.s(<8 x float> %va, <4 x float> %vb)
207+
ret <8 x float> %res
208+
}
209+
210+
declare <4 x double> @llvm.loongarch.lasx.insert.128.hi.d(<4 x double>, <2 x double>)
211+
212+
define <4 x double> @lasx_insert_128_hi_d(<4 x double> %va, <2 x double> %vb) {
213+
; CHECK-LABEL: lasx_insert_128_hi_d:
214+
; CHECK: # %bb.0: # %entry
215+
; CHECK-NEXT: # kill: def $vr1 killed $vr1 def $xr1
216+
; CHECK-NEXT: xvpermi.q $xr0, $xr1, 2
217+
; CHECK-NEXT: ret
218+
entry:
219+
%res = call <4 x double> @llvm.loongarch.lasx.insert.128.hi.d(<4 x double> %va, <2 x double> %vb)
220+
ret <4 x double> %res
221+
}
222+
223+
declare <32 x i8> @llvm.loongarch.lasx.insert.128.hi(<32 x i8>, <16 x i8>)
224+
225+
define <32 x i8> @lasx_insert_128_hi(<32 x i8> %va, <16 x i8> %vb) {
226+
; CHECK-LABEL: lasx_insert_128_hi:
227+
; CHECK: # %bb.0: # %entry
228+
; CHECK-NEXT: # kill: def $vr1 killed $vr1 def $xr1
229+
; CHECK-NEXT: xvpermi.q $xr0, $xr1, 2
230+
; CHECK-NEXT: ret
231+
entry:
232+
%res = call <32 x i8> @llvm.loongarch.lasx.insert.128.hi(<32 x i8> %va, <16 x i8> %vb)
233+
ret <32 x i8> %res
234+
}

0 commit comments

Comments
 (0)