xref: /freebsd/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td (revision 7a6dacaca14b62ca4b74406814becb87a3fefac0)
106c3fb27SDimitry Andric//===- LoongArchLSXInstrInfo.td - LoongArch LSX instructions -*- tablegen -*-=//
206c3fb27SDimitry Andric//
306c3fb27SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
406c3fb27SDimitry Andric// See https://llvm.org/LICENSE.txt for license information.
506c3fb27SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
606c3fb27SDimitry Andric//
706c3fb27SDimitry Andric//===----------------------------------------------------------------------===//
806c3fb27SDimitry Andric//
906c3fb27SDimitry Andric// This file describes the SIMD extension instructions.
1006c3fb27SDimitry Andric//
1106c3fb27SDimitry Andric//===----------------------------------------------------------------------===//
1206c3fb27SDimitry Andric
135f757f3fSDimitry Andricdef SDT_LoongArchVreplve : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisVec<0>,
145f757f3fSDimitry Andric                                         SDTCisInt<1>, SDTCisVec<1>,
155f757f3fSDimitry Andric                                         SDTCisSameAs<0, 1>, SDTCisInt<2>]>;
165f757f3fSDimitry Andricdef SDT_LoongArchVecCond : SDTypeProfile<1, 1, [SDTCisInt<0>, SDTCisVec<1>]>;
175f757f3fSDimitry Andric
185f757f3fSDimitry Andric// Target nodes.
195f757f3fSDimitry Andricdef loongarch_vreplve : SDNode<"LoongArchISD::VREPLVE", SDT_LoongArchVreplve>;
205f757f3fSDimitry Andricdef loongarch_vall_nonzero : SDNode<"LoongArchISD::VALL_NONZERO",
215f757f3fSDimitry Andric                                    SDT_LoongArchVecCond>;
225f757f3fSDimitry Andricdef loongarch_vany_nonzero : SDNode<"LoongArchISD::VANY_NONZERO",
235f757f3fSDimitry Andric                                    SDT_LoongArchVecCond>;
245f757f3fSDimitry Andricdef loongarch_vall_zero : SDNode<"LoongArchISD::VALL_ZERO",
255f757f3fSDimitry Andric                                SDT_LoongArchVecCond>;
265f757f3fSDimitry Andricdef loongarch_vany_zero : SDNode<"LoongArchISD::VANY_ZERO",
275f757f3fSDimitry Andric                                SDT_LoongArchVecCond>;
285f757f3fSDimitry Andric
295f757f3fSDimitry Andricdef loongarch_vpick_sext_elt : SDNode<"LoongArchISD::VPICK_SEXT_ELT",
305f757f3fSDimitry Andric                                      SDTypeProfile<1, 3, [SDTCisPtrTy<2>]>>;
315f757f3fSDimitry Andricdef loongarch_vpick_zext_elt : SDNode<"LoongArchISD::VPICK_ZEXT_ELT",
325f757f3fSDimitry Andric                                      SDTypeProfile<1, 3, [SDTCisPtrTy<2>]>>;
335f757f3fSDimitry Andric
345f757f3fSDimitry Andricclass VecCond<SDPatternOperator OpNode, ValueType TyNode,
355f757f3fSDimitry Andric              RegisterClass RC = LSX128>
365f757f3fSDimitry Andric    : Pseudo<(outs GPR:$rd), (ins RC:$vj),
375f757f3fSDimitry Andric             [(set GPR:$rd, (OpNode (TyNode RC:$vj)))]> {
385f757f3fSDimitry Andric  let hasSideEffects = 0;
395f757f3fSDimitry Andric  let mayLoad = 0;
405f757f3fSDimitry Andric  let mayStore = 0;
415f757f3fSDimitry Andric  let usesCustomInserter = 1;
425f757f3fSDimitry Andric}
435f757f3fSDimitry Andric
445f757f3fSDimitry Andricdef vsplat_imm_eq_1 : PatFrags<(ops), [(build_vector),
455f757f3fSDimitry Andric                                       (bitconvert (v4i32 (build_vector)))], [{
465f757f3fSDimitry Andric  APInt Imm;
475f757f3fSDimitry Andric  EVT EltTy = N->getValueType(0).getVectorElementType();
485f757f3fSDimitry Andric
495f757f3fSDimitry Andric  if (N->getOpcode() == ISD::BITCAST)
505f757f3fSDimitry Andric    N = N->getOperand(0).getNode();
515f757f3fSDimitry Andric
525f757f3fSDimitry Andric  return selectVSplat(N, Imm, EltTy.getSizeInBits()) &&
535f757f3fSDimitry Andric         Imm.getBitWidth() == EltTy.getSizeInBits() && Imm == 1;
545f757f3fSDimitry Andric}]>;
555f757f3fSDimitry Andric
565f757f3fSDimitry Andricdef vsplati8_imm_eq_7 : PatFrags<(ops), [(build_vector)], [{
575f757f3fSDimitry Andric  APInt Imm;
585f757f3fSDimitry Andric  EVT EltTy = N->getValueType(0).getVectorElementType();
595f757f3fSDimitry Andric
605f757f3fSDimitry Andric  if (N->getOpcode() == ISD::BITCAST)
615f757f3fSDimitry Andric    N = N->getOperand(0).getNode();
625f757f3fSDimitry Andric
635f757f3fSDimitry Andric  return selectVSplat(N, Imm, EltTy.getSizeInBits()) &&
645f757f3fSDimitry Andric         Imm.getBitWidth() == EltTy.getSizeInBits() && Imm == 7;
655f757f3fSDimitry Andric}]>;
665f757f3fSDimitry Andricdef vsplati16_imm_eq_15 : PatFrags<(ops), [(build_vector)], [{
675f757f3fSDimitry Andric  APInt Imm;
685f757f3fSDimitry Andric  EVT EltTy = N->getValueType(0).getVectorElementType();
695f757f3fSDimitry Andric
705f757f3fSDimitry Andric  if (N->getOpcode() == ISD::BITCAST)
715f757f3fSDimitry Andric    N = N->getOperand(0).getNode();
725f757f3fSDimitry Andric
735f757f3fSDimitry Andric  return selectVSplat(N, Imm, EltTy.getSizeInBits()) &&
745f757f3fSDimitry Andric         Imm.getBitWidth() == EltTy.getSizeInBits() && Imm == 15;
755f757f3fSDimitry Andric}]>;
765f757f3fSDimitry Andricdef vsplati32_imm_eq_31 : PatFrags<(ops), [(build_vector)], [{
775f757f3fSDimitry Andric  APInt Imm;
785f757f3fSDimitry Andric  EVT EltTy = N->getValueType(0).getVectorElementType();
795f757f3fSDimitry Andric
805f757f3fSDimitry Andric  if (N->getOpcode() == ISD::BITCAST)
815f757f3fSDimitry Andric    N = N->getOperand(0).getNode();
825f757f3fSDimitry Andric
835f757f3fSDimitry Andric  return selectVSplat(N, Imm, EltTy.getSizeInBits()) &&
845f757f3fSDimitry Andric         Imm.getBitWidth() == EltTy.getSizeInBits() && Imm == 31;
855f757f3fSDimitry Andric}]>;
865f757f3fSDimitry Andricdef vsplati64_imm_eq_63 : PatFrags<(ops), [(build_vector),
875f757f3fSDimitry Andric                                           (bitconvert (v4i32 (build_vector)))], [{
885f757f3fSDimitry Andric  APInt Imm;
895f757f3fSDimitry Andric  EVT EltTy = N->getValueType(0).getVectorElementType();
905f757f3fSDimitry Andric
915f757f3fSDimitry Andric  if (N->getOpcode() == ISD::BITCAST)
925f757f3fSDimitry Andric    N = N->getOperand(0).getNode();
935f757f3fSDimitry Andric
945f757f3fSDimitry Andric  return selectVSplat(N, Imm, EltTy.getSizeInBits()) &&
955f757f3fSDimitry Andric         Imm.getBitWidth() == EltTy.getSizeInBits() && Imm == 63;
965f757f3fSDimitry Andric}]>;
975f757f3fSDimitry Andric
985f757f3fSDimitry Andricdef vsplatf32_fpimm_eq_1
995f757f3fSDimitry Andric  : PatFrags<(ops), [(bitconvert (v4i32 (build_vector))),
1005f757f3fSDimitry Andric                     (bitconvert (v8i32 (build_vector)))], [{
1015f757f3fSDimitry Andric  APInt Imm;
1025f757f3fSDimitry Andric  EVT EltTy = N->getValueType(0).getVectorElementType();
1035f757f3fSDimitry Andric  N = N->getOperand(0).getNode();
1045f757f3fSDimitry Andric
1055f757f3fSDimitry Andric  return selectVSplat(N, Imm, EltTy.getSizeInBits()) &&
1065f757f3fSDimitry Andric         Imm.getBitWidth() == EltTy.getSizeInBits() &&
1075f757f3fSDimitry Andric         Imm == APFloat(+1.0f).bitcastToAPInt();
1085f757f3fSDimitry Andric}]>;
1095f757f3fSDimitry Andricdef vsplatf64_fpimm_eq_1
1105f757f3fSDimitry Andric  : PatFrags<(ops), [(bitconvert (v2i64 (build_vector))),
1115f757f3fSDimitry Andric                     (bitconvert (v4i64 (build_vector)))], [{
1125f757f3fSDimitry Andric  APInt Imm;
1135f757f3fSDimitry Andric  EVT EltTy = N->getValueType(0).getVectorElementType();
1145f757f3fSDimitry Andric  N = N->getOperand(0).getNode();
1155f757f3fSDimitry Andric
1165f757f3fSDimitry Andric  return selectVSplat(N, Imm, EltTy.getSizeInBits()) &&
1175f757f3fSDimitry Andric         Imm.getBitWidth() == EltTy.getSizeInBits() &&
1185f757f3fSDimitry Andric         Imm == APFloat(+1.0).bitcastToAPInt();
1195f757f3fSDimitry Andric}]>;
1205f757f3fSDimitry Andric
1215f757f3fSDimitry Andricdef vsplati8imm7   : PatFrag<(ops node:$reg),
1225f757f3fSDimitry Andric                             (and node:$reg, vsplati8_imm_eq_7)>;
1235f757f3fSDimitry Andricdef vsplati16imm15 : PatFrag<(ops node:$reg),
1245f757f3fSDimitry Andric                             (and node:$reg, vsplati16_imm_eq_15)>;
1255f757f3fSDimitry Andricdef vsplati32imm31 : PatFrag<(ops node:$reg),
1265f757f3fSDimitry Andric                             (and node:$reg, vsplati32_imm_eq_31)>;
1275f757f3fSDimitry Andricdef vsplati64imm63 : PatFrag<(ops node:$reg),
1285f757f3fSDimitry Andric                             (and node:$reg, vsplati64_imm_eq_63)>;
1295f757f3fSDimitry Andric
1305f757f3fSDimitry Andricforeach N = [3, 4, 5, 6, 8] in
1315f757f3fSDimitry Andric  def SplatPat_uimm#N : ComplexPattern<vAny, 1, "selectVSplatImm<"#N#">",
1325f757f3fSDimitry Andric                                       [build_vector, bitconvert], [], 2>;
1335f757f3fSDimitry Andric
1345f757f3fSDimitry Andricforeach N = [5] in
1355f757f3fSDimitry Andric  def SplatPat_simm#N : ComplexPattern<vAny, 1, "selectVSplatImm<"#N#", true>",
1365f757f3fSDimitry Andric                                       [build_vector, bitconvert]>;
1375f757f3fSDimitry Andric
1385f757f3fSDimitry Andricdef vsplat_uimm_inv_pow2 : ComplexPattern<vAny, 1, "selectVSplatUimmInvPow2",
1395f757f3fSDimitry Andric                                          [build_vector, bitconvert]>;
1405f757f3fSDimitry Andric
1415f757f3fSDimitry Andricdef vsplat_uimm_pow2 : ComplexPattern<vAny, 1, "selectVSplatUimmPow2",
1425f757f3fSDimitry Andric                                      [build_vector, bitconvert]>;
1435f757f3fSDimitry Andric
1445f757f3fSDimitry Andricdef muladd : PatFrag<(ops node:$vd, node:$vj, node:$vk),
1455f757f3fSDimitry Andric                     (add node:$vd, (mul node:$vj, node:$vk))>;
1465f757f3fSDimitry Andric
1475f757f3fSDimitry Andricdef mulsub : PatFrag<(ops node:$vd, node:$vj, node:$vk),
1485f757f3fSDimitry Andric                     (sub node:$vd, (mul node:$vj, node:$vk))>;
1495f757f3fSDimitry Andric
1505f757f3fSDimitry Andricdef lsxsplati8  : PatFrag<(ops node:$e0),
1515f757f3fSDimitry Andric                          (v16i8 (build_vector node:$e0, node:$e0,
1525f757f3fSDimitry Andric                                               node:$e0, node:$e0,
1535f757f3fSDimitry Andric                                               node:$e0, node:$e0,
1545f757f3fSDimitry Andric                                               node:$e0, node:$e0,
1555f757f3fSDimitry Andric                                               node:$e0, node:$e0,
1565f757f3fSDimitry Andric                                               node:$e0, node:$e0,
1575f757f3fSDimitry Andric                                               node:$e0, node:$e0,
1585f757f3fSDimitry Andric                                               node:$e0, node:$e0))>;
1595f757f3fSDimitry Andricdef lsxsplati16 : PatFrag<(ops node:$e0),
1605f757f3fSDimitry Andric                          (v8i16 (build_vector node:$e0, node:$e0,
1615f757f3fSDimitry Andric                                               node:$e0, node:$e0,
1625f757f3fSDimitry Andric                                               node:$e0, node:$e0,
1635f757f3fSDimitry Andric                                               node:$e0, node:$e0))>;
1645f757f3fSDimitry Andricdef lsxsplati32 : PatFrag<(ops node:$e0),
1655f757f3fSDimitry Andric                          (v4i32 (build_vector node:$e0, node:$e0,
1665f757f3fSDimitry Andric                                               node:$e0, node:$e0))>;
1675f757f3fSDimitry Andricdef lsxsplati64 : PatFrag<(ops node:$e0),
1685f757f3fSDimitry Andric                          (v2i64 (build_vector node:$e0, node:$e0))>;
1695f757f3fSDimitry Andricdef lsxsplatf32 : PatFrag<(ops node:$e0),
1705f757f3fSDimitry Andric                          (v4f32 (build_vector node:$e0, node:$e0,
1715f757f3fSDimitry Andric                                               node:$e0, node:$e0))>;
1725f757f3fSDimitry Andricdef lsxsplatf64 : PatFrag<(ops node:$e0),
1735f757f3fSDimitry Andric                          (v2f64 (build_vector node:$e0, node:$e0))>;
1745f757f3fSDimitry Andric
1755f757f3fSDimitry Andricdef to_valid_timm : SDNodeXForm<timm, [{
1765f757f3fSDimitry Andric  auto CN = cast<ConstantSDNode>(N);
1775f757f3fSDimitry Andric  return CurDAG->getTargetConstant(CN->getSExtValue(), SDLoc(N), Subtarget->getGRLenVT());
1785f757f3fSDimitry Andric}]>;
1795f757f3fSDimitry Andric
18006c3fb27SDimitry Andric//===----------------------------------------------------------------------===//
18106c3fb27SDimitry Andric// Instruction class templates
18206c3fb27SDimitry Andric//===----------------------------------------------------------------------===//
18306c3fb27SDimitry Andric
18406c3fb27SDimitry Andricclass LSX1RI13_VI<bits<32> op, Operand ImmOpnd = simm13>
18506c3fb27SDimitry Andric    : Fmt1RI13_VI<op, (outs LSX128:$vd), (ins ImmOpnd:$imm13), "$vd, $imm13">;
18606c3fb27SDimitry Andric
18706c3fb27SDimitry Andricclass LSX2R_VV<bits<32> op>
18806c3fb27SDimitry Andric    : Fmt2R_VV<op, (outs LSX128:$vd), (ins LSX128:$vj), "$vd, $vj">;
18906c3fb27SDimitry Andric
19006c3fb27SDimitry Andricclass LSX2R_VR<bits<32> op>
19106c3fb27SDimitry Andric    : Fmt2R_VR<op, (outs LSX128:$vd), (ins GPR:$rj), "$vd, $rj">;
19206c3fb27SDimitry Andric
19306c3fb27SDimitry Andricclass LSX2R_CV<bits<32> op>
19406c3fb27SDimitry Andric    : Fmt2R_CV<op, (outs CFR:$cd), (ins LSX128:$vj), "$cd, $vj">;
19506c3fb27SDimitry Andric
19606c3fb27SDimitry Andricclass LSX2RI1_VVI<bits<32> op, Operand ImmOpnd = uimm1>
19706c3fb27SDimitry Andric    : Fmt2RI1_VVI<op, (outs LSX128:$vd), (ins LSX128:$vj, ImmOpnd:$imm1),
19806c3fb27SDimitry Andric                  "$vd, $vj, $imm1">;
19906c3fb27SDimitry Andric
20006c3fb27SDimitry Andricclass LSX2RI1_RVI<bits<32> op, Operand ImmOpnd = uimm1>
20106c3fb27SDimitry Andric    : Fmt2RI1_RVI<op, (outs GPR:$rd), (ins LSX128:$vj, ImmOpnd:$imm1),
20206c3fb27SDimitry Andric                  "$rd, $vj, $imm1">;
20306c3fb27SDimitry Andric
20406c3fb27SDimitry Andricclass LSX2RI2_VVI<bits<32> op, Operand ImmOpnd = uimm2>
20506c3fb27SDimitry Andric    : Fmt2RI2_VVI<op, (outs LSX128:$vd), (ins LSX128:$vj, ImmOpnd:$imm2),
20606c3fb27SDimitry Andric                  "$vd, $vj, $imm2">;
20706c3fb27SDimitry Andric
20806c3fb27SDimitry Andricclass LSX2RI2_RVI<bits<32> op, Operand ImmOpnd = uimm2>
20906c3fb27SDimitry Andric    : Fmt2RI2_RVI<op, (outs GPR:$rd), (ins LSX128:$vj, ImmOpnd:$imm2),
21006c3fb27SDimitry Andric                  "$rd, $vj, $imm2">;
21106c3fb27SDimitry Andric
21206c3fb27SDimitry Andricclass LSX2RI3_VVI<bits<32> op, Operand ImmOpnd = uimm3>
21306c3fb27SDimitry Andric    : Fmt2RI3_VVI<op, (outs LSX128:$vd), (ins LSX128:$vj, ImmOpnd:$imm3),
21406c3fb27SDimitry Andric                  "$vd, $vj, $imm3">;
21506c3fb27SDimitry Andric
21606c3fb27SDimitry Andricclass LSX2RI3_RVI<bits<32> op, Operand ImmOpnd = uimm3>
21706c3fb27SDimitry Andric    : Fmt2RI3_RVI<op, (outs GPR:$rd), (ins LSX128:$vj, ImmOpnd:$imm3),
21806c3fb27SDimitry Andric                  "$rd, $vj, $imm3">;
21906c3fb27SDimitry Andric
22006c3fb27SDimitry Andricclass LSX2RI4_VVI<bits<32> op, Operand ImmOpnd = uimm4>
22106c3fb27SDimitry Andric    : Fmt2RI4_VVI<op, (outs LSX128:$vd), (ins LSX128:$vj, ImmOpnd:$imm4),
22206c3fb27SDimitry Andric                  "$vd, $vj, $imm4">;
22306c3fb27SDimitry Andric
22406c3fb27SDimitry Andricclass LSX2RI4_RVI<bits<32> op, Operand ImmOpnd = uimm4>
22506c3fb27SDimitry Andric    : Fmt2RI4_RVI<op, (outs GPR:$rd), (ins LSX128:$vj, ImmOpnd:$imm4),
22606c3fb27SDimitry Andric                  "$rd, $vj, $imm4">;
22706c3fb27SDimitry Andric
22806c3fb27SDimitry Andricclass LSX2RI5_VVI<bits<32> op, Operand ImmOpnd = uimm5>
22906c3fb27SDimitry Andric    : Fmt2RI5_VVI<op, (outs LSX128:$vd), (ins LSX128:$vj, ImmOpnd:$imm5),
23006c3fb27SDimitry Andric                  "$vd, $vj, $imm5">;
23106c3fb27SDimitry Andric
23206c3fb27SDimitry Andricclass LSX2RI6_VVI<bits<32> op, Operand ImmOpnd = uimm6>
23306c3fb27SDimitry Andric    : Fmt2RI6_VVI<op, (outs LSX128:$vd), (ins LSX128:$vj, ImmOpnd:$imm6),
23406c3fb27SDimitry Andric                  "$vd, $vj, $imm6">;
23506c3fb27SDimitry Andric
23606c3fb27SDimitry Andricclass LSX2RI8_VVI<bits<32> op, Operand ImmOpnd = uimm8>
23706c3fb27SDimitry Andric    : Fmt2RI8_VVI<op, (outs LSX128:$vd), (ins LSX128:$vj, ImmOpnd:$imm8),
23806c3fb27SDimitry Andric                  "$vd, $vj, $imm8">;
23906c3fb27SDimitry Andric
24006c3fb27SDimitry Andricclass LSX2RI8I1_VRII<bits<32> op, Operand ImmOpnd = simm8,
24106c3fb27SDimitry Andric                     Operand IdxOpnd = uimm1>
24206c3fb27SDimitry Andric    : Fmt2RI8I1_VRII<op, (outs),
24306c3fb27SDimitry Andric                     (ins LSX128:$vd, GPR:$rj, ImmOpnd:$imm8, IdxOpnd:$imm1),
24406c3fb27SDimitry Andric                     "$vd, $rj, $imm8, $imm1">;
24506c3fb27SDimitry Andricclass LSX2RI8I2_VRII<bits<32> op, Operand ImmOpnd = simm8,
24606c3fb27SDimitry Andric                     Operand IdxOpnd = uimm2>
24706c3fb27SDimitry Andric    : Fmt2RI8I2_VRII<op, (outs),
24806c3fb27SDimitry Andric                     (ins LSX128:$vd, GPR:$rj, ImmOpnd:$imm8, IdxOpnd:$imm2),
24906c3fb27SDimitry Andric                     "$vd, $rj, $imm8, $imm2">;
25006c3fb27SDimitry Andricclass LSX2RI8I3_VRII<bits<32> op, Operand ImmOpnd = simm8,
25106c3fb27SDimitry Andric                     Operand IdxOpnd = uimm3>
25206c3fb27SDimitry Andric    : Fmt2RI8I3_VRII<op, (outs),
25306c3fb27SDimitry Andric                     (ins LSX128:$vd, GPR:$rj, ImmOpnd:$imm8, IdxOpnd:$imm3),
25406c3fb27SDimitry Andric                     "$vd, $rj, $imm8, $imm3">;
25506c3fb27SDimitry Andricclass LSX2RI8I4_VRII<bits<32> op, Operand ImmOpnd = simm8,
25606c3fb27SDimitry Andric                     Operand IdxOpnd = uimm4>
25706c3fb27SDimitry Andric    : Fmt2RI8I4_VRII<op, (outs),
25806c3fb27SDimitry Andric                     (ins LSX128:$vd, GPR:$rj, ImmOpnd:$imm8, IdxOpnd:$imm4),
25906c3fb27SDimitry Andric                     "$vd, $rj, $imm8, $imm4">;
26006c3fb27SDimitry Andric
26106c3fb27SDimitry Andricclass LSX3R_VVV<bits<32> op>
26206c3fb27SDimitry Andric    : Fmt3R_VVV<op, (outs LSX128:$vd), (ins LSX128:$vj, LSX128:$vk),
26306c3fb27SDimitry Andric                "$vd, $vj, $vk">;
26406c3fb27SDimitry Andric
26506c3fb27SDimitry Andricclass LSX3R_VVR<bits<32> op>
26606c3fb27SDimitry Andric    : Fmt3R_VVR<op, (outs LSX128:$vd), (ins LSX128:$vj, GPR:$rk),
26706c3fb27SDimitry Andric                "$vd, $vj, $rk">;
26806c3fb27SDimitry Andric
26906c3fb27SDimitry Andricclass LSX4R_VVVV<bits<32> op>
27006c3fb27SDimitry Andric    : Fmt4R_VVVV<op, (outs LSX128:$vd),
27106c3fb27SDimitry Andric                 (ins LSX128:$vj, LSX128:$vk, LSX128:$va),
27206c3fb27SDimitry Andric                 "$vd, $vj, $vk, $va">;
27306c3fb27SDimitry Andric
27406c3fb27SDimitry Andriclet Constraints = "$vd = $dst" in {
27506c3fb27SDimitry Andric
27606c3fb27SDimitry Andricclass LSX2RI1_VVRI<bits<32> op, Operand ImmOpnd = uimm1>
27706c3fb27SDimitry Andric    : Fmt2RI1_VRI<op, (outs LSX128:$dst), (ins LSX128:$vd, GPR:$rj, ImmOpnd:$imm1),
27806c3fb27SDimitry Andric                  "$vd, $rj, $imm1">;
27906c3fb27SDimitry Andricclass LSX2RI2_VVRI<bits<32> op, Operand ImmOpnd = uimm2>
28006c3fb27SDimitry Andric    : Fmt2RI2_VRI<op, (outs LSX128:$dst), (ins LSX128:$vd, GPR:$rj, ImmOpnd:$imm2),
28106c3fb27SDimitry Andric                  "$vd, $rj, $imm2">;
28206c3fb27SDimitry Andricclass LSX2RI3_VVRI<bits<32> op, Operand ImmOpnd = uimm3>
28306c3fb27SDimitry Andric    : Fmt2RI3_VRI<op, (outs LSX128:$dst), (ins LSX128:$vd, GPR:$rj, ImmOpnd:$imm3),
28406c3fb27SDimitry Andric                  "$vd, $rj, $imm3">;
28506c3fb27SDimitry Andricclass LSX2RI4_VVRI<bits<32> op, Operand ImmOpnd = uimm4>
28606c3fb27SDimitry Andric    : Fmt2RI4_VRI<op, (outs LSX128:$dst), (ins LSX128:$vd, GPR:$rj, ImmOpnd:$imm4),
28706c3fb27SDimitry Andric                  "$vd, $rj, $imm4">;
28806c3fb27SDimitry Andric
28906c3fb27SDimitry Andricclass LSX2RI4_VVVI<bits<32> op, Operand ImmOpnd = uimm4>
29006c3fb27SDimitry Andric    : Fmt2RI4_VVI<op, (outs LSX128:$dst), (ins LSX128:$vd, LSX128:$vj, ImmOpnd:$imm4),
29106c3fb27SDimitry Andric                  "$vd, $vj, $imm4">;
29206c3fb27SDimitry Andricclass LSX2RI5_VVVI<bits<32> op, Operand ImmOpnd = uimm5>
29306c3fb27SDimitry Andric    : Fmt2RI5_VVI<op, (outs LSX128:$dst), (ins LSX128:$vd, LSX128:$vj, ImmOpnd:$imm5),
29406c3fb27SDimitry Andric                  "$vd, $vj, $imm5">;
29506c3fb27SDimitry Andricclass LSX2RI6_VVVI<bits<32> op, Operand ImmOpnd = uimm6>
29606c3fb27SDimitry Andric    : Fmt2RI6_VVI<op, (outs LSX128:$dst), (ins LSX128:$vd, LSX128:$vj, ImmOpnd:$imm6),
29706c3fb27SDimitry Andric                  "$vd, $vj, $imm6">;
29806c3fb27SDimitry Andricclass LSX2RI7_VVVI<bits<32> op, Operand ImmOpnd = uimm7>
29906c3fb27SDimitry Andric    : Fmt2RI7_VVI<op, (outs LSX128:$dst), (ins LSX128:$vd, LSX128:$vj, ImmOpnd:$imm7),
30006c3fb27SDimitry Andric                  "$vd, $vj, $imm7">;
30106c3fb27SDimitry Andric
30206c3fb27SDimitry Andricclass LSX2RI8_VVVI<bits<32> op, Operand ImmOpnd = uimm8>
30306c3fb27SDimitry Andric    : Fmt2RI8_VVI<op, (outs LSX128:$dst), (ins LSX128:$vd, LSX128:$vj, ImmOpnd:$imm8),
30406c3fb27SDimitry Andric                  "$vd, $vj, $imm8">;
30506c3fb27SDimitry Andric
30606c3fb27SDimitry Andricclass LSX3R_VVVV<bits<32> op>
30706c3fb27SDimitry Andric    : Fmt3R_VVV<op, (outs LSX128:$dst), (ins LSX128:$vd, LSX128:$vj, LSX128:$vk),
30806c3fb27SDimitry Andric                "$vd, $vj, $vk">;
30906c3fb27SDimitry Andric
31006c3fb27SDimitry Andric} // Constraints = "$vd = $dst"
31106c3fb27SDimitry Andric
31206c3fb27SDimitry Andricclass LSX2RI9_Load<bits<32> op, Operand ImmOpnd = simm9_lsl3>
31306c3fb27SDimitry Andric    : Fmt2RI9_VRI<op, (outs LSX128:$vd), (ins GPR:$rj, ImmOpnd:$imm9),
31406c3fb27SDimitry Andric                  "$vd, $rj, $imm9">;
31506c3fb27SDimitry Andricclass LSX2RI10_Load<bits<32> op, Operand ImmOpnd = simm10_lsl2>
31606c3fb27SDimitry Andric    : Fmt2RI10_VRI<op, (outs LSX128:$vd), (ins GPR:$rj, ImmOpnd:$imm10),
31706c3fb27SDimitry Andric                  "$vd, $rj, $imm10">;
31806c3fb27SDimitry Andricclass LSX2RI11_Load<bits<32> op, Operand ImmOpnd = simm11_lsl1>
31906c3fb27SDimitry Andric    : Fmt2RI11_VRI<op, (outs LSX128:$vd), (ins GPR:$rj, ImmOpnd:$imm11),
32006c3fb27SDimitry Andric                  "$vd, $rj, $imm11">;
32106c3fb27SDimitry Andricclass LSX2RI12_Load<bits<32> op, Operand ImmOpnd = simm12>
32206c3fb27SDimitry Andric    : Fmt2RI12_VRI<op, (outs LSX128:$vd), (ins GPR:$rj, ImmOpnd:$imm12),
32306c3fb27SDimitry Andric                  "$vd, $rj, $imm12">;
32406c3fb27SDimitry Andricclass LSX2RI12_Store<bits<32> op, Operand ImmOpnd = simm12>
32506c3fb27SDimitry Andric    : Fmt2RI12_VRI<op, (outs), (ins LSX128:$vd, GPR:$rj, ImmOpnd:$imm12),
32606c3fb27SDimitry Andric                  "$vd, $rj, $imm12">;
32706c3fb27SDimitry Andric
32806c3fb27SDimitry Andricclass LSX3R_Load<bits<32> op>
32906c3fb27SDimitry Andric    : Fmt3R_VRR<op, (outs LSX128:$vd), (ins GPR:$rj, GPR:$rk),
33006c3fb27SDimitry Andric                "$vd, $rj, $rk">;
33106c3fb27SDimitry Andricclass LSX3R_Store<bits<32> op>
33206c3fb27SDimitry Andric    : Fmt3R_VRR<op, (outs), (ins LSX128:$vd, GPR:$rj, GPR:$rk),
33306c3fb27SDimitry Andric                "$vd, $rj, $rk">;
33406c3fb27SDimitry Andric
33506c3fb27SDimitry Andric//===----------------------------------------------------------------------===//
33606c3fb27SDimitry Andric// Instructions
33706c3fb27SDimitry Andric//===----------------------------------------------------------------------===//
33806c3fb27SDimitry Andric
33906c3fb27SDimitry Andriclet hasSideEffects = 0, Predicates = [HasExtLSX] in {
34006c3fb27SDimitry Andric
34106c3fb27SDimitry Andriclet mayLoad = 0, mayStore = 0 in {
34206c3fb27SDimitry Andric
34306c3fb27SDimitry Andricdef VADD_B : LSX3R_VVV<0x700a0000>;
34406c3fb27SDimitry Andricdef VADD_H : LSX3R_VVV<0x700a8000>;
34506c3fb27SDimitry Andricdef VADD_W : LSX3R_VVV<0x700b0000>;
34606c3fb27SDimitry Andricdef VADD_D : LSX3R_VVV<0x700b8000>;
34706c3fb27SDimitry Andricdef VADD_Q : LSX3R_VVV<0x712d0000>;
34806c3fb27SDimitry Andric
34906c3fb27SDimitry Andricdef VSUB_B : LSX3R_VVV<0x700c0000>;
35006c3fb27SDimitry Andricdef VSUB_H : LSX3R_VVV<0x700c8000>;
35106c3fb27SDimitry Andricdef VSUB_W : LSX3R_VVV<0x700d0000>;
35206c3fb27SDimitry Andricdef VSUB_D : LSX3R_VVV<0x700d8000>;
35306c3fb27SDimitry Andricdef VSUB_Q : LSX3R_VVV<0x712d8000>;
35406c3fb27SDimitry Andric
35506c3fb27SDimitry Andricdef VADDI_BU : LSX2RI5_VVI<0x728a0000>;
35606c3fb27SDimitry Andricdef VADDI_HU : LSX2RI5_VVI<0x728a8000>;
35706c3fb27SDimitry Andricdef VADDI_WU : LSX2RI5_VVI<0x728b0000>;
35806c3fb27SDimitry Andricdef VADDI_DU : LSX2RI5_VVI<0x728b8000>;
35906c3fb27SDimitry Andric
36006c3fb27SDimitry Andricdef VSUBI_BU : LSX2RI5_VVI<0x728c0000>;
36106c3fb27SDimitry Andricdef VSUBI_HU : LSX2RI5_VVI<0x728c8000>;
36206c3fb27SDimitry Andricdef VSUBI_WU : LSX2RI5_VVI<0x728d0000>;
36306c3fb27SDimitry Andricdef VSUBI_DU : LSX2RI5_VVI<0x728d8000>;
36406c3fb27SDimitry Andric
36506c3fb27SDimitry Andricdef VNEG_B : LSX2R_VV<0x729c3000>;
36606c3fb27SDimitry Andricdef VNEG_H : LSX2R_VV<0x729c3400>;
36706c3fb27SDimitry Andricdef VNEG_W : LSX2R_VV<0x729c3800>;
36806c3fb27SDimitry Andricdef VNEG_D : LSX2R_VV<0x729c3c00>;
36906c3fb27SDimitry Andric
37006c3fb27SDimitry Andricdef VSADD_B : LSX3R_VVV<0x70460000>;
37106c3fb27SDimitry Andricdef VSADD_H : LSX3R_VVV<0x70468000>;
37206c3fb27SDimitry Andricdef VSADD_W : LSX3R_VVV<0x70470000>;
37306c3fb27SDimitry Andricdef VSADD_D : LSX3R_VVV<0x70478000>;
37406c3fb27SDimitry Andricdef VSADD_BU : LSX3R_VVV<0x704a0000>;
37506c3fb27SDimitry Andricdef VSADD_HU : LSX3R_VVV<0x704a8000>;
37606c3fb27SDimitry Andricdef VSADD_WU : LSX3R_VVV<0x704b0000>;
37706c3fb27SDimitry Andricdef VSADD_DU : LSX3R_VVV<0x704b8000>;
37806c3fb27SDimitry Andric
37906c3fb27SDimitry Andricdef VSSUB_B : LSX3R_VVV<0x70480000>;
38006c3fb27SDimitry Andricdef VSSUB_H : LSX3R_VVV<0x70488000>;
38106c3fb27SDimitry Andricdef VSSUB_W : LSX3R_VVV<0x70490000>;
38206c3fb27SDimitry Andricdef VSSUB_D : LSX3R_VVV<0x70498000>;
38306c3fb27SDimitry Andricdef VSSUB_BU : LSX3R_VVV<0x704c0000>;
38406c3fb27SDimitry Andricdef VSSUB_HU : LSX3R_VVV<0x704c8000>;
38506c3fb27SDimitry Andricdef VSSUB_WU : LSX3R_VVV<0x704d0000>;
38606c3fb27SDimitry Andricdef VSSUB_DU : LSX3R_VVV<0x704d8000>;
38706c3fb27SDimitry Andric
38806c3fb27SDimitry Andricdef VHADDW_H_B : LSX3R_VVV<0x70540000>;
38906c3fb27SDimitry Andricdef VHADDW_W_H : LSX3R_VVV<0x70548000>;
39006c3fb27SDimitry Andricdef VHADDW_D_W : LSX3R_VVV<0x70550000>;
39106c3fb27SDimitry Andricdef VHADDW_Q_D : LSX3R_VVV<0x70558000>;
39206c3fb27SDimitry Andricdef VHADDW_HU_BU : LSX3R_VVV<0x70580000>;
39306c3fb27SDimitry Andricdef VHADDW_WU_HU : LSX3R_VVV<0x70588000>;
39406c3fb27SDimitry Andricdef VHADDW_DU_WU : LSX3R_VVV<0x70590000>;
39506c3fb27SDimitry Andricdef VHADDW_QU_DU : LSX3R_VVV<0x70598000>;
39606c3fb27SDimitry Andric
39706c3fb27SDimitry Andricdef VHSUBW_H_B : LSX3R_VVV<0x70560000>;
39806c3fb27SDimitry Andricdef VHSUBW_W_H : LSX3R_VVV<0x70568000>;
39906c3fb27SDimitry Andricdef VHSUBW_D_W : LSX3R_VVV<0x70570000>;
40006c3fb27SDimitry Andricdef VHSUBW_Q_D : LSX3R_VVV<0x70578000>;
40106c3fb27SDimitry Andricdef VHSUBW_HU_BU : LSX3R_VVV<0x705a0000>;
40206c3fb27SDimitry Andricdef VHSUBW_WU_HU : LSX3R_VVV<0x705a8000>;
40306c3fb27SDimitry Andricdef VHSUBW_DU_WU : LSX3R_VVV<0x705b0000>;
40406c3fb27SDimitry Andricdef VHSUBW_QU_DU : LSX3R_VVV<0x705b8000>;
40506c3fb27SDimitry Andric
40606c3fb27SDimitry Andricdef VADDWEV_H_B : LSX3R_VVV<0x701e0000>;
40706c3fb27SDimitry Andricdef VADDWEV_W_H : LSX3R_VVV<0x701e8000>;
40806c3fb27SDimitry Andricdef VADDWEV_D_W : LSX3R_VVV<0x701f0000>;
40906c3fb27SDimitry Andricdef VADDWEV_Q_D : LSX3R_VVV<0x701f8000>;
41006c3fb27SDimitry Andricdef VADDWOD_H_B : LSX3R_VVV<0x70220000>;
41106c3fb27SDimitry Andricdef VADDWOD_W_H : LSX3R_VVV<0x70228000>;
41206c3fb27SDimitry Andricdef VADDWOD_D_W : LSX3R_VVV<0x70230000>;
41306c3fb27SDimitry Andricdef VADDWOD_Q_D : LSX3R_VVV<0x70238000>;
41406c3fb27SDimitry Andric
41506c3fb27SDimitry Andricdef VSUBWEV_H_B : LSX3R_VVV<0x70200000>;
41606c3fb27SDimitry Andricdef VSUBWEV_W_H : LSX3R_VVV<0x70208000>;
41706c3fb27SDimitry Andricdef VSUBWEV_D_W : LSX3R_VVV<0x70210000>;
41806c3fb27SDimitry Andricdef VSUBWEV_Q_D : LSX3R_VVV<0x70218000>;
41906c3fb27SDimitry Andricdef VSUBWOD_H_B : LSX3R_VVV<0x70240000>;
42006c3fb27SDimitry Andricdef VSUBWOD_W_H : LSX3R_VVV<0x70248000>;
42106c3fb27SDimitry Andricdef VSUBWOD_D_W : LSX3R_VVV<0x70250000>;
42206c3fb27SDimitry Andricdef VSUBWOD_Q_D : LSX3R_VVV<0x70258000>;
42306c3fb27SDimitry Andric
42406c3fb27SDimitry Andricdef VADDWEV_H_BU : LSX3R_VVV<0x702e0000>;
42506c3fb27SDimitry Andricdef VADDWEV_W_HU : LSX3R_VVV<0x702e8000>;
42606c3fb27SDimitry Andricdef VADDWEV_D_WU : LSX3R_VVV<0x702f0000>;
42706c3fb27SDimitry Andricdef VADDWEV_Q_DU : LSX3R_VVV<0x702f8000>;
42806c3fb27SDimitry Andricdef VADDWOD_H_BU : LSX3R_VVV<0x70320000>;
42906c3fb27SDimitry Andricdef VADDWOD_W_HU : LSX3R_VVV<0x70328000>;
43006c3fb27SDimitry Andricdef VADDWOD_D_WU : LSX3R_VVV<0x70330000>;
43106c3fb27SDimitry Andricdef VADDWOD_Q_DU : LSX3R_VVV<0x70338000>;
43206c3fb27SDimitry Andric
43306c3fb27SDimitry Andricdef VSUBWEV_H_BU : LSX3R_VVV<0x70300000>;
43406c3fb27SDimitry Andricdef VSUBWEV_W_HU : LSX3R_VVV<0x70308000>;
43506c3fb27SDimitry Andricdef VSUBWEV_D_WU : LSX3R_VVV<0x70310000>;
43606c3fb27SDimitry Andricdef VSUBWEV_Q_DU : LSX3R_VVV<0x70318000>;
43706c3fb27SDimitry Andricdef VSUBWOD_H_BU : LSX3R_VVV<0x70340000>;
43806c3fb27SDimitry Andricdef VSUBWOD_W_HU : LSX3R_VVV<0x70348000>;
43906c3fb27SDimitry Andricdef VSUBWOD_D_WU : LSX3R_VVV<0x70350000>;
44006c3fb27SDimitry Andricdef VSUBWOD_Q_DU : LSX3R_VVV<0x70358000>;
44106c3fb27SDimitry Andric
44206c3fb27SDimitry Andricdef VADDWEV_H_BU_B : LSX3R_VVV<0x703e0000>;
44306c3fb27SDimitry Andricdef VADDWEV_W_HU_H : LSX3R_VVV<0x703e8000>;
44406c3fb27SDimitry Andricdef VADDWEV_D_WU_W : LSX3R_VVV<0x703f0000>;
44506c3fb27SDimitry Andricdef VADDWEV_Q_DU_D : LSX3R_VVV<0x703f8000>;
44606c3fb27SDimitry Andricdef VADDWOD_H_BU_B : LSX3R_VVV<0x70400000>;
44706c3fb27SDimitry Andricdef VADDWOD_W_HU_H : LSX3R_VVV<0x70408000>;
44806c3fb27SDimitry Andricdef VADDWOD_D_WU_W : LSX3R_VVV<0x70410000>;
44906c3fb27SDimitry Andricdef VADDWOD_Q_DU_D : LSX3R_VVV<0x70418000>;
45006c3fb27SDimitry Andric
45106c3fb27SDimitry Andricdef VAVG_B : LSX3R_VVV<0x70640000>;
45206c3fb27SDimitry Andricdef VAVG_H : LSX3R_VVV<0x70648000>;
45306c3fb27SDimitry Andricdef VAVG_W : LSX3R_VVV<0x70650000>;
45406c3fb27SDimitry Andricdef VAVG_D : LSX3R_VVV<0x70658000>;
45506c3fb27SDimitry Andricdef VAVG_BU : LSX3R_VVV<0x70660000>;
45606c3fb27SDimitry Andricdef VAVG_HU : LSX3R_VVV<0x70668000>;
45706c3fb27SDimitry Andricdef VAVG_WU : LSX3R_VVV<0x70670000>;
45806c3fb27SDimitry Andricdef VAVG_DU : LSX3R_VVV<0x70678000>;
45906c3fb27SDimitry Andricdef VAVGR_B : LSX3R_VVV<0x70680000>;
46006c3fb27SDimitry Andricdef VAVGR_H : LSX3R_VVV<0x70688000>;
46106c3fb27SDimitry Andricdef VAVGR_W : LSX3R_VVV<0x70690000>;
46206c3fb27SDimitry Andricdef VAVGR_D : LSX3R_VVV<0x70698000>;
46306c3fb27SDimitry Andricdef VAVGR_BU : LSX3R_VVV<0x706a0000>;
46406c3fb27SDimitry Andricdef VAVGR_HU : LSX3R_VVV<0x706a8000>;
46506c3fb27SDimitry Andricdef VAVGR_WU : LSX3R_VVV<0x706b0000>;
46606c3fb27SDimitry Andricdef VAVGR_DU : LSX3R_VVV<0x706b8000>;
46706c3fb27SDimitry Andric
46806c3fb27SDimitry Andricdef VABSD_B : LSX3R_VVV<0x70600000>;
46906c3fb27SDimitry Andricdef VABSD_H : LSX3R_VVV<0x70608000>;
47006c3fb27SDimitry Andricdef VABSD_W : LSX3R_VVV<0x70610000>;
47106c3fb27SDimitry Andricdef VABSD_D : LSX3R_VVV<0x70618000>;
47206c3fb27SDimitry Andricdef VABSD_BU : LSX3R_VVV<0x70620000>;
47306c3fb27SDimitry Andricdef VABSD_HU : LSX3R_VVV<0x70628000>;
47406c3fb27SDimitry Andricdef VABSD_WU : LSX3R_VVV<0x70630000>;
47506c3fb27SDimitry Andricdef VABSD_DU : LSX3R_VVV<0x70638000>;
47606c3fb27SDimitry Andric
47706c3fb27SDimitry Andricdef VADDA_B : LSX3R_VVV<0x705c0000>;
47806c3fb27SDimitry Andricdef VADDA_H : LSX3R_VVV<0x705c8000>;
47906c3fb27SDimitry Andricdef VADDA_W : LSX3R_VVV<0x705d0000>;
48006c3fb27SDimitry Andricdef VADDA_D : LSX3R_VVV<0x705d8000>;
48106c3fb27SDimitry Andric
48206c3fb27SDimitry Andricdef VMAX_B : LSX3R_VVV<0x70700000>;
48306c3fb27SDimitry Andricdef VMAX_H : LSX3R_VVV<0x70708000>;
48406c3fb27SDimitry Andricdef VMAX_W : LSX3R_VVV<0x70710000>;
48506c3fb27SDimitry Andricdef VMAX_D : LSX3R_VVV<0x70718000>;
48606c3fb27SDimitry Andricdef VMAXI_B : LSX2RI5_VVI<0x72900000, simm5>;
48706c3fb27SDimitry Andricdef VMAXI_H : LSX2RI5_VVI<0x72908000, simm5>;
48806c3fb27SDimitry Andricdef VMAXI_W : LSX2RI5_VVI<0x72910000, simm5>;
48906c3fb27SDimitry Andricdef VMAXI_D : LSX2RI5_VVI<0x72918000, simm5>;
49006c3fb27SDimitry Andricdef VMAX_BU : LSX3R_VVV<0x70740000>;
49106c3fb27SDimitry Andricdef VMAX_HU : LSX3R_VVV<0x70748000>;
49206c3fb27SDimitry Andricdef VMAX_WU : LSX3R_VVV<0x70750000>;
49306c3fb27SDimitry Andricdef VMAX_DU : LSX3R_VVV<0x70758000>;
49406c3fb27SDimitry Andricdef VMAXI_BU : LSX2RI5_VVI<0x72940000>;
49506c3fb27SDimitry Andricdef VMAXI_HU : LSX2RI5_VVI<0x72948000>;
49606c3fb27SDimitry Andricdef VMAXI_WU : LSX2RI5_VVI<0x72950000>;
49706c3fb27SDimitry Andricdef VMAXI_DU : LSX2RI5_VVI<0x72958000>;
49806c3fb27SDimitry Andric
49906c3fb27SDimitry Andricdef VMIN_B : LSX3R_VVV<0x70720000>;
50006c3fb27SDimitry Andricdef VMIN_H : LSX3R_VVV<0x70728000>;
50106c3fb27SDimitry Andricdef VMIN_W : LSX3R_VVV<0x70730000>;
50206c3fb27SDimitry Andricdef VMIN_D : LSX3R_VVV<0x70738000>;
50306c3fb27SDimitry Andricdef VMINI_B : LSX2RI5_VVI<0x72920000, simm5>;
50406c3fb27SDimitry Andricdef VMINI_H : LSX2RI5_VVI<0x72928000, simm5>;
50506c3fb27SDimitry Andricdef VMINI_W : LSX2RI5_VVI<0x72930000, simm5>;
50606c3fb27SDimitry Andricdef VMINI_D : LSX2RI5_VVI<0x72938000, simm5>;
50706c3fb27SDimitry Andricdef VMIN_BU : LSX3R_VVV<0x70760000>;
50806c3fb27SDimitry Andricdef VMIN_HU : LSX3R_VVV<0x70768000>;
50906c3fb27SDimitry Andricdef VMIN_WU : LSX3R_VVV<0x70770000>;
51006c3fb27SDimitry Andricdef VMIN_DU : LSX3R_VVV<0x70778000>;
51106c3fb27SDimitry Andricdef VMINI_BU : LSX2RI5_VVI<0x72960000>;
51206c3fb27SDimitry Andricdef VMINI_HU : LSX2RI5_VVI<0x72968000>;
51306c3fb27SDimitry Andricdef VMINI_WU : LSX2RI5_VVI<0x72970000>;
51406c3fb27SDimitry Andricdef VMINI_DU : LSX2RI5_VVI<0x72978000>;
51506c3fb27SDimitry Andric
51606c3fb27SDimitry Andricdef VMUL_B : LSX3R_VVV<0x70840000>;
51706c3fb27SDimitry Andricdef VMUL_H : LSX3R_VVV<0x70848000>;
51806c3fb27SDimitry Andricdef VMUL_W : LSX3R_VVV<0x70850000>;
51906c3fb27SDimitry Andricdef VMUL_D : LSX3R_VVV<0x70858000>;
52006c3fb27SDimitry Andric
52106c3fb27SDimitry Andricdef VMUH_B : LSX3R_VVV<0x70860000>;
52206c3fb27SDimitry Andricdef VMUH_H : LSX3R_VVV<0x70868000>;
52306c3fb27SDimitry Andricdef VMUH_W : LSX3R_VVV<0x70870000>;
52406c3fb27SDimitry Andricdef VMUH_D : LSX3R_VVV<0x70878000>;
52506c3fb27SDimitry Andricdef VMUH_BU : LSX3R_VVV<0x70880000>;
52606c3fb27SDimitry Andricdef VMUH_HU : LSX3R_VVV<0x70888000>;
52706c3fb27SDimitry Andricdef VMUH_WU : LSX3R_VVV<0x70890000>;
52806c3fb27SDimitry Andricdef VMUH_DU : LSX3R_VVV<0x70898000>;
52906c3fb27SDimitry Andric
53006c3fb27SDimitry Andricdef VMULWEV_H_B : LSX3R_VVV<0x70900000>;
53106c3fb27SDimitry Andricdef VMULWEV_W_H : LSX3R_VVV<0x70908000>;
53206c3fb27SDimitry Andricdef VMULWEV_D_W : LSX3R_VVV<0x70910000>;
53306c3fb27SDimitry Andricdef VMULWEV_Q_D : LSX3R_VVV<0x70918000>;
53406c3fb27SDimitry Andricdef VMULWOD_H_B : LSX3R_VVV<0x70920000>;
53506c3fb27SDimitry Andricdef VMULWOD_W_H : LSX3R_VVV<0x70928000>;
53606c3fb27SDimitry Andricdef VMULWOD_D_W : LSX3R_VVV<0x70930000>;
53706c3fb27SDimitry Andricdef VMULWOD_Q_D : LSX3R_VVV<0x70938000>;
53806c3fb27SDimitry Andricdef VMULWEV_H_BU : LSX3R_VVV<0x70980000>;
53906c3fb27SDimitry Andricdef VMULWEV_W_HU : LSX3R_VVV<0x70988000>;
54006c3fb27SDimitry Andricdef VMULWEV_D_WU : LSX3R_VVV<0x70990000>;
54106c3fb27SDimitry Andricdef VMULWEV_Q_DU : LSX3R_VVV<0x70998000>;
54206c3fb27SDimitry Andricdef VMULWOD_H_BU : LSX3R_VVV<0x709a0000>;
54306c3fb27SDimitry Andricdef VMULWOD_W_HU : LSX3R_VVV<0x709a8000>;
54406c3fb27SDimitry Andricdef VMULWOD_D_WU : LSX3R_VVV<0x709b0000>;
54506c3fb27SDimitry Andricdef VMULWOD_Q_DU : LSX3R_VVV<0x709b8000>;
54606c3fb27SDimitry Andricdef VMULWEV_H_BU_B : LSX3R_VVV<0x70a00000>;
54706c3fb27SDimitry Andricdef VMULWEV_W_HU_H : LSX3R_VVV<0x70a08000>;
54806c3fb27SDimitry Andricdef VMULWEV_D_WU_W : LSX3R_VVV<0x70a10000>;
54906c3fb27SDimitry Andricdef VMULWEV_Q_DU_D : LSX3R_VVV<0x70a18000>;
55006c3fb27SDimitry Andricdef VMULWOD_H_BU_B : LSX3R_VVV<0x70a20000>;
55106c3fb27SDimitry Andricdef VMULWOD_W_HU_H : LSX3R_VVV<0x70a28000>;
55206c3fb27SDimitry Andricdef VMULWOD_D_WU_W : LSX3R_VVV<0x70a30000>;
55306c3fb27SDimitry Andricdef VMULWOD_Q_DU_D : LSX3R_VVV<0x70a38000>;
55406c3fb27SDimitry Andric
55506c3fb27SDimitry Andricdef VMADD_B : LSX3R_VVVV<0x70a80000>;
55606c3fb27SDimitry Andricdef VMADD_H : LSX3R_VVVV<0x70a88000>;
55706c3fb27SDimitry Andricdef VMADD_W : LSX3R_VVVV<0x70a90000>;
55806c3fb27SDimitry Andricdef VMADD_D : LSX3R_VVVV<0x70a98000>;
55906c3fb27SDimitry Andric
56006c3fb27SDimitry Andricdef VMSUB_B : LSX3R_VVVV<0x70aa0000>;
56106c3fb27SDimitry Andricdef VMSUB_H : LSX3R_VVVV<0x70aa8000>;
56206c3fb27SDimitry Andricdef VMSUB_W : LSX3R_VVVV<0x70ab0000>;
56306c3fb27SDimitry Andricdef VMSUB_D : LSX3R_VVVV<0x70ab8000>;
56406c3fb27SDimitry Andric
56506c3fb27SDimitry Andricdef VMADDWEV_H_B : LSX3R_VVVV<0x70ac0000>;
56606c3fb27SDimitry Andricdef VMADDWEV_W_H : LSX3R_VVVV<0x70ac8000>;
56706c3fb27SDimitry Andricdef VMADDWEV_D_W : LSX3R_VVVV<0x70ad0000>;
56806c3fb27SDimitry Andricdef VMADDWEV_Q_D : LSX3R_VVVV<0x70ad8000>;
56906c3fb27SDimitry Andricdef VMADDWOD_H_B : LSX3R_VVVV<0x70ae0000>;
57006c3fb27SDimitry Andricdef VMADDWOD_W_H : LSX3R_VVVV<0x70ae8000>;
57106c3fb27SDimitry Andricdef VMADDWOD_D_W : LSX3R_VVVV<0x70af0000>;
57206c3fb27SDimitry Andricdef VMADDWOD_Q_D : LSX3R_VVVV<0x70af8000>;
57306c3fb27SDimitry Andricdef VMADDWEV_H_BU : LSX3R_VVVV<0x70b40000>;
57406c3fb27SDimitry Andricdef VMADDWEV_W_HU : LSX3R_VVVV<0x70b48000>;
57506c3fb27SDimitry Andricdef VMADDWEV_D_WU : LSX3R_VVVV<0x70b50000>;
57606c3fb27SDimitry Andricdef VMADDWEV_Q_DU : LSX3R_VVVV<0x70b58000>;
57706c3fb27SDimitry Andricdef VMADDWOD_H_BU : LSX3R_VVVV<0x70b60000>;
57806c3fb27SDimitry Andricdef VMADDWOD_W_HU : LSX3R_VVVV<0x70b68000>;
57906c3fb27SDimitry Andricdef VMADDWOD_D_WU : LSX3R_VVVV<0x70b70000>;
58006c3fb27SDimitry Andricdef VMADDWOD_Q_DU : LSX3R_VVVV<0x70b78000>;
58106c3fb27SDimitry Andricdef VMADDWEV_H_BU_B : LSX3R_VVVV<0x70bc0000>;
58206c3fb27SDimitry Andricdef VMADDWEV_W_HU_H : LSX3R_VVVV<0x70bc8000>;
58306c3fb27SDimitry Andricdef VMADDWEV_D_WU_W : LSX3R_VVVV<0x70bd0000>;
58406c3fb27SDimitry Andricdef VMADDWEV_Q_DU_D : LSX3R_VVVV<0x70bd8000>;
58506c3fb27SDimitry Andricdef VMADDWOD_H_BU_B : LSX3R_VVVV<0x70be0000>;
58606c3fb27SDimitry Andricdef VMADDWOD_W_HU_H : LSX3R_VVVV<0x70be8000>;
58706c3fb27SDimitry Andricdef VMADDWOD_D_WU_W : LSX3R_VVVV<0x70bf0000>;
58806c3fb27SDimitry Andricdef VMADDWOD_Q_DU_D : LSX3R_VVVV<0x70bf8000>;
58906c3fb27SDimitry Andric
59006c3fb27SDimitry Andricdef VDIV_B : LSX3R_VVV<0x70e00000>;
59106c3fb27SDimitry Andricdef VDIV_H : LSX3R_VVV<0x70e08000>;
59206c3fb27SDimitry Andricdef VDIV_W : LSX3R_VVV<0x70e10000>;
59306c3fb27SDimitry Andricdef VDIV_D : LSX3R_VVV<0x70e18000>;
59406c3fb27SDimitry Andricdef VDIV_BU : LSX3R_VVV<0x70e40000>;
59506c3fb27SDimitry Andricdef VDIV_HU : LSX3R_VVV<0x70e48000>;
59606c3fb27SDimitry Andricdef VDIV_WU : LSX3R_VVV<0x70e50000>;
59706c3fb27SDimitry Andricdef VDIV_DU : LSX3R_VVV<0x70e58000>;
59806c3fb27SDimitry Andric
59906c3fb27SDimitry Andricdef VMOD_B : LSX3R_VVV<0x70e20000>;
60006c3fb27SDimitry Andricdef VMOD_H : LSX3R_VVV<0x70e28000>;
60106c3fb27SDimitry Andricdef VMOD_W : LSX3R_VVV<0x70e30000>;
60206c3fb27SDimitry Andricdef VMOD_D : LSX3R_VVV<0x70e38000>;
60306c3fb27SDimitry Andricdef VMOD_BU : LSX3R_VVV<0x70e60000>;
60406c3fb27SDimitry Andricdef VMOD_HU : LSX3R_VVV<0x70e68000>;
60506c3fb27SDimitry Andricdef VMOD_WU : LSX3R_VVV<0x70e70000>;
60606c3fb27SDimitry Andricdef VMOD_DU : LSX3R_VVV<0x70e78000>;
60706c3fb27SDimitry Andric
60806c3fb27SDimitry Andricdef VSAT_B : LSX2RI3_VVI<0x73242000>;
60906c3fb27SDimitry Andricdef VSAT_H : LSX2RI4_VVI<0x73244000>;
61006c3fb27SDimitry Andricdef VSAT_W : LSX2RI5_VVI<0x73248000>;
61106c3fb27SDimitry Andricdef VSAT_D : LSX2RI6_VVI<0x73250000>;
61206c3fb27SDimitry Andricdef VSAT_BU : LSX2RI3_VVI<0x73282000>;
61306c3fb27SDimitry Andricdef VSAT_HU : LSX2RI4_VVI<0x73284000>;
61406c3fb27SDimitry Andricdef VSAT_WU : LSX2RI5_VVI<0x73288000>;
61506c3fb27SDimitry Andricdef VSAT_DU : LSX2RI6_VVI<0x73290000>;
61606c3fb27SDimitry Andric
61706c3fb27SDimitry Andricdef VEXTH_H_B : LSX2R_VV<0x729ee000>;
61806c3fb27SDimitry Andricdef VEXTH_W_H : LSX2R_VV<0x729ee400>;
61906c3fb27SDimitry Andricdef VEXTH_D_W : LSX2R_VV<0x729ee800>;
62006c3fb27SDimitry Andricdef VEXTH_Q_D : LSX2R_VV<0x729eec00>;
62106c3fb27SDimitry Andricdef VEXTH_HU_BU : LSX2R_VV<0x729ef000>;
62206c3fb27SDimitry Andricdef VEXTH_WU_HU : LSX2R_VV<0x729ef400>;
62306c3fb27SDimitry Andricdef VEXTH_DU_WU : LSX2R_VV<0x729ef800>;
62406c3fb27SDimitry Andricdef VEXTH_QU_DU : LSX2R_VV<0x729efc00>;
62506c3fb27SDimitry Andric
62606c3fb27SDimitry Andricdef VSIGNCOV_B : LSX3R_VVV<0x712e0000>;
62706c3fb27SDimitry Andricdef VSIGNCOV_H : LSX3R_VVV<0x712e8000>;
62806c3fb27SDimitry Andricdef VSIGNCOV_W : LSX3R_VVV<0x712f0000>;
62906c3fb27SDimitry Andricdef VSIGNCOV_D : LSX3R_VVV<0x712f8000>;
63006c3fb27SDimitry Andric
63106c3fb27SDimitry Andricdef VMSKLTZ_B : LSX2R_VV<0x729c4000>;
63206c3fb27SDimitry Andricdef VMSKLTZ_H : LSX2R_VV<0x729c4400>;
63306c3fb27SDimitry Andricdef VMSKLTZ_W : LSX2R_VV<0x729c4800>;
63406c3fb27SDimitry Andricdef VMSKLTZ_D : LSX2R_VV<0x729c4c00>;
63506c3fb27SDimitry Andric
63606c3fb27SDimitry Andricdef VMSKGEZ_B : LSX2R_VV<0x729c5000>;
63706c3fb27SDimitry Andric
63806c3fb27SDimitry Andricdef VMSKNZ_B : LSX2R_VV<0x729c6000>;
63906c3fb27SDimitry Andric
64006c3fb27SDimitry Andricdef VLDI : LSX1RI13_VI<0x73e00000>;
64106c3fb27SDimitry Andric
64206c3fb27SDimitry Andricdef VAND_V : LSX3R_VVV<0x71260000>;
64306c3fb27SDimitry Andricdef VOR_V : LSX3R_VVV<0x71268000>;
64406c3fb27SDimitry Andricdef VXOR_V : LSX3R_VVV<0x71270000>;
64506c3fb27SDimitry Andricdef VNOR_V : LSX3R_VVV<0x71278000>;
64606c3fb27SDimitry Andricdef VANDN_V : LSX3R_VVV<0x71280000>;
64706c3fb27SDimitry Andricdef VORN_V : LSX3R_VVV<0x71288000>;
64806c3fb27SDimitry Andric
64906c3fb27SDimitry Andricdef VANDI_B : LSX2RI8_VVI<0x73d00000>;
65006c3fb27SDimitry Andricdef VORI_B : LSX2RI8_VVI<0x73d40000>;
65106c3fb27SDimitry Andricdef VXORI_B : LSX2RI8_VVI<0x73d80000>;
65206c3fb27SDimitry Andricdef VNORI_B : LSX2RI8_VVI<0x73dc0000>;
65306c3fb27SDimitry Andric
65406c3fb27SDimitry Andricdef VSLL_B : LSX3R_VVV<0x70e80000>;
65506c3fb27SDimitry Andricdef VSLL_H : LSX3R_VVV<0x70e88000>;
65606c3fb27SDimitry Andricdef VSLL_W : LSX3R_VVV<0x70e90000>;
65706c3fb27SDimitry Andricdef VSLL_D : LSX3R_VVV<0x70e98000>;
65806c3fb27SDimitry Andricdef VSLLI_B : LSX2RI3_VVI<0x732c2000>;
65906c3fb27SDimitry Andricdef VSLLI_H : LSX2RI4_VVI<0x732c4000>;
66006c3fb27SDimitry Andricdef VSLLI_W : LSX2RI5_VVI<0x732c8000>;
66106c3fb27SDimitry Andricdef VSLLI_D : LSX2RI6_VVI<0x732d0000>;
66206c3fb27SDimitry Andric
66306c3fb27SDimitry Andricdef VSRL_B : LSX3R_VVV<0x70ea0000>;
66406c3fb27SDimitry Andricdef VSRL_H : LSX3R_VVV<0x70ea8000>;
66506c3fb27SDimitry Andricdef VSRL_W : LSX3R_VVV<0x70eb0000>;
66606c3fb27SDimitry Andricdef VSRL_D : LSX3R_VVV<0x70eb8000>;
66706c3fb27SDimitry Andricdef VSRLI_B : LSX2RI3_VVI<0x73302000>;
66806c3fb27SDimitry Andricdef VSRLI_H : LSX2RI4_VVI<0x73304000>;
66906c3fb27SDimitry Andricdef VSRLI_W : LSX2RI5_VVI<0x73308000>;
67006c3fb27SDimitry Andricdef VSRLI_D : LSX2RI6_VVI<0x73310000>;
67106c3fb27SDimitry Andric
67206c3fb27SDimitry Andricdef VSRA_B : LSX3R_VVV<0x70ec0000>;
67306c3fb27SDimitry Andricdef VSRA_H : LSX3R_VVV<0x70ec8000>;
67406c3fb27SDimitry Andricdef VSRA_W : LSX3R_VVV<0x70ed0000>;
67506c3fb27SDimitry Andricdef VSRA_D : LSX3R_VVV<0x70ed8000>;
67606c3fb27SDimitry Andricdef VSRAI_B : LSX2RI3_VVI<0x73342000>;
67706c3fb27SDimitry Andricdef VSRAI_H : LSX2RI4_VVI<0x73344000>;
67806c3fb27SDimitry Andricdef VSRAI_W : LSX2RI5_VVI<0x73348000>;
67906c3fb27SDimitry Andricdef VSRAI_D : LSX2RI6_VVI<0x73350000>;
68006c3fb27SDimitry Andric
68106c3fb27SDimitry Andricdef VROTR_B : LSX3R_VVV<0x70ee0000>;
68206c3fb27SDimitry Andricdef VROTR_H : LSX3R_VVV<0x70ee8000>;
68306c3fb27SDimitry Andricdef VROTR_W : LSX3R_VVV<0x70ef0000>;
68406c3fb27SDimitry Andricdef VROTR_D : LSX3R_VVV<0x70ef8000>;
68506c3fb27SDimitry Andricdef VROTRI_B : LSX2RI3_VVI<0x72a02000>;
68606c3fb27SDimitry Andricdef VROTRI_H : LSX2RI4_VVI<0x72a04000>;
68706c3fb27SDimitry Andricdef VROTRI_W : LSX2RI5_VVI<0x72a08000>;
68806c3fb27SDimitry Andricdef VROTRI_D : LSX2RI6_VVI<0x72a10000>;
68906c3fb27SDimitry Andric
69006c3fb27SDimitry Andricdef VSLLWIL_H_B : LSX2RI3_VVI<0x73082000>;
69106c3fb27SDimitry Andricdef VSLLWIL_W_H : LSX2RI4_VVI<0x73084000>;
69206c3fb27SDimitry Andricdef VSLLWIL_D_W : LSX2RI5_VVI<0x73088000>;
69306c3fb27SDimitry Andricdef VEXTL_Q_D : LSX2R_VV<0x73090000>;
69406c3fb27SDimitry Andricdef VSLLWIL_HU_BU : LSX2RI3_VVI<0x730c2000>;
69506c3fb27SDimitry Andricdef VSLLWIL_WU_HU : LSX2RI4_VVI<0x730c4000>;
69606c3fb27SDimitry Andricdef VSLLWIL_DU_WU : LSX2RI5_VVI<0x730c8000>;
69706c3fb27SDimitry Andricdef VEXTL_QU_DU : LSX2R_VV<0x730d0000>;
69806c3fb27SDimitry Andric
69906c3fb27SDimitry Andricdef VSRLR_B : LSX3R_VVV<0x70f00000>;
70006c3fb27SDimitry Andricdef VSRLR_H : LSX3R_VVV<0x70f08000>;
70106c3fb27SDimitry Andricdef VSRLR_W : LSX3R_VVV<0x70f10000>;
70206c3fb27SDimitry Andricdef VSRLR_D : LSX3R_VVV<0x70f18000>;
70306c3fb27SDimitry Andricdef VSRLRI_B : LSX2RI3_VVI<0x72a42000>;
70406c3fb27SDimitry Andricdef VSRLRI_H : LSX2RI4_VVI<0x72a44000>;
70506c3fb27SDimitry Andricdef VSRLRI_W : LSX2RI5_VVI<0x72a48000>;
70606c3fb27SDimitry Andricdef VSRLRI_D : LSX2RI6_VVI<0x72a50000>;
70706c3fb27SDimitry Andric
70806c3fb27SDimitry Andricdef VSRAR_B : LSX3R_VVV<0x70f20000>;
70906c3fb27SDimitry Andricdef VSRAR_H : LSX3R_VVV<0x70f28000>;
71006c3fb27SDimitry Andricdef VSRAR_W : LSX3R_VVV<0x70f30000>;
71106c3fb27SDimitry Andricdef VSRAR_D : LSX3R_VVV<0x70f38000>;
71206c3fb27SDimitry Andricdef VSRARI_B : LSX2RI3_VVI<0x72a82000>;
71306c3fb27SDimitry Andricdef VSRARI_H : LSX2RI4_VVI<0x72a84000>;
71406c3fb27SDimitry Andricdef VSRARI_W : LSX2RI5_VVI<0x72a88000>;
71506c3fb27SDimitry Andricdef VSRARI_D : LSX2RI6_VVI<0x72a90000>;
71606c3fb27SDimitry Andric
71706c3fb27SDimitry Andricdef VSRLN_B_H : LSX3R_VVV<0x70f48000>;
71806c3fb27SDimitry Andricdef VSRLN_H_W : LSX3R_VVV<0x70f50000>;
71906c3fb27SDimitry Andricdef VSRLN_W_D : LSX3R_VVV<0x70f58000>;
72006c3fb27SDimitry Andricdef VSRAN_B_H : LSX3R_VVV<0x70f68000>;
72106c3fb27SDimitry Andricdef VSRAN_H_W : LSX3R_VVV<0x70f70000>;
72206c3fb27SDimitry Andricdef VSRAN_W_D : LSX3R_VVV<0x70f78000>;
72306c3fb27SDimitry Andric
72406c3fb27SDimitry Andricdef VSRLNI_B_H : LSX2RI4_VVVI<0x73404000>;
72506c3fb27SDimitry Andricdef VSRLNI_H_W : LSX2RI5_VVVI<0x73408000>;
72606c3fb27SDimitry Andricdef VSRLNI_W_D : LSX2RI6_VVVI<0x73410000>;
72706c3fb27SDimitry Andricdef VSRLNI_D_Q : LSX2RI7_VVVI<0x73420000>;
72806c3fb27SDimitry Andricdef VSRANI_B_H : LSX2RI4_VVVI<0x73584000>;
72906c3fb27SDimitry Andricdef VSRANI_H_W : LSX2RI5_VVVI<0x73588000>;
73006c3fb27SDimitry Andricdef VSRANI_W_D : LSX2RI6_VVVI<0x73590000>;
73106c3fb27SDimitry Andricdef VSRANI_D_Q : LSX2RI7_VVVI<0x735a0000>;
73206c3fb27SDimitry Andric
73306c3fb27SDimitry Andricdef VSRLRN_B_H : LSX3R_VVV<0x70f88000>;
73406c3fb27SDimitry Andricdef VSRLRN_H_W : LSX3R_VVV<0x70f90000>;
73506c3fb27SDimitry Andricdef VSRLRN_W_D : LSX3R_VVV<0x70f98000>;
73606c3fb27SDimitry Andricdef VSRARN_B_H : LSX3R_VVV<0x70fa8000>;
73706c3fb27SDimitry Andricdef VSRARN_H_W : LSX3R_VVV<0x70fb0000>;
73806c3fb27SDimitry Andricdef VSRARN_W_D : LSX3R_VVV<0x70fb8000>;
73906c3fb27SDimitry Andric
74006c3fb27SDimitry Andricdef VSRLRNI_B_H : LSX2RI4_VVVI<0x73444000>;
74106c3fb27SDimitry Andricdef VSRLRNI_H_W : LSX2RI5_VVVI<0x73448000>;
74206c3fb27SDimitry Andricdef VSRLRNI_W_D : LSX2RI6_VVVI<0x73450000>;
74306c3fb27SDimitry Andricdef VSRLRNI_D_Q : LSX2RI7_VVVI<0x73460000>;
74406c3fb27SDimitry Andricdef VSRARNI_B_H : LSX2RI4_VVVI<0x735c4000>;
74506c3fb27SDimitry Andricdef VSRARNI_H_W : LSX2RI5_VVVI<0x735c8000>;
74606c3fb27SDimitry Andricdef VSRARNI_W_D : LSX2RI6_VVVI<0x735d0000>;
74706c3fb27SDimitry Andricdef VSRARNI_D_Q : LSX2RI7_VVVI<0x735e0000>;
74806c3fb27SDimitry Andric
74906c3fb27SDimitry Andricdef VSSRLN_B_H : LSX3R_VVV<0x70fc8000>;
75006c3fb27SDimitry Andricdef VSSRLN_H_W : LSX3R_VVV<0x70fd0000>;
75106c3fb27SDimitry Andricdef VSSRLN_W_D : LSX3R_VVV<0x70fd8000>;
75206c3fb27SDimitry Andricdef VSSRAN_B_H : LSX3R_VVV<0x70fe8000>;
75306c3fb27SDimitry Andricdef VSSRAN_H_W : LSX3R_VVV<0x70ff0000>;
75406c3fb27SDimitry Andricdef VSSRAN_W_D : LSX3R_VVV<0x70ff8000>;
75506c3fb27SDimitry Andricdef VSSRLN_BU_H : LSX3R_VVV<0x71048000>;
75606c3fb27SDimitry Andricdef VSSRLN_HU_W : LSX3R_VVV<0x71050000>;
75706c3fb27SDimitry Andricdef VSSRLN_WU_D : LSX3R_VVV<0x71058000>;
75806c3fb27SDimitry Andricdef VSSRAN_BU_H : LSX3R_VVV<0x71068000>;
75906c3fb27SDimitry Andricdef VSSRAN_HU_W : LSX3R_VVV<0x71070000>;
76006c3fb27SDimitry Andricdef VSSRAN_WU_D : LSX3R_VVV<0x71078000>;
76106c3fb27SDimitry Andric
76206c3fb27SDimitry Andricdef VSSRLNI_B_H : LSX2RI4_VVVI<0x73484000>;
76306c3fb27SDimitry Andricdef VSSRLNI_H_W : LSX2RI5_VVVI<0x73488000>;
76406c3fb27SDimitry Andricdef VSSRLNI_W_D : LSX2RI6_VVVI<0x73490000>;
76506c3fb27SDimitry Andricdef VSSRLNI_D_Q : LSX2RI7_VVVI<0x734a0000>;
76606c3fb27SDimitry Andricdef VSSRANI_B_H : LSX2RI4_VVVI<0x73604000>;
76706c3fb27SDimitry Andricdef VSSRANI_H_W : LSX2RI5_VVVI<0x73608000>;
76806c3fb27SDimitry Andricdef VSSRANI_W_D : LSX2RI6_VVVI<0x73610000>;
76906c3fb27SDimitry Andricdef VSSRANI_D_Q : LSX2RI7_VVVI<0x73620000>;
77006c3fb27SDimitry Andricdef VSSRLNI_BU_H : LSX2RI4_VVVI<0x734c4000>;
77106c3fb27SDimitry Andricdef VSSRLNI_HU_W : LSX2RI5_VVVI<0x734c8000>;
77206c3fb27SDimitry Andricdef VSSRLNI_WU_D : LSX2RI6_VVVI<0x734d0000>;
77306c3fb27SDimitry Andricdef VSSRLNI_DU_Q : LSX2RI7_VVVI<0x734e0000>;
77406c3fb27SDimitry Andricdef VSSRANI_BU_H : LSX2RI4_VVVI<0x73644000>;
77506c3fb27SDimitry Andricdef VSSRANI_HU_W : LSX2RI5_VVVI<0x73648000>;
77606c3fb27SDimitry Andricdef VSSRANI_WU_D : LSX2RI6_VVVI<0x73650000>;
77706c3fb27SDimitry Andricdef VSSRANI_DU_Q : LSX2RI7_VVVI<0x73660000>;
77806c3fb27SDimitry Andric
77906c3fb27SDimitry Andricdef VSSRLRN_B_H : LSX3R_VVV<0x71008000>;
78006c3fb27SDimitry Andricdef VSSRLRN_H_W : LSX3R_VVV<0x71010000>;
78106c3fb27SDimitry Andricdef VSSRLRN_W_D : LSX3R_VVV<0x71018000>;
78206c3fb27SDimitry Andricdef VSSRARN_B_H : LSX3R_VVV<0x71028000>;
78306c3fb27SDimitry Andricdef VSSRARN_H_W : LSX3R_VVV<0x71030000>;
78406c3fb27SDimitry Andricdef VSSRARN_W_D : LSX3R_VVV<0x71038000>;
78506c3fb27SDimitry Andricdef VSSRLRN_BU_H : LSX3R_VVV<0x71088000>;
78606c3fb27SDimitry Andricdef VSSRLRN_HU_W : LSX3R_VVV<0x71090000>;
78706c3fb27SDimitry Andricdef VSSRLRN_WU_D : LSX3R_VVV<0x71098000>;
78806c3fb27SDimitry Andricdef VSSRARN_BU_H : LSX3R_VVV<0x710a8000>;
78906c3fb27SDimitry Andricdef VSSRARN_HU_W : LSX3R_VVV<0x710b0000>;
79006c3fb27SDimitry Andricdef VSSRARN_WU_D : LSX3R_VVV<0x710b8000>;
79106c3fb27SDimitry Andric
79206c3fb27SDimitry Andricdef VSSRLRNI_B_H : LSX2RI4_VVVI<0x73504000>;
79306c3fb27SDimitry Andricdef VSSRLRNI_H_W : LSX2RI5_VVVI<0x73508000>;
79406c3fb27SDimitry Andricdef VSSRLRNI_W_D : LSX2RI6_VVVI<0x73510000>;
79506c3fb27SDimitry Andricdef VSSRLRNI_D_Q : LSX2RI7_VVVI<0x73520000>;
79606c3fb27SDimitry Andricdef VSSRARNI_B_H : LSX2RI4_VVVI<0x73684000>;
79706c3fb27SDimitry Andricdef VSSRARNI_H_W : LSX2RI5_VVVI<0x73688000>;
79806c3fb27SDimitry Andricdef VSSRARNI_W_D : LSX2RI6_VVVI<0x73690000>;
79906c3fb27SDimitry Andricdef VSSRARNI_D_Q : LSX2RI7_VVVI<0x736a0000>;
80006c3fb27SDimitry Andricdef VSSRLRNI_BU_H : LSX2RI4_VVVI<0x73544000>;
80106c3fb27SDimitry Andricdef VSSRLRNI_HU_W : LSX2RI5_VVVI<0x73548000>;
80206c3fb27SDimitry Andricdef VSSRLRNI_WU_D : LSX2RI6_VVVI<0x73550000>;
80306c3fb27SDimitry Andricdef VSSRLRNI_DU_Q : LSX2RI7_VVVI<0x73560000>;
80406c3fb27SDimitry Andricdef VSSRARNI_BU_H : LSX2RI4_VVVI<0x736c4000>;
80506c3fb27SDimitry Andricdef VSSRARNI_HU_W : LSX2RI5_VVVI<0x736c8000>;
80606c3fb27SDimitry Andricdef VSSRARNI_WU_D : LSX2RI6_VVVI<0x736d0000>;
80706c3fb27SDimitry Andricdef VSSRARNI_DU_Q : LSX2RI7_VVVI<0x736e0000>;
80806c3fb27SDimitry Andric
80906c3fb27SDimitry Andricdef VCLO_B : LSX2R_VV<0x729c0000>;
81006c3fb27SDimitry Andricdef VCLO_H : LSX2R_VV<0x729c0400>;
81106c3fb27SDimitry Andricdef VCLO_W : LSX2R_VV<0x729c0800>;
81206c3fb27SDimitry Andricdef VCLO_D : LSX2R_VV<0x729c0c00>;
81306c3fb27SDimitry Andricdef VCLZ_B : LSX2R_VV<0x729c1000>;
81406c3fb27SDimitry Andricdef VCLZ_H : LSX2R_VV<0x729c1400>;
81506c3fb27SDimitry Andricdef VCLZ_W : LSX2R_VV<0x729c1800>;
81606c3fb27SDimitry Andricdef VCLZ_D : LSX2R_VV<0x729c1c00>;
81706c3fb27SDimitry Andric
81806c3fb27SDimitry Andricdef VPCNT_B : LSX2R_VV<0x729c2000>;
81906c3fb27SDimitry Andricdef VPCNT_H : LSX2R_VV<0x729c2400>;
82006c3fb27SDimitry Andricdef VPCNT_W : LSX2R_VV<0x729c2800>;
82106c3fb27SDimitry Andricdef VPCNT_D : LSX2R_VV<0x729c2c00>;
82206c3fb27SDimitry Andric
82306c3fb27SDimitry Andricdef VBITCLR_B : LSX3R_VVV<0x710c0000>;
82406c3fb27SDimitry Andricdef VBITCLR_H : LSX3R_VVV<0x710c8000>;
82506c3fb27SDimitry Andricdef VBITCLR_W : LSX3R_VVV<0x710d0000>;
82606c3fb27SDimitry Andricdef VBITCLR_D : LSX3R_VVV<0x710d8000>;
82706c3fb27SDimitry Andricdef VBITCLRI_B : LSX2RI3_VVI<0x73102000>;
82806c3fb27SDimitry Andricdef VBITCLRI_H : LSX2RI4_VVI<0x73104000>;
82906c3fb27SDimitry Andricdef VBITCLRI_W : LSX2RI5_VVI<0x73108000>;
83006c3fb27SDimitry Andricdef VBITCLRI_D : LSX2RI6_VVI<0x73110000>;
83106c3fb27SDimitry Andric
83206c3fb27SDimitry Andricdef VBITSET_B : LSX3R_VVV<0x710e0000>;
83306c3fb27SDimitry Andricdef VBITSET_H : LSX3R_VVV<0x710e8000>;
83406c3fb27SDimitry Andricdef VBITSET_W : LSX3R_VVV<0x710f0000>;
83506c3fb27SDimitry Andricdef VBITSET_D : LSX3R_VVV<0x710f8000>;
83606c3fb27SDimitry Andricdef VBITSETI_B : LSX2RI3_VVI<0x73142000>;
83706c3fb27SDimitry Andricdef VBITSETI_H : LSX2RI4_VVI<0x73144000>;
83806c3fb27SDimitry Andricdef VBITSETI_W : LSX2RI5_VVI<0x73148000>;
83906c3fb27SDimitry Andricdef VBITSETI_D : LSX2RI6_VVI<0x73150000>;
84006c3fb27SDimitry Andric
84106c3fb27SDimitry Andricdef VBITREV_B : LSX3R_VVV<0x71100000>;
84206c3fb27SDimitry Andricdef VBITREV_H : LSX3R_VVV<0x71108000>;
84306c3fb27SDimitry Andricdef VBITREV_W : LSX3R_VVV<0x71110000>;
84406c3fb27SDimitry Andricdef VBITREV_D : LSX3R_VVV<0x71118000>;
84506c3fb27SDimitry Andricdef VBITREVI_B : LSX2RI3_VVI<0x73182000>;
84606c3fb27SDimitry Andricdef VBITREVI_H : LSX2RI4_VVI<0x73184000>;
84706c3fb27SDimitry Andricdef VBITREVI_W : LSX2RI5_VVI<0x73188000>;
84806c3fb27SDimitry Andricdef VBITREVI_D : LSX2RI6_VVI<0x73190000>;
84906c3fb27SDimitry Andric
85006c3fb27SDimitry Andricdef VFRSTP_B : LSX3R_VVVV<0x712b0000>;
85106c3fb27SDimitry Andricdef VFRSTP_H : LSX3R_VVVV<0x712b8000>;
85206c3fb27SDimitry Andricdef VFRSTPI_B : LSX2RI5_VVVI<0x729a0000>;
85306c3fb27SDimitry Andricdef VFRSTPI_H : LSX2RI5_VVVI<0x729a8000>;
85406c3fb27SDimitry Andric
85506c3fb27SDimitry Andricdef VFADD_S : LSX3R_VVV<0x71308000>;
85606c3fb27SDimitry Andricdef VFADD_D : LSX3R_VVV<0x71310000>;
85706c3fb27SDimitry Andricdef VFSUB_S : LSX3R_VVV<0x71328000>;
85806c3fb27SDimitry Andricdef VFSUB_D : LSX3R_VVV<0x71330000>;
85906c3fb27SDimitry Andricdef VFMUL_S : LSX3R_VVV<0x71388000>;
86006c3fb27SDimitry Andricdef VFMUL_D : LSX3R_VVV<0x71390000>;
86106c3fb27SDimitry Andricdef VFDIV_S : LSX3R_VVV<0x713a8000>;
86206c3fb27SDimitry Andricdef VFDIV_D : LSX3R_VVV<0x713b0000>;
86306c3fb27SDimitry Andric
86406c3fb27SDimitry Andricdef VFMADD_S : LSX4R_VVVV<0x09100000>;
86506c3fb27SDimitry Andricdef VFMADD_D : LSX4R_VVVV<0x09200000>;
86606c3fb27SDimitry Andricdef VFMSUB_S : LSX4R_VVVV<0x09500000>;
86706c3fb27SDimitry Andricdef VFMSUB_D : LSX4R_VVVV<0x09600000>;
86806c3fb27SDimitry Andricdef VFNMADD_S : LSX4R_VVVV<0x09900000>;
86906c3fb27SDimitry Andricdef VFNMADD_D : LSX4R_VVVV<0x09a00000>;
87006c3fb27SDimitry Andricdef VFNMSUB_S : LSX4R_VVVV<0x09d00000>;
87106c3fb27SDimitry Andricdef VFNMSUB_D : LSX4R_VVVV<0x09e00000>;
87206c3fb27SDimitry Andric
87306c3fb27SDimitry Andricdef VFMAX_S : LSX3R_VVV<0x713c8000>;
87406c3fb27SDimitry Andricdef VFMAX_D : LSX3R_VVV<0x713d0000>;
87506c3fb27SDimitry Andricdef VFMIN_S : LSX3R_VVV<0x713e8000>;
87606c3fb27SDimitry Andricdef VFMIN_D : LSX3R_VVV<0x713f0000>;
87706c3fb27SDimitry Andric
87806c3fb27SDimitry Andricdef VFMAXA_S : LSX3R_VVV<0x71408000>;
87906c3fb27SDimitry Andricdef VFMAXA_D : LSX3R_VVV<0x71410000>;
88006c3fb27SDimitry Andricdef VFMINA_S : LSX3R_VVV<0x71428000>;
88106c3fb27SDimitry Andricdef VFMINA_D : LSX3R_VVV<0x71430000>;
88206c3fb27SDimitry Andric
88306c3fb27SDimitry Andricdef VFLOGB_S : LSX2R_VV<0x729cc400>;
88406c3fb27SDimitry Andricdef VFLOGB_D : LSX2R_VV<0x729cc800>;
88506c3fb27SDimitry Andric
88606c3fb27SDimitry Andricdef VFCLASS_S : LSX2R_VV<0x729cd400>;
88706c3fb27SDimitry Andricdef VFCLASS_D : LSX2R_VV<0x729cd800>;
88806c3fb27SDimitry Andric
88906c3fb27SDimitry Andricdef VFSQRT_S : LSX2R_VV<0x729ce400>;
89006c3fb27SDimitry Andricdef VFSQRT_D : LSX2R_VV<0x729ce800>;
89106c3fb27SDimitry Andricdef VFRECIP_S : LSX2R_VV<0x729cf400>;
89206c3fb27SDimitry Andricdef VFRECIP_D : LSX2R_VV<0x729cf800>;
89306c3fb27SDimitry Andricdef VFRSQRT_S : LSX2R_VV<0x729d0400>;
89406c3fb27SDimitry Andricdef VFRSQRT_D : LSX2R_VV<0x729d0800>;
895*7a6dacacSDimitry Andricdef VFRECIPE_S : LSX2R_VV<0x729d1400>;
896*7a6dacacSDimitry Andricdef VFRECIPE_D : LSX2R_VV<0x729d1800>;
897*7a6dacacSDimitry Andricdef VFRSQRTE_S : LSX2R_VV<0x729d2400>;
898*7a6dacacSDimitry Andricdef VFRSQRTE_D : LSX2R_VV<0x729d2800>;
89906c3fb27SDimitry Andric
90006c3fb27SDimitry Andricdef VFCVTL_S_H : LSX2R_VV<0x729de800>;
90106c3fb27SDimitry Andricdef VFCVTH_S_H : LSX2R_VV<0x729dec00>;
90206c3fb27SDimitry Andricdef VFCVTL_D_S : LSX2R_VV<0x729df000>;
90306c3fb27SDimitry Andricdef VFCVTH_D_S : LSX2R_VV<0x729df400>;
90406c3fb27SDimitry Andricdef VFCVT_H_S : LSX3R_VVV<0x71460000>;
90506c3fb27SDimitry Andricdef VFCVT_S_D : LSX3R_VVV<0x71468000>;
90606c3fb27SDimitry Andric
90706c3fb27SDimitry Andricdef VFRINTRNE_S : LSX2R_VV<0x729d7400>;
90806c3fb27SDimitry Andricdef VFRINTRNE_D : LSX2R_VV<0x729d7800>;
90906c3fb27SDimitry Andricdef VFRINTRZ_S : LSX2R_VV<0x729d6400>;
91006c3fb27SDimitry Andricdef VFRINTRZ_D : LSX2R_VV<0x729d6800>;
91106c3fb27SDimitry Andricdef VFRINTRP_S : LSX2R_VV<0x729d5400>;
91206c3fb27SDimitry Andricdef VFRINTRP_D : LSX2R_VV<0x729d5800>;
91306c3fb27SDimitry Andricdef VFRINTRM_S : LSX2R_VV<0x729d4400>;
91406c3fb27SDimitry Andricdef VFRINTRM_D : LSX2R_VV<0x729d4800>;
91506c3fb27SDimitry Andricdef VFRINT_S : LSX2R_VV<0x729d3400>;
91606c3fb27SDimitry Andricdef VFRINT_D : LSX2R_VV<0x729d3800>;
91706c3fb27SDimitry Andric
91806c3fb27SDimitry Andricdef VFTINTRNE_W_S : LSX2R_VV<0x729e5000>;
91906c3fb27SDimitry Andricdef VFTINTRNE_L_D : LSX2R_VV<0x729e5400>;
92006c3fb27SDimitry Andricdef VFTINTRZ_W_S : LSX2R_VV<0x729e4800>;
92106c3fb27SDimitry Andricdef VFTINTRZ_L_D : LSX2R_VV<0x729e4c00>;
92206c3fb27SDimitry Andricdef VFTINTRP_W_S : LSX2R_VV<0x729e4000>;
92306c3fb27SDimitry Andricdef VFTINTRP_L_D : LSX2R_VV<0x729e4400>;
92406c3fb27SDimitry Andricdef VFTINTRM_W_S : LSX2R_VV<0x729e3800>;
92506c3fb27SDimitry Andricdef VFTINTRM_L_D : LSX2R_VV<0x729e3c00>;
92606c3fb27SDimitry Andricdef VFTINT_W_S : LSX2R_VV<0x729e3000>;
92706c3fb27SDimitry Andricdef VFTINT_L_D : LSX2R_VV<0x729e3400>;
92806c3fb27SDimitry Andricdef VFTINTRZ_WU_S : LSX2R_VV<0x729e7000>;
92906c3fb27SDimitry Andricdef VFTINTRZ_LU_D : LSX2R_VV<0x729e7400>;
93006c3fb27SDimitry Andricdef VFTINT_WU_S : LSX2R_VV<0x729e5800>;
93106c3fb27SDimitry Andricdef VFTINT_LU_D : LSX2R_VV<0x729e5c00>;
93206c3fb27SDimitry Andric
93306c3fb27SDimitry Andricdef VFTINTRNE_W_D : LSX3R_VVV<0x714b8000>;
93406c3fb27SDimitry Andricdef VFTINTRZ_W_D : LSX3R_VVV<0x714b0000>;
93506c3fb27SDimitry Andricdef VFTINTRP_W_D : LSX3R_VVV<0x714a8000>;
93606c3fb27SDimitry Andricdef VFTINTRM_W_D : LSX3R_VVV<0x714a0000>;
93706c3fb27SDimitry Andricdef VFTINT_W_D : LSX3R_VVV<0x71498000>;
93806c3fb27SDimitry Andric
93906c3fb27SDimitry Andricdef VFTINTRNEL_L_S : LSX2R_VV<0x729ea000>;
94006c3fb27SDimitry Andricdef VFTINTRNEH_L_S : LSX2R_VV<0x729ea400>;
94106c3fb27SDimitry Andricdef VFTINTRZL_L_S : LSX2R_VV<0x729e9800>;
94206c3fb27SDimitry Andricdef VFTINTRZH_L_S : LSX2R_VV<0x729e9c00>;
94306c3fb27SDimitry Andricdef VFTINTRPL_L_S : LSX2R_VV<0x729e9000>;
94406c3fb27SDimitry Andricdef VFTINTRPH_L_S : LSX2R_VV<0x729e9400>;
94506c3fb27SDimitry Andricdef VFTINTRML_L_S : LSX2R_VV<0x729e8800>;
94606c3fb27SDimitry Andricdef VFTINTRMH_L_S : LSX2R_VV<0x729e8c00>;
94706c3fb27SDimitry Andricdef VFTINTL_L_S : LSX2R_VV<0x729e8000>;
94806c3fb27SDimitry Andricdef VFTINTH_L_S : LSX2R_VV<0x729e8400>;
94906c3fb27SDimitry Andric
95006c3fb27SDimitry Andricdef VFFINT_S_W : LSX2R_VV<0x729e0000>;
95106c3fb27SDimitry Andricdef VFFINT_D_L : LSX2R_VV<0x729e0800>;
95206c3fb27SDimitry Andricdef VFFINT_S_WU : LSX2R_VV<0x729e0400>;
95306c3fb27SDimitry Andricdef VFFINT_D_LU : LSX2R_VV<0x729e0c00>;
95406c3fb27SDimitry Andricdef VFFINTL_D_W : LSX2R_VV<0x729e1000>;
95506c3fb27SDimitry Andricdef VFFINTH_D_W : LSX2R_VV<0x729e1400>;
95606c3fb27SDimitry Andricdef VFFINT_S_L : LSX3R_VVV<0x71480000>;
95706c3fb27SDimitry Andric
95806c3fb27SDimitry Andricdef VSEQ_B : LSX3R_VVV<0x70000000>;
95906c3fb27SDimitry Andricdef VSEQ_H : LSX3R_VVV<0x70008000>;
96006c3fb27SDimitry Andricdef VSEQ_W : LSX3R_VVV<0x70010000>;
96106c3fb27SDimitry Andricdef VSEQ_D : LSX3R_VVV<0x70018000>;
96206c3fb27SDimitry Andricdef VSEQI_B : LSX2RI5_VVI<0x72800000, simm5>;
96306c3fb27SDimitry Andricdef VSEQI_H : LSX2RI5_VVI<0x72808000, simm5>;
96406c3fb27SDimitry Andricdef VSEQI_W : LSX2RI5_VVI<0x72810000, simm5>;
96506c3fb27SDimitry Andricdef VSEQI_D : LSX2RI5_VVI<0x72818000, simm5>;
96606c3fb27SDimitry Andric
96706c3fb27SDimitry Andricdef VSLE_B : LSX3R_VVV<0x70020000>;
96806c3fb27SDimitry Andricdef VSLE_H : LSX3R_VVV<0x70028000>;
96906c3fb27SDimitry Andricdef VSLE_W : LSX3R_VVV<0x70030000>;
97006c3fb27SDimitry Andricdef VSLE_D : LSX3R_VVV<0x70038000>;
97106c3fb27SDimitry Andricdef VSLEI_B : LSX2RI5_VVI<0x72820000, simm5>;
97206c3fb27SDimitry Andricdef VSLEI_H : LSX2RI5_VVI<0x72828000, simm5>;
97306c3fb27SDimitry Andricdef VSLEI_W : LSX2RI5_VVI<0x72830000, simm5>;
97406c3fb27SDimitry Andricdef VSLEI_D : LSX2RI5_VVI<0x72838000, simm5>;
97506c3fb27SDimitry Andric
97606c3fb27SDimitry Andricdef VSLE_BU : LSX3R_VVV<0x70040000>;
97706c3fb27SDimitry Andricdef VSLE_HU : LSX3R_VVV<0x70048000>;
97806c3fb27SDimitry Andricdef VSLE_WU : LSX3R_VVV<0x70050000>;
97906c3fb27SDimitry Andricdef VSLE_DU : LSX3R_VVV<0x70058000>;
98006c3fb27SDimitry Andricdef VSLEI_BU : LSX2RI5_VVI<0x72840000>;
98106c3fb27SDimitry Andricdef VSLEI_HU : LSX2RI5_VVI<0x72848000>;
98206c3fb27SDimitry Andricdef VSLEI_WU : LSX2RI5_VVI<0x72850000>;
98306c3fb27SDimitry Andricdef VSLEI_DU : LSX2RI5_VVI<0x72858000>;
98406c3fb27SDimitry Andric
98506c3fb27SDimitry Andricdef VSLT_B : LSX3R_VVV<0x70060000>;
98606c3fb27SDimitry Andricdef VSLT_H : LSX3R_VVV<0x70068000>;
98706c3fb27SDimitry Andricdef VSLT_W : LSX3R_VVV<0x70070000>;
98806c3fb27SDimitry Andricdef VSLT_D : LSX3R_VVV<0x70078000>;
98906c3fb27SDimitry Andricdef VSLTI_B : LSX2RI5_VVI<0x72860000, simm5>;
99006c3fb27SDimitry Andricdef VSLTI_H : LSX2RI5_VVI<0x72868000, simm5>;
99106c3fb27SDimitry Andricdef VSLTI_W : LSX2RI5_VVI<0x72870000, simm5>;
99206c3fb27SDimitry Andricdef VSLTI_D : LSX2RI5_VVI<0x72878000, simm5>;
99306c3fb27SDimitry Andric
99406c3fb27SDimitry Andricdef VSLT_BU : LSX3R_VVV<0x70080000>;
99506c3fb27SDimitry Andricdef VSLT_HU : LSX3R_VVV<0x70088000>;
99606c3fb27SDimitry Andricdef VSLT_WU : LSX3R_VVV<0x70090000>;
99706c3fb27SDimitry Andricdef VSLT_DU : LSX3R_VVV<0x70098000>;
99806c3fb27SDimitry Andricdef VSLTI_BU : LSX2RI5_VVI<0x72880000>;
99906c3fb27SDimitry Andricdef VSLTI_HU : LSX2RI5_VVI<0x72888000>;
100006c3fb27SDimitry Andricdef VSLTI_WU : LSX2RI5_VVI<0x72890000>;
100106c3fb27SDimitry Andricdef VSLTI_DU : LSX2RI5_VVI<0x72898000>;
100206c3fb27SDimitry Andric
100306c3fb27SDimitry Andricdef VFCMP_CAF_S : LSX3R_VVV<0x0c500000>;
100406c3fb27SDimitry Andricdef VFCMP_SAF_S : LSX3R_VVV<0x0c508000>;
100506c3fb27SDimitry Andricdef VFCMP_CLT_S : LSX3R_VVV<0x0c510000>;
100606c3fb27SDimitry Andricdef VFCMP_SLT_S : LSX3R_VVV<0x0c518000>;
100706c3fb27SDimitry Andricdef VFCMP_CEQ_S : LSX3R_VVV<0x0c520000>;
100806c3fb27SDimitry Andricdef VFCMP_SEQ_S : LSX3R_VVV<0x0c528000>;
100906c3fb27SDimitry Andricdef VFCMP_CLE_S : LSX3R_VVV<0x0c530000>;
101006c3fb27SDimitry Andricdef VFCMP_SLE_S : LSX3R_VVV<0x0c538000>;
101106c3fb27SDimitry Andricdef VFCMP_CUN_S : LSX3R_VVV<0x0c540000>;
101206c3fb27SDimitry Andricdef VFCMP_SUN_S : LSX3R_VVV<0x0c548000>;
101306c3fb27SDimitry Andricdef VFCMP_CULT_S : LSX3R_VVV<0x0c550000>;
101406c3fb27SDimitry Andricdef VFCMP_SULT_S : LSX3R_VVV<0x0c558000>;
101506c3fb27SDimitry Andricdef VFCMP_CUEQ_S : LSX3R_VVV<0x0c560000>;
101606c3fb27SDimitry Andricdef VFCMP_SUEQ_S : LSX3R_VVV<0x0c568000>;
101706c3fb27SDimitry Andricdef VFCMP_CULE_S : LSX3R_VVV<0x0c570000>;
101806c3fb27SDimitry Andricdef VFCMP_SULE_S : LSX3R_VVV<0x0c578000>;
101906c3fb27SDimitry Andricdef VFCMP_CNE_S : LSX3R_VVV<0x0c580000>;
102006c3fb27SDimitry Andricdef VFCMP_SNE_S : LSX3R_VVV<0x0c588000>;
102106c3fb27SDimitry Andricdef VFCMP_COR_S : LSX3R_VVV<0x0c5a0000>;
102206c3fb27SDimitry Andricdef VFCMP_SOR_S : LSX3R_VVV<0x0c5a8000>;
102306c3fb27SDimitry Andricdef VFCMP_CUNE_S : LSX3R_VVV<0x0c5c0000>;
102406c3fb27SDimitry Andricdef VFCMP_SUNE_S : LSX3R_VVV<0x0c5c8000>;
102506c3fb27SDimitry Andric
102606c3fb27SDimitry Andricdef VFCMP_CAF_D : LSX3R_VVV<0x0c600000>;
102706c3fb27SDimitry Andricdef VFCMP_SAF_D : LSX3R_VVV<0x0c608000>;
102806c3fb27SDimitry Andricdef VFCMP_CLT_D : LSX3R_VVV<0x0c610000>;
102906c3fb27SDimitry Andricdef VFCMP_SLT_D : LSX3R_VVV<0x0c618000>;
103006c3fb27SDimitry Andricdef VFCMP_CEQ_D : LSX3R_VVV<0x0c620000>;
103106c3fb27SDimitry Andricdef VFCMP_SEQ_D : LSX3R_VVV<0x0c628000>;
103206c3fb27SDimitry Andricdef VFCMP_CLE_D : LSX3R_VVV<0x0c630000>;
103306c3fb27SDimitry Andricdef VFCMP_SLE_D : LSX3R_VVV<0x0c638000>;
103406c3fb27SDimitry Andricdef VFCMP_CUN_D : LSX3R_VVV<0x0c640000>;
103506c3fb27SDimitry Andricdef VFCMP_SUN_D : LSX3R_VVV<0x0c648000>;
103606c3fb27SDimitry Andricdef VFCMP_CULT_D : LSX3R_VVV<0x0c650000>;
103706c3fb27SDimitry Andricdef VFCMP_SULT_D : LSX3R_VVV<0x0c658000>;
103806c3fb27SDimitry Andricdef VFCMP_CUEQ_D : LSX3R_VVV<0x0c660000>;
103906c3fb27SDimitry Andricdef VFCMP_SUEQ_D : LSX3R_VVV<0x0c668000>;
104006c3fb27SDimitry Andricdef VFCMP_CULE_D : LSX3R_VVV<0x0c670000>;
104106c3fb27SDimitry Andricdef VFCMP_SULE_D : LSX3R_VVV<0x0c678000>;
104206c3fb27SDimitry Andricdef VFCMP_CNE_D : LSX3R_VVV<0x0c680000>;
104306c3fb27SDimitry Andricdef VFCMP_SNE_D : LSX3R_VVV<0x0c688000>;
104406c3fb27SDimitry Andricdef VFCMP_COR_D : LSX3R_VVV<0x0c6a0000>;
104506c3fb27SDimitry Andricdef VFCMP_SOR_D : LSX3R_VVV<0x0c6a8000>;
104606c3fb27SDimitry Andricdef VFCMP_CUNE_D : LSX3R_VVV<0x0c6c0000>;
104706c3fb27SDimitry Andricdef VFCMP_SUNE_D : LSX3R_VVV<0x0c6c8000>;
104806c3fb27SDimitry Andric
104906c3fb27SDimitry Andricdef VBITSEL_V : LSX4R_VVVV<0x0d100000>;
105006c3fb27SDimitry Andric
105106c3fb27SDimitry Andricdef VBITSELI_B : LSX2RI8_VVVI<0x73c40000>;
105206c3fb27SDimitry Andric
105306c3fb27SDimitry Andricdef VSETEQZ_V : LSX2R_CV<0x729c9800>;
105406c3fb27SDimitry Andricdef VSETNEZ_V : LSX2R_CV<0x729c9c00>;
105506c3fb27SDimitry Andricdef VSETANYEQZ_B : LSX2R_CV<0x729ca000>;
105606c3fb27SDimitry Andricdef VSETANYEQZ_H : LSX2R_CV<0x729ca400>;
105706c3fb27SDimitry Andricdef VSETANYEQZ_W : LSX2R_CV<0x729ca800>;
105806c3fb27SDimitry Andricdef VSETANYEQZ_D : LSX2R_CV<0x729cac00>;
105906c3fb27SDimitry Andricdef VSETALLNEZ_B : LSX2R_CV<0x729cb000>;
106006c3fb27SDimitry Andricdef VSETALLNEZ_H : LSX2R_CV<0x729cb400>;
106106c3fb27SDimitry Andricdef VSETALLNEZ_W : LSX2R_CV<0x729cb800>;
106206c3fb27SDimitry Andricdef VSETALLNEZ_D : LSX2R_CV<0x729cbc00>;
106306c3fb27SDimitry Andric
106406c3fb27SDimitry Andricdef VINSGR2VR_B : LSX2RI4_VVRI<0x72eb8000>;
106506c3fb27SDimitry Andricdef VINSGR2VR_H : LSX2RI3_VVRI<0x72ebc000>;
106606c3fb27SDimitry Andricdef VINSGR2VR_W : LSX2RI2_VVRI<0x72ebe000>;
106706c3fb27SDimitry Andricdef VINSGR2VR_D : LSX2RI1_VVRI<0x72ebf000>;
106806c3fb27SDimitry Andricdef VPICKVE2GR_B : LSX2RI4_RVI<0x72ef8000>;
106906c3fb27SDimitry Andricdef VPICKVE2GR_H : LSX2RI3_RVI<0x72efc000>;
107006c3fb27SDimitry Andricdef VPICKVE2GR_W : LSX2RI2_RVI<0x72efe000>;
107106c3fb27SDimitry Andricdef VPICKVE2GR_D : LSX2RI1_RVI<0x72eff000>;
107206c3fb27SDimitry Andricdef VPICKVE2GR_BU : LSX2RI4_RVI<0x72f38000>;
107306c3fb27SDimitry Andricdef VPICKVE2GR_HU : LSX2RI3_RVI<0x72f3c000>;
107406c3fb27SDimitry Andricdef VPICKVE2GR_WU : LSX2RI2_RVI<0x72f3e000>;
107506c3fb27SDimitry Andricdef VPICKVE2GR_DU : LSX2RI1_RVI<0x72f3f000>;
107606c3fb27SDimitry Andric
107706c3fb27SDimitry Andricdef VREPLGR2VR_B : LSX2R_VR<0x729f0000>;
107806c3fb27SDimitry Andricdef VREPLGR2VR_H : LSX2R_VR<0x729f0400>;
107906c3fb27SDimitry Andricdef VREPLGR2VR_W : LSX2R_VR<0x729f0800>;
108006c3fb27SDimitry Andricdef VREPLGR2VR_D : LSX2R_VR<0x729f0c00>;
108106c3fb27SDimitry Andric
108206c3fb27SDimitry Andricdef VREPLVE_B : LSX3R_VVR<0x71220000>;
108306c3fb27SDimitry Andricdef VREPLVE_H : LSX3R_VVR<0x71228000>;
108406c3fb27SDimitry Andricdef VREPLVE_W : LSX3R_VVR<0x71230000>;
108506c3fb27SDimitry Andricdef VREPLVE_D : LSX3R_VVR<0x71238000>;
108606c3fb27SDimitry Andricdef VREPLVEI_B : LSX2RI4_VVI<0x72f78000>;
108706c3fb27SDimitry Andricdef VREPLVEI_H : LSX2RI3_VVI<0x72f7c000>;
108806c3fb27SDimitry Andricdef VREPLVEI_W : LSX2RI2_VVI<0x72f7e000>;
108906c3fb27SDimitry Andricdef VREPLVEI_D : LSX2RI1_VVI<0x72f7f000>;
109006c3fb27SDimitry Andric
109106c3fb27SDimitry Andricdef VBSLL_V : LSX2RI5_VVI<0x728e0000>;
109206c3fb27SDimitry Andricdef VBSRL_V : LSX2RI5_VVI<0x728e8000>;
109306c3fb27SDimitry Andric
109406c3fb27SDimitry Andricdef VPACKEV_B : LSX3R_VVV<0x71160000>;
109506c3fb27SDimitry Andricdef VPACKEV_H : LSX3R_VVV<0x71168000>;
109606c3fb27SDimitry Andricdef VPACKEV_W : LSX3R_VVV<0x71170000>;
109706c3fb27SDimitry Andricdef VPACKEV_D : LSX3R_VVV<0x71178000>;
109806c3fb27SDimitry Andricdef VPACKOD_B : LSX3R_VVV<0x71180000>;
109906c3fb27SDimitry Andricdef VPACKOD_H : LSX3R_VVV<0x71188000>;
110006c3fb27SDimitry Andricdef VPACKOD_W : LSX3R_VVV<0x71190000>;
110106c3fb27SDimitry Andricdef VPACKOD_D : LSX3R_VVV<0x71198000>;
110206c3fb27SDimitry Andric
110306c3fb27SDimitry Andricdef VPICKEV_B : LSX3R_VVV<0x711e0000>;
110406c3fb27SDimitry Andricdef VPICKEV_H : LSX3R_VVV<0x711e8000>;
110506c3fb27SDimitry Andricdef VPICKEV_W : LSX3R_VVV<0x711f0000>;
110606c3fb27SDimitry Andricdef VPICKEV_D : LSX3R_VVV<0x711f8000>;
110706c3fb27SDimitry Andricdef VPICKOD_B : LSX3R_VVV<0x71200000>;
110806c3fb27SDimitry Andricdef VPICKOD_H : LSX3R_VVV<0x71208000>;
110906c3fb27SDimitry Andricdef VPICKOD_W : LSX3R_VVV<0x71210000>;
111006c3fb27SDimitry Andricdef VPICKOD_D : LSX3R_VVV<0x71218000>;
111106c3fb27SDimitry Andric
111206c3fb27SDimitry Andricdef VILVL_B : LSX3R_VVV<0x711a0000>;
111306c3fb27SDimitry Andricdef VILVL_H : LSX3R_VVV<0x711a8000>;
111406c3fb27SDimitry Andricdef VILVL_W : LSX3R_VVV<0x711b0000>;
111506c3fb27SDimitry Andricdef VILVL_D : LSX3R_VVV<0x711b8000>;
111606c3fb27SDimitry Andricdef VILVH_B : LSX3R_VVV<0x711c0000>;
111706c3fb27SDimitry Andricdef VILVH_H : LSX3R_VVV<0x711c8000>;
111806c3fb27SDimitry Andricdef VILVH_W : LSX3R_VVV<0x711d0000>;
111906c3fb27SDimitry Andricdef VILVH_D : LSX3R_VVV<0x711d8000>;
112006c3fb27SDimitry Andric
112106c3fb27SDimitry Andricdef VSHUF_B : LSX4R_VVVV<0x0d500000>;
112206c3fb27SDimitry Andric
112306c3fb27SDimitry Andricdef VSHUF_H : LSX3R_VVVV<0x717a8000>;
112406c3fb27SDimitry Andricdef VSHUF_W : LSX3R_VVVV<0x717b0000>;
112506c3fb27SDimitry Andricdef VSHUF_D : LSX3R_VVVV<0x717b8000>;
112606c3fb27SDimitry Andric
112706c3fb27SDimitry Andricdef VSHUF4I_B : LSX2RI8_VVI<0x73900000>;
112806c3fb27SDimitry Andricdef VSHUF4I_H : LSX2RI8_VVI<0x73940000>;
112906c3fb27SDimitry Andricdef VSHUF4I_W : LSX2RI8_VVI<0x73980000>;
113006c3fb27SDimitry Andricdef VSHUF4I_D : LSX2RI8_VVVI<0x739c0000>;
113106c3fb27SDimitry Andric
113206c3fb27SDimitry Andricdef VPERMI_W : LSX2RI8_VVVI<0x73e40000>;
113306c3fb27SDimitry Andric
113406c3fb27SDimitry Andricdef VEXTRINS_D : LSX2RI8_VVVI<0x73800000>;
113506c3fb27SDimitry Andricdef VEXTRINS_W : LSX2RI8_VVVI<0x73840000>;
113606c3fb27SDimitry Andricdef VEXTRINS_H : LSX2RI8_VVVI<0x73880000>;
113706c3fb27SDimitry Andricdef VEXTRINS_B : LSX2RI8_VVVI<0x738c0000>;
113806c3fb27SDimitry Andric} // mayLoad = 0, mayStore = 0
113906c3fb27SDimitry Andric
114006c3fb27SDimitry Andriclet mayLoad = 1, mayStore = 0 in {
114106c3fb27SDimitry Andricdef VLD : LSX2RI12_Load<0x2c000000>;
114206c3fb27SDimitry Andricdef VLDX : LSX3R_Load<0x38400000>;
114306c3fb27SDimitry Andric
114406c3fb27SDimitry Andricdef VLDREPL_B : LSX2RI12_Load<0x30800000>;
114506c3fb27SDimitry Andricdef VLDREPL_H : LSX2RI11_Load<0x30400000>;
114606c3fb27SDimitry Andricdef VLDREPL_W : LSX2RI10_Load<0x30200000>;
114706c3fb27SDimitry Andricdef VLDREPL_D : LSX2RI9_Load<0x30100000>;
114806c3fb27SDimitry Andric} // mayLoad = 1, mayStore = 0
114906c3fb27SDimitry Andric
115006c3fb27SDimitry Andriclet mayLoad = 0, mayStore = 1 in {
115106c3fb27SDimitry Andricdef VST : LSX2RI12_Store<0x2c400000>;
115206c3fb27SDimitry Andricdef VSTX : LSX3R_Store<0x38440000>;
115306c3fb27SDimitry Andric
115406c3fb27SDimitry Andricdef VSTELM_B : LSX2RI8I4_VRII<0x31800000>;
115506c3fb27SDimitry Andricdef VSTELM_H : LSX2RI8I3_VRII<0x31400000, simm8_lsl1>;
115606c3fb27SDimitry Andricdef VSTELM_W : LSX2RI8I2_VRII<0x31200000, simm8_lsl2>;
115706c3fb27SDimitry Andricdef VSTELM_D : LSX2RI8I1_VRII<0x31100000, simm8_lsl3>;
115806c3fb27SDimitry Andric} // mayLoad = 0, mayStore = 1
115906c3fb27SDimitry Andric
116006c3fb27SDimitry Andric} // hasSideEffects = 0, Predicates = [HasExtLSX]
116106c3fb27SDimitry Andric
116206c3fb27SDimitry Andric/// Pseudo-instructions
116306c3fb27SDimitry Andric
116406c3fb27SDimitry Andriclet Predicates = [HasExtLSX] in {
116506c3fb27SDimitry Andric
116606c3fb27SDimitry Andriclet hasSideEffects = 0, mayLoad = 0, mayStore = 0, isCodeGenOnly = 0,
116706c3fb27SDimitry Andric    isAsmParserOnly = 1 in {
116806c3fb27SDimitry Andricdef PseudoVREPLI_B : Pseudo<(outs LSX128:$vd), (ins simm10:$imm), [],
116906c3fb27SDimitry Andric                            "vrepli.b", "$vd, $imm">;
117006c3fb27SDimitry Andricdef PseudoVREPLI_H : Pseudo<(outs LSX128:$vd), (ins simm10:$imm), [],
117106c3fb27SDimitry Andric                            "vrepli.h", "$vd, $imm">;
117206c3fb27SDimitry Andricdef PseudoVREPLI_W : Pseudo<(outs LSX128:$vd), (ins simm10:$imm), [],
117306c3fb27SDimitry Andric                            "vrepli.w", "$vd, $imm">;
117406c3fb27SDimitry Andricdef PseudoVREPLI_D : Pseudo<(outs LSX128:$vd), (ins simm10:$imm), [],
117506c3fb27SDimitry Andric                            "vrepli.d", "$vd, $imm">;
117606c3fb27SDimitry Andric}
117706c3fb27SDimitry Andric
11785f757f3fSDimitry Andricdef PseudoVBNZ_B : VecCond<loongarch_vall_nonzero, v16i8>;
11795f757f3fSDimitry Andricdef PseudoVBNZ_H : VecCond<loongarch_vall_nonzero, v8i16>;
11805f757f3fSDimitry Andricdef PseudoVBNZ_W : VecCond<loongarch_vall_nonzero, v4i32>;
11815f757f3fSDimitry Andricdef PseudoVBNZ_D : VecCond<loongarch_vall_nonzero, v2i64>;
11825f757f3fSDimitry Andricdef PseudoVBNZ : VecCond<loongarch_vany_nonzero, v16i8>;
11835f757f3fSDimitry Andric
11845f757f3fSDimitry Andricdef PseudoVBZ_B : VecCond<loongarch_vall_zero, v16i8>;
11855f757f3fSDimitry Andricdef PseudoVBZ_H : VecCond<loongarch_vall_zero, v8i16>;
11865f757f3fSDimitry Andricdef PseudoVBZ_W : VecCond<loongarch_vall_zero, v4i32>;
11875f757f3fSDimitry Andricdef PseudoVBZ_D : VecCond<loongarch_vall_zero, v2i64>;
11885f757f3fSDimitry Andricdef PseudoVBZ : VecCond<loongarch_vany_zero, v16i8>;
11895f757f3fSDimitry Andric
11905f757f3fSDimitry Andric} // Predicates = [HasExtLSX]
11915f757f3fSDimitry Andric
11925f757f3fSDimitry Andricmulticlass PatVr<SDPatternOperator OpNode, string Inst> {
11935f757f3fSDimitry Andric  def : Pat<(v16i8 (OpNode (v16i8 LSX128:$vj))),
11945f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_B") LSX128:$vj)>;
11955f757f3fSDimitry Andric  def : Pat<(v8i16 (OpNode (v8i16 LSX128:$vj))),
11965f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_H") LSX128:$vj)>;
11975f757f3fSDimitry Andric  def : Pat<(v4i32 (OpNode (v4i32 LSX128:$vj))),
11985f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_W") LSX128:$vj)>;
11995f757f3fSDimitry Andric  def : Pat<(v2i64 (OpNode (v2i64 LSX128:$vj))),
12005f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_D") LSX128:$vj)>;
12015f757f3fSDimitry Andric}
12025f757f3fSDimitry Andric
12035f757f3fSDimitry Andricmulticlass PatVrF<SDPatternOperator OpNode, string Inst> {
12045f757f3fSDimitry Andric  def : Pat<(v4f32 (OpNode (v4f32 LSX128:$vj))),
12055f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_S") LSX128:$vj)>;
12065f757f3fSDimitry Andric  def : Pat<(v2f64 (OpNode (v2f64 LSX128:$vj))),
12075f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_D") LSX128:$vj)>;
12085f757f3fSDimitry Andric}
12095f757f3fSDimitry Andric
12105f757f3fSDimitry Andricmulticlass PatVrVr<SDPatternOperator OpNode, string Inst> {
12115f757f3fSDimitry Andric  def : Pat<(OpNode (v16i8 LSX128:$vj), (v16i8 LSX128:$vk)),
12125f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_B") LSX128:$vj, LSX128:$vk)>;
12135f757f3fSDimitry Andric  def : Pat<(OpNode (v8i16 LSX128:$vj), (v8i16 LSX128:$vk)),
12145f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_H") LSX128:$vj, LSX128:$vk)>;
12155f757f3fSDimitry Andric  def : Pat<(OpNode (v4i32 LSX128:$vj), (v4i32 LSX128:$vk)),
12165f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_W") LSX128:$vj, LSX128:$vk)>;
12175f757f3fSDimitry Andric  def : Pat<(OpNode (v2i64 LSX128:$vj), (v2i64 LSX128:$vk)),
12185f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_D") LSX128:$vj, LSX128:$vk)>;
12195f757f3fSDimitry Andric}
12205f757f3fSDimitry Andric
12215f757f3fSDimitry Andricmulticlass PatVrVrF<SDPatternOperator OpNode, string Inst> {
12225f757f3fSDimitry Andric  def : Pat<(OpNode (v4f32 LSX128:$vj), (v4f32 LSX128:$vk)),
12235f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_S") LSX128:$vj, LSX128:$vk)>;
12245f757f3fSDimitry Andric  def : Pat<(OpNode (v2f64 LSX128:$vj), (v2f64 LSX128:$vk)),
12255f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_D") LSX128:$vj, LSX128:$vk)>;
12265f757f3fSDimitry Andric}
12275f757f3fSDimitry Andric
12285f757f3fSDimitry Andricmulticlass PatVrVrU<SDPatternOperator OpNode, string Inst> {
12295f757f3fSDimitry Andric  def : Pat<(OpNode (v16i8 LSX128:$vj), (v16i8 LSX128:$vk)),
12305f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_BU") LSX128:$vj, LSX128:$vk)>;
12315f757f3fSDimitry Andric  def : Pat<(OpNode (v8i16 LSX128:$vj), (v8i16 LSX128:$vk)),
12325f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_HU") LSX128:$vj, LSX128:$vk)>;
12335f757f3fSDimitry Andric  def : Pat<(OpNode (v4i32 LSX128:$vj), (v4i32 LSX128:$vk)),
12345f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_WU") LSX128:$vj, LSX128:$vk)>;
12355f757f3fSDimitry Andric  def : Pat<(OpNode (v2i64 LSX128:$vj), (v2i64 LSX128:$vk)),
12365f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_DU") LSX128:$vj, LSX128:$vk)>;
12375f757f3fSDimitry Andric}
12385f757f3fSDimitry Andric
12395f757f3fSDimitry Andricmulticlass PatVrSimm5<SDPatternOperator OpNode, string Inst> {
12405f757f3fSDimitry Andric  def : Pat<(OpNode (v16i8 LSX128:$vj), (v16i8 (SplatPat_simm5 simm5:$imm))),
12415f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_B") LSX128:$vj, simm5:$imm)>;
12425f757f3fSDimitry Andric  def : Pat<(OpNode (v8i16 LSX128:$vj), (v8i16 (SplatPat_simm5 simm5:$imm))),
12435f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_H") LSX128:$vj, simm5:$imm)>;
12445f757f3fSDimitry Andric  def : Pat<(OpNode (v4i32 LSX128:$vj), (v4i32 (SplatPat_simm5 simm5:$imm))),
12455f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_W") LSX128:$vj, simm5:$imm)>;
12465f757f3fSDimitry Andric  def : Pat<(OpNode (v2i64 LSX128:$vj), (v2i64 (SplatPat_simm5 simm5:$imm))),
12475f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_D") LSX128:$vj, simm5:$imm)>;
12485f757f3fSDimitry Andric}
12495f757f3fSDimitry Andric
12505f757f3fSDimitry Andricmulticlass PatVrUimm5<SDPatternOperator OpNode, string Inst> {
12515f757f3fSDimitry Andric  def : Pat<(OpNode (v16i8 LSX128:$vj), (v16i8 (SplatPat_uimm5 uimm5:$imm))),
12525f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_BU") LSX128:$vj, uimm5:$imm)>;
12535f757f3fSDimitry Andric  def : Pat<(OpNode (v8i16 LSX128:$vj), (v8i16 (SplatPat_uimm5 uimm5:$imm))),
12545f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_HU") LSX128:$vj, uimm5:$imm)>;
12555f757f3fSDimitry Andric  def : Pat<(OpNode (v4i32 LSX128:$vj), (v4i32 (SplatPat_uimm5 uimm5:$imm))),
12565f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_WU") LSX128:$vj, uimm5:$imm)>;
12575f757f3fSDimitry Andric  def : Pat<(OpNode (v2i64 LSX128:$vj), (v2i64 (SplatPat_uimm5 uimm5:$imm))),
12585f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_DU") LSX128:$vj, uimm5:$imm)>;
12595f757f3fSDimitry Andric}
12605f757f3fSDimitry Andric
12615f757f3fSDimitry Andricmulticlass PatVrVrVr<SDPatternOperator OpNode, string Inst> {
12625f757f3fSDimitry Andric  def : Pat<(OpNode (v16i8 LSX128:$vd), (v16i8 LSX128:$vj), (v16i8 LSX128:$vk)),
12635f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_B") LSX128:$vd, LSX128:$vj, LSX128:$vk)>;
12645f757f3fSDimitry Andric  def : Pat<(OpNode (v8i16 LSX128:$vd), (v8i16 LSX128:$vj), (v8i16 LSX128:$vk)),
12655f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_H") LSX128:$vd, LSX128:$vj, LSX128:$vk)>;
12665f757f3fSDimitry Andric  def : Pat<(OpNode (v4i32 LSX128:$vd), (v4i32 LSX128:$vj), (v4i32 LSX128:$vk)),
12675f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_W") LSX128:$vd, LSX128:$vj, LSX128:$vk)>;
12685f757f3fSDimitry Andric  def : Pat<(OpNode (v2i64 LSX128:$vd), (v2i64 LSX128:$vj), (v2i64 LSX128:$vk)),
12695f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_D") LSX128:$vd, LSX128:$vj, LSX128:$vk)>;
12705f757f3fSDimitry Andric}
12715f757f3fSDimitry Andric
12725f757f3fSDimitry Andricmulticlass PatShiftVrVr<SDPatternOperator OpNode, string Inst> {
12735f757f3fSDimitry Andric  def : Pat<(OpNode (v16i8 LSX128:$vj), (and vsplati8_imm_eq_7,
12745f757f3fSDimitry Andric                                             (v16i8 LSX128:$vk))),
12755f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_B") LSX128:$vj, LSX128:$vk)>;
12765f757f3fSDimitry Andric  def : Pat<(OpNode (v8i16 LSX128:$vj), (and vsplati16_imm_eq_15,
12775f757f3fSDimitry Andric                                             (v8i16 LSX128:$vk))),
12785f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_H") LSX128:$vj, LSX128:$vk)>;
12795f757f3fSDimitry Andric  def : Pat<(OpNode (v4i32 LSX128:$vj), (and vsplati32_imm_eq_31,
12805f757f3fSDimitry Andric                                             (v4i32 LSX128:$vk))),
12815f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_W") LSX128:$vj, LSX128:$vk)>;
12825f757f3fSDimitry Andric  def : Pat<(OpNode (v2i64 LSX128:$vj), (and vsplati64_imm_eq_63,
12835f757f3fSDimitry Andric                                             (v2i64 LSX128:$vk))),
12845f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_D") LSX128:$vj, LSX128:$vk)>;
12855f757f3fSDimitry Andric}
12865f757f3fSDimitry Andric
12875f757f3fSDimitry Andricmulticlass PatShiftVrUimm<SDPatternOperator OpNode, string Inst> {
12885f757f3fSDimitry Andric  def : Pat<(OpNode (v16i8 LSX128:$vj), (v16i8 (SplatPat_uimm3 uimm3:$imm))),
12895f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_B") LSX128:$vj, uimm3:$imm)>;
12905f757f3fSDimitry Andric  def : Pat<(OpNode (v8i16 LSX128:$vj), (v8i16 (SplatPat_uimm4 uimm4:$imm))),
12915f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_H") LSX128:$vj, uimm4:$imm)>;
12925f757f3fSDimitry Andric  def : Pat<(OpNode (v4i32 LSX128:$vj), (v4i32 (SplatPat_uimm5 uimm5:$imm))),
12935f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_W") LSX128:$vj, uimm5:$imm)>;
12945f757f3fSDimitry Andric  def : Pat<(OpNode (v2i64 LSX128:$vj), (v2i64 (SplatPat_uimm6 uimm6:$imm))),
12955f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_D") LSX128:$vj, uimm6:$imm)>;
12965f757f3fSDimitry Andric}
12975f757f3fSDimitry Andric
12985f757f3fSDimitry Andricmulticlass PatCCVrSimm5<CondCode CC, string Inst> {
12995f757f3fSDimitry Andric  def : Pat<(v16i8 (setcc (v16i8 LSX128:$vj),
13005f757f3fSDimitry Andric                          (v16i8 (SplatPat_simm5 simm5:$imm)), CC)),
13015f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_B") LSX128:$vj, simm5:$imm)>;
13025f757f3fSDimitry Andric  def : Pat<(v8i16 (setcc (v8i16 LSX128:$vj),
13035f757f3fSDimitry Andric                          (v8i16 (SplatPat_simm5 simm5:$imm)), CC)),
13045f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_H") LSX128:$vj, simm5:$imm)>;
13055f757f3fSDimitry Andric  def : Pat<(v4i32 (setcc (v4i32 LSX128:$vj),
13065f757f3fSDimitry Andric                          (v4i32 (SplatPat_simm5 simm5:$imm)), CC)),
13075f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_W") LSX128:$vj, simm5:$imm)>;
13085f757f3fSDimitry Andric  def : Pat<(v2i64 (setcc (v2i64 LSX128:$vj),
13095f757f3fSDimitry Andric                          (v2i64 (SplatPat_simm5 simm5:$imm)), CC)),
13105f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_D") LSX128:$vj, simm5:$imm)>;
13115f757f3fSDimitry Andric}
13125f757f3fSDimitry Andric
13135f757f3fSDimitry Andricmulticlass PatCCVrUimm5<CondCode CC, string Inst> {
13145f757f3fSDimitry Andric  def : Pat<(v16i8 (setcc (v16i8 LSX128:$vj),
13155f757f3fSDimitry Andric                          (v16i8 (SplatPat_uimm5 uimm5:$imm)), CC)),
13165f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_BU") LSX128:$vj, uimm5:$imm)>;
13175f757f3fSDimitry Andric  def : Pat<(v8i16 (setcc (v8i16 LSX128:$vj),
13185f757f3fSDimitry Andric                          (v8i16 (SplatPat_uimm5 uimm5:$imm)), CC)),
13195f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_HU") LSX128:$vj, uimm5:$imm)>;
13205f757f3fSDimitry Andric  def : Pat<(v4i32 (setcc (v4i32 LSX128:$vj),
13215f757f3fSDimitry Andric                          (v4i32 (SplatPat_uimm5 uimm5:$imm)), CC)),
13225f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_WU") LSX128:$vj, uimm5:$imm)>;
13235f757f3fSDimitry Andric  def : Pat<(v2i64 (setcc (v2i64 LSX128:$vj),
13245f757f3fSDimitry Andric                          (v2i64 (SplatPat_uimm5 uimm5:$imm)), CC)),
13255f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_DU") LSX128:$vj, uimm5:$imm)>;
13265f757f3fSDimitry Andric}
13275f757f3fSDimitry Andric
13285f757f3fSDimitry Andricmulticlass PatCCVrVr<CondCode CC, string Inst> {
13295f757f3fSDimitry Andric  def : Pat<(v16i8 (setcc (v16i8 LSX128:$vj), (v16i8 LSX128:$vk), CC)),
13305f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_B") LSX128:$vj, LSX128:$vk)>;
13315f757f3fSDimitry Andric  def : Pat<(v8i16 (setcc (v8i16 LSX128:$vj), (v8i16 LSX128:$vk), CC)),
13325f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_H") LSX128:$vj, LSX128:$vk)>;
13335f757f3fSDimitry Andric  def : Pat<(v4i32 (setcc (v4i32 LSX128:$vj), (v4i32 LSX128:$vk), CC)),
13345f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_W") LSX128:$vj, LSX128:$vk)>;
13355f757f3fSDimitry Andric  def : Pat<(v2i64 (setcc (v2i64 LSX128:$vj), (v2i64 LSX128:$vk), CC)),
13365f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_D") LSX128:$vj, LSX128:$vk)>;
13375f757f3fSDimitry Andric}
13385f757f3fSDimitry Andric
13395f757f3fSDimitry Andricmulticlass PatCCVrVrU<CondCode CC, string Inst> {
13405f757f3fSDimitry Andric  def : Pat<(v16i8 (setcc (v16i8 LSX128:$vj), (v16i8 LSX128:$vk), CC)),
13415f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_BU") LSX128:$vj, LSX128:$vk)>;
13425f757f3fSDimitry Andric  def : Pat<(v8i16 (setcc (v8i16 LSX128:$vj), (v8i16 LSX128:$vk), CC)),
13435f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_HU") LSX128:$vj, LSX128:$vk)>;
13445f757f3fSDimitry Andric  def : Pat<(v4i32 (setcc (v4i32 LSX128:$vj), (v4i32 LSX128:$vk), CC)),
13455f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_WU") LSX128:$vj, LSX128:$vk)>;
13465f757f3fSDimitry Andric  def : Pat<(v2i64 (setcc (v2i64 LSX128:$vj), (v2i64 LSX128:$vk), CC)),
13475f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_DU") LSX128:$vj, LSX128:$vk)>;
13485f757f3fSDimitry Andric}
13495f757f3fSDimitry Andric
13505f757f3fSDimitry Andricmulticlass PatCCVrVrF<CondCode CC, string Inst> {
13515f757f3fSDimitry Andric  def : Pat<(v4i32 (setcc (v4f32 LSX128:$vj), (v4f32 LSX128:$vk), CC)),
13525f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_S") LSX128:$vj, LSX128:$vk)>;
13535f757f3fSDimitry Andric  def : Pat<(v2i64 (setcc (v2f64 LSX128:$vj), (v2f64 LSX128:$vk), CC)),
13545f757f3fSDimitry Andric            (!cast<LAInst>(Inst#"_D") LSX128:$vj, LSX128:$vk)>;
13555f757f3fSDimitry Andric}
13565f757f3fSDimitry Andric
13575f757f3fSDimitry Andriclet Predicates = [HasExtLSX] in {
13585f757f3fSDimitry Andric
13595f757f3fSDimitry Andric// VADD_{B/H/W/D}
13605f757f3fSDimitry Andricdefm : PatVrVr<add, "VADD">;
13615f757f3fSDimitry Andric// VSUB_{B/H/W/D}
13625f757f3fSDimitry Andricdefm : PatVrVr<sub, "VSUB">;
13635f757f3fSDimitry Andric
13645f757f3fSDimitry Andric// VADDI_{B/H/W/D}U
13655f757f3fSDimitry Andricdefm : PatVrUimm5<add, "VADDI">;
13665f757f3fSDimitry Andric// VSUBI_{B/H/W/D}U
13675f757f3fSDimitry Andricdefm : PatVrUimm5<sub, "VSUBI">;
13685f757f3fSDimitry Andric
13695f757f3fSDimitry Andric// VNEG_{B/H/W/D}
13705f757f3fSDimitry Andricdef : Pat<(sub immAllZerosV, (v16i8 LSX128:$vj)), (VNEG_B LSX128:$vj)>;
13715f757f3fSDimitry Andricdef : Pat<(sub immAllZerosV, (v8i16 LSX128:$vj)), (VNEG_H LSX128:$vj)>;
13725f757f3fSDimitry Andricdef : Pat<(sub immAllZerosV, (v4i32 LSX128:$vj)), (VNEG_W LSX128:$vj)>;
13735f757f3fSDimitry Andricdef : Pat<(sub immAllZerosV, (v2i64 LSX128:$vj)), (VNEG_D LSX128:$vj)>;
13745f757f3fSDimitry Andric
13755f757f3fSDimitry Andric// VMAX[I]_{B/H/W/D}[U]
13765f757f3fSDimitry Andricdefm : PatVrVr<smax, "VMAX">;
13775f757f3fSDimitry Andricdefm : PatVrVrU<umax, "VMAX">;
13785f757f3fSDimitry Andricdefm : PatVrSimm5<smax, "VMAXI">;
13795f757f3fSDimitry Andricdefm : PatVrUimm5<umax, "VMAXI">;
13805f757f3fSDimitry Andric
13815f757f3fSDimitry Andric// VMIN[I]_{B/H/W/D}[U]
13825f757f3fSDimitry Andricdefm : PatVrVr<smin, "VMIN">;
13835f757f3fSDimitry Andricdefm : PatVrVrU<umin, "VMIN">;
13845f757f3fSDimitry Andricdefm : PatVrSimm5<smin, "VMINI">;
13855f757f3fSDimitry Andricdefm : PatVrUimm5<umin, "VMINI">;
13865f757f3fSDimitry Andric
13875f757f3fSDimitry Andric// VMUL_{B/H/W/D}
13885f757f3fSDimitry Andricdefm : PatVrVr<mul, "VMUL">;
13895f757f3fSDimitry Andric
13905f757f3fSDimitry Andric// VMUH_{B/H/W/D}[U]
13915f757f3fSDimitry Andricdefm : PatVrVr<mulhs, "VMUH">;
13925f757f3fSDimitry Andricdefm : PatVrVrU<mulhu, "VMUH">;
13935f757f3fSDimitry Andric
13945f757f3fSDimitry Andric// VMADD_{B/H/W/D}
13955f757f3fSDimitry Andricdefm : PatVrVrVr<muladd, "VMADD">;
13965f757f3fSDimitry Andric// VMSUB_{B/H/W/D}
13975f757f3fSDimitry Andricdefm : PatVrVrVr<mulsub, "VMSUB">;
13985f757f3fSDimitry Andric
13995f757f3fSDimitry Andric// VDIV_{B/H/W/D}[U]
14005f757f3fSDimitry Andricdefm : PatVrVr<sdiv, "VDIV">;
14015f757f3fSDimitry Andricdefm : PatVrVrU<udiv, "VDIV">;
14025f757f3fSDimitry Andric
14035f757f3fSDimitry Andric// VMOD_{B/H/W/D}[U]
14045f757f3fSDimitry Andricdefm : PatVrVr<srem, "VMOD">;
14055f757f3fSDimitry Andricdefm : PatVrVrU<urem, "VMOD">;
14065f757f3fSDimitry Andric
14075f757f3fSDimitry Andric// VAND_V
14085f757f3fSDimitry Andricforeach vt = [v16i8, v8i16, v4i32, v2i64] in
14095f757f3fSDimitry Andricdef : Pat<(and (vt LSX128:$vj), (vt LSX128:$vk)),
14105f757f3fSDimitry Andric          (VAND_V LSX128:$vj, LSX128:$vk)>;
14115f757f3fSDimitry Andric// VOR_V
14125f757f3fSDimitry Andricforeach vt = [v16i8, v8i16, v4i32, v2i64] in
14135f757f3fSDimitry Andricdef : Pat<(or (vt LSX128:$vj), (vt LSX128:$vk)),
14145f757f3fSDimitry Andric          (VOR_V LSX128:$vj, LSX128:$vk)>;
14155f757f3fSDimitry Andric// VXOR_V
14165f757f3fSDimitry Andricforeach vt = [v16i8, v8i16, v4i32, v2i64] in
14175f757f3fSDimitry Andricdef : Pat<(xor (vt LSX128:$vj), (vt LSX128:$vk)),
14185f757f3fSDimitry Andric          (VXOR_V LSX128:$vj, LSX128:$vk)>;
14195f757f3fSDimitry Andric// VNOR_V
14205f757f3fSDimitry Andricforeach vt = [v16i8, v8i16, v4i32, v2i64] in
14215f757f3fSDimitry Andricdef : Pat<(vnot (or (vt LSX128:$vj), (vt LSX128:$vk))),
14225f757f3fSDimitry Andric          (VNOR_V LSX128:$vj, LSX128:$vk)>;
14235f757f3fSDimitry Andric
14245f757f3fSDimitry Andric// VANDI_B
14255f757f3fSDimitry Andricdef : Pat<(and (v16i8 LSX128:$vj), (v16i8 (SplatPat_uimm8 uimm8:$imm))),
14265f757f3fSDimitry Andric          (VANDI_B LSX128:$vj, uimm8:$imm)>;
14275f757f3fSDimitry Andric// VORI_B
14285f757f3fSDimitry Andricdef : Pat<(or (v16i8 LSX128:$vj), (v16i8 (SplatPat_uimm8 uimm8:$imm))),
14295f757f3fSDimitry Andric          (VORI_B LSX128:$vj, uimm8:$imm)>;
14305f757f3fSDimitry Andric
14315f757f3fSDimitry Andric// VXORI_B
14325f757f3fSDimitry Andricdef : Pat<(xor (v16i8 LSX128:$vj), (v16i8 (SplatPat_uimm8 uimm8:$imm))),
14335f757f3fSDimitry Andric          (VXORI_B LSX128:$vj, uimm8:$imm)>;
14345f757f3fSDimitry Andric
14355f757f3fSDimitry Andric// VSLL[I]_{B/H/W/D}
14365f757f3fSDimitry Andricdefm : PatVrVr<shl, "VSLL">;
14375f757f3fSDimitry Andricdefm : PatShiftVrVr<shl, "VSLL">;
14385f757f3fSDimitry Andricdefm : PatShiftVrUimm<shl, "VSLLI">;
14395f757f3fSDimitry Andric
14405f757f3fSDimitry Andric// VSRL[I]_{B/H/W/D}
14415f757f3fSDimitry Andricdefm : PatVrVr<srl, "VSRL">;
14425f757f3fSDimitry Andricdefm : PatShiftVrVr<srl, "VSRL">;
14435f757f3fSDimitry Andricdefm : PatShiftVrUimm<srl, "VSRLI">;
14445f757f3fSDimitry Andric
14455f757f3fSDimitry Andric// VSRA[I]_{B/H/W/D}
14465f757f3fSDimitry Andricdefm : PatVrVr<sra, "VSRA">;
14475f757f3fSDimitry Andricdefm : PatShiftVrVr<sra, "VSRA">;
14485f757f3fSDimitry Andricdefm : PatShiftVrUimm<sra, "VSRAI">;
14495f757f3fSDimitry Andric
14505f757f3fSDimitry Andric// VCLZ_{B/H/W/D}
14515f757f3fSDimitry Andricdefm : PatVr<ctlz, "VCLZ">;
14525f757f3fSDimitry Andric
14535f757f3fSDimitry Andric// VPCNT_{B/H/W/D}
14545f757f3fSDimitry Andricdefm : PatVr<ctpop, "VPCNT">;
14555f757f3fSDimitry Andric
14565f757f3fSDimitry Andric// VBITCLR_{B/H/W/D}
14575f757f3fSDimitry Andricdef : Pat<(and v16i8:$vj, (vnot (shl vsplat_imm_eq_1, v16i8:$vk))),
14585f757f3fSDimitry Andric          (v16i8 (VBITCLR_B v16i8:$vj, v16i8:$vk))>;
14595f757f3fSDimitry Andricdef : Pat<(and v8i16:$vj, (vnot (shl vsplat_imm_eq_1, v8i16:$vk))),
14605f757f3fSDimitry Andric          (v8i16 (VBITCLR_H v8i16:$vj, v8i16:$vk))>;
14615f757f3fSDimitry Andricdef : Pat<(and v4i32:$vj, (vnot (shl vsplat_imm_eq_1, v4i32:$vk))),
14625f757f3fSDimitry Andric          (v4i32 (VBITCLR_W v4i32:$vj, v4i32:$vk))>;
14635f757f3fSDimitry Andricdef : Pat<(and v2i64:$vj, (vnot (shl vsplat_imm_eq_1, v2i64:$vk))),
14645f757f3fSDimitry Andric          (v2i64 (VBITCLR_D v2i64:$vj, v2i64:$vk))>;
14655f757f3fSDimitry Andricdef : Pat<(and v16i8:$vj, (vnot (shl vsplat_imm_eq_1,
14665f757f3fSDimitry Andric                                     (vsplati8imm7 v16i8:$vk)))),
14675f757f3fSDimitry Andric          (v16i8 (VBITCLR_B v16i8:$vj, v16i8:$vk))>;
14685f757f3fSDimitry Andricdef : Pat<(and v8i16:$vj, (vnot (shl vsplat_imm_eq_1,
14695f757f3fSDimitry Andric                                     (vsplati16imm15 v8i16:$vk)))),
14705f757f3fSDimitry Andric          (v8i16 (VBITCLR_H v8i16:$vj, v8i16:$vk))>;
14715f757f3fSDimitry Andricdef : Pat<(and v4i32:$vj, (vnot (shl vsplat_imm_eq_1,
14725f757f3fSDimitry Andric                                     (vsplati32imm31 v4i32:$vk)))),
14735f757f3fSDimitry Andric          (v4i32 (VBITCLR_W v4i32:$vj, v4i32:$vk))>;
14745f757f3fSDimitry Andricdef : Pat<(and v2i64:$vj, (vnot (shl vsplat_imm_eq_1,
14755f757f3fSDimitry Andric                                     (vsplati64imm63 v2i64:$vk)))),
14765f757f3fSDimitry Andric          (v2i64 (VBITCLR_D v2i64:$vj, v2i64:$vk))>;
14775f757f3fSDimitry Andric
14785f757f3fSDimitry Andric// VBITCLRI_{B/H/W/D}
14795f757f3fSDimitry Andricdef : Pat<(and (v16i8 LSX128:$vj), (v16i8 (vsplat_uimm_inv_pow2 uimm3:$imm))),
14805f757f3fSDimitry Andric          (VBITCLRI_B LSX128:$vj, uimm3:$imm)>;
14815f757f3fSDimitry Andricdef : Pat<(and (v8i16 LSX128:$vj), (v8i16 (vsplat_uimm_inv_pow2 uimm4:$imm))),
14825f757f3fSDimitry Andric          (VBITCLRI_H LSX128:$vj, uimm4:$imm)>;
14835f757f3fSDimitry Andricdef : Pat<(and (v4i32 LSX128:$vj), (v4i32 (vsplat_uimm_inv_pow2 uimm5:$imm))),
14845f757f3fSDimitry Andric          (VBITCLRI_W LSX128:$vj, uimm5:$imm)>;
14855f757f3fSDimitry Andricdef : Pat<(and (v2i64 LSX128:$vj), (v2i64 (vsplat_uimm_inv_pow2 uimm6:$imm))),
14865f757f3fSDimitry Andric          (VBITCLRI_D LSX128:$vj, uimm6:$imm)>;
14875f757f3fSDimitry Andric
14885f757f3fSDimitry Andric// VBITSET_{B/H/W/D}
14895f757f3fSDimitry Andricdef : Pat<(or v16i8:$vj, (shl vsplat_imm_eq_1, v16i8:$vk)),
14905f757f3fSDimitry Andric          (v16i8 (VBITSET_B v16i8:$vj, v16i8:$vk))>;
14915f757f3fSDimitry Andricdef : Pat<(or v8i16:$vj, (shl vsplat_imm_eq_1, v8i16:$vk)),
14925f757f3fSDimitry Andric          (v8i16 (VBITSET_H v8i16:$vj, v8i16:$vk))>;
14935f757f3fSDimitry Andricdef : Pat<(or v4i32:$vj, (shl vsplat_imm_eq_1, v4i32:$vk)),
14945f757f3fSDimitry Andric          (v4i32 (VBITSET_W v4i32:$vj, v4i32:$vk))>;
14955f757f3fSDimitry Andricdef : Pat<(or v2i64:$vj, (shl vsplat_imm_eq_1, v2i64:$vk)),
14965f757f3fSDimitry Andric          (v2i64 (VBITSET_D v2i64:$vj, v2i64:$vk))>;
14975f757f3fSDimitry Andricdef : Pat<(or v16i8:$vj, (shl vsplat_imm_eq_1, (vsplati8imm7 v16i8:$vk))),
14985f757f3fSDimitry Andric          (v16i8 (VBITSET_B v16i8:$vj, v16i8:$vk))>;
14995f757f3fSDimitry Andricdef : Pat<(or v8i16:$vj, (shl vsplat_imm_eq_1, (vsplati16imm15 v8i16:$vk))),
15005f757f3fSDimitry Andric          (v8i16 (VBITSET_H v8i16:$vj, v8i16:$vk))>;
15015f757f3fSDimitry Andricdef : Pat<(or v4i32:$vj, (shl vsplat_imm_eq_1, (vsplati32imm31 v4i32:$vk))),
15025f757f3fSDimitry Andric          (v4i32 (VBITSET_W v4i32:$vj, v4i32:$vk))>;
15035f757f3fSDimitry Andricdef : Pat<(or v2i64:$vj, (shl vsplat_imm_eq_1, (vsplati64imm63 v2i64:$vk))),
15045f757f3fSDimitry Andric          (v2i64 (VBITSET_D v2i64:$vj, v2i64:$vk))>;
15055f757f3fSDimitry Andric
15065f757f3fSDimitry Andric// VBITSETI_{B/H/W/D}
15075f757f3fSDimitry Andricdef : Pat<(or (v16i8 LSX128:$vj), (v16i8 (vsplat_uimm_pow2 uimm3:$imm))),
15085f757f3fSDimitry Andric          (VBITSETI_B LSX128:$vj, uimm3:$imm)>;
15095f757f3fSDimitry Andricdef : Pat<(or (v8i16 LSX128:$vj), (v8i16 (vsplat_uimm_pow2 uimm4:$imm))),
15105f757f3fSDimitry Andric          (VBITSETI_H LSX128:$vj, uimm4:$imm)>;
15115f757f3fSDimitry Andricdef : Pat<(or (v4i32 LSX128:$vj), (v4i32 (vsplat_uimm_pow2 uimm5:$imm))),
15125f757f3fSDimitry Andric          (VBITSETI_W LSX128:$vj, uimm5:$imm)>;
15135f757f3fSDimitry Andricdef : Pat<(or (v2i64 LSX128:$vj), (v2i64 (vsplat_uimm_pow2 uimm6:$imm))),
15145f757f3fSDimitry Andric          (VBITSETI_D LSX128:$vj, uimm6:$imm)>;
15155f757f3fSDimitry Andric
15165f757f3fSDimitry Andric// VBITREV_{B/H/W/D}
15175f757f3fSDimitry Andricdef : Pat<(xor v16i8:$vj, (shl vsplat_imm_eq_1, v16i8:$vk)),
15185f757f3fSDimitry Andric          (v16i8 (VBITREV_B v16i8:$vj, v16i8:$vk))>;
15195f757f3fSDimitry Andricdef : Pat<(xor v8i16:$vj, (shl vsplat_imm_eq_1, v8i16:$vk)),
15205f757f3fSDimitry Andric          (v8i16 (VBITREV_H v8i16:$vj, v8i16:$vk))>;
15215f757f3fSDimitry Andricdef : Pat<(xor v4i32:$vj, (shl vsplat_imm_eq_1, v4i32:$vk)),
15225f757f3fSDimitry Andric          (v4i32 (VBITREV_W v4i32:$vj, v4i32:$vk))>;
15235f757f3fSDimitry Andricdef : Pat<(xor v2i64:$vj, (shl vsplat_imm_eq_1, v2i64:$vk)),
15245f757f3fSDimitry Andric          (v2i64 (VBITREV_D v2i64:$vj, v2i64:$vk))>;
15255f757f3fSDimitry Andricdef : Pat<(xor v16i8:$vj, (shl vsplat_imm_eq_1, (vsplati8imm7 v16i8:$vk))),
15265f757f3fSDimitry Andric          (v16i8 (VBITREV_B v16i8:$vj, v16i8:$vk))>;
15275f757f3fSDimitry Andricdef : Pat<(xor v8i16:$vj, (shl vsplat_imm_eq_1, (vsplati16imm15 v8i16:$vk))),
15285f757f3fSDimitry Andric          (v8i16 (VBITREV_H v8i16:$vj, v8i16:$vk))>;
15295f757f3fSDimitry Andricdef : Pat<(xor v4i32:$vj, (shl vsplat_imm_eq_1, (vsplati32imm31 v4i32:$vk))),
15305f757f3fSDimitry Andric          (v4i32 (VBITREV_W v4i32:$vj, v4i32:$vk))>;
15315f757f3fSDimitry Andricdef : Pat<(xor v2i64:$vj, (shl vsplat_imm_eq_1, (vsplati64imm63 v2i64:$vk))),
15325f757f3fSDimitry Andric          (v2i64 (VBITREV_D v2i64:$vj, v2i64:$vk))>;
15335f757f3fSDimitry Andric
15345f757f3fSDimitry Andric// VBITREVI_{B/H/W/D}
15355f757f3fSDimitry Andricdef : Pat<(xor (v16i8 LSX128:$vj), (v16i8 (vsplat_uimm_pow2 uimm3:$imm))),
15365f757f3fSDimitry Andric          (VBITREVI_B LSX128:$vj, uimm3:$imm)>;
15375f757f3fSDimitry Andricdef : Pat<(xor (v8i16 LSX128:$vj), (v8i16 (vsplat_uimm_pow2 uimm4:$imm))),
15385f757f3fSDimitry Andric          (VBITREVI_H LSX128:$vj, uimm4:$imm)>;
15395f757f3fSDimitry Andricdef : Pat<(xor (v4i32 LSX128:$vj), (v4i32 (vsplat_uimm_pow2 uimm5:$imm))),
15405f757f3fSDimitry Andric          (VBITREVI_W LSX128:$vj, uimm5:$imm)>;
15415f757f3fSDimitry Andricdef : Pat<(xor (v2i64 LSX128:$vj), (v2i64 (vsplat_uimm_pow2 uimm6:$imm))),
15425f757f3fSDimitry Andric          (VBITREVI_D LSX128:$vj, uimm6:$imm)>;
15435f757f3fSDimitry Andric
15445f757f3fSDimitry Andric// VFADD_{S/D}
15455f757f3fSDimitry Andricdefm : PatVrVrF<fadd, "VFADD">;
15465f757f3fSDimitry Andric
15475f757f3fSDimitry Andric// VFSUB_{S/D}
15485f757f3fSDimitry Andricdefm : PatVrVrF<fsub, "VFSUB">;
15495f757f3fSDimitry Andric
15505f757f3fSDimitry Andric// VFMUL_{S/D}
15515f757f3fSDimitry Andricdefm : PatVrVrF<fmul, "VFMUL">;
15525f757f3fSDimitry Andric
15535f757f3fSDimitry Andric// VFDIV_{S/D}
15545f757f3fSDimitry Andricdefm : PatVrVrF<fdiv, "VFDIV">;
15555f757f3fSDimitry Andric
15565f757f3fSDimitry Andric// VFMADD_{S/D}
15575f757f3fSDimitry Andricdef : Pat<(fma v4f32:$vj, v4f32:$vk, v4f32:$va),
15585f757f3fSDimitry Andric          (VFMADD_S v4f32:$vj, v4f32:$vk, v4f32:$va)>;
15595f757f3fSDimitry Andricdef : Pat<(fma v2f64:$vj, v2f64:$vk, v2f64:$va),
15605f757f3fSDimitry Andric          (VFMADD_D v2f64:$vj, v2f64:$vk, v2f64:$va)>;
15615f757f3fSDimitry Andric
15625f757f3fSDimitry Andric// VFMSUB_{S/D}
15635f757f3fSDimitry Andricdef : Pat<(fma v4f32:$vj, v4f32:$vk, (fneg v4f32:$va)),
15645f757f3fSDimitry Andric          (VFMSUB_S v4f32:$vj, v4f32:$vk, v4f32:$va)>;
15655f757f3fSDimitry Andricdef : Pat<(fma v2f64:$vj, v2f64:$vk, (fneg v2f64:$va)),
15665f757f3fSDimitry Andric          (VFMSUB_D v2f64:$vj, v2f64:$vk, v2f64:$va)>;
15675f757f3fSDimitry Andric
15685f757f3fSDimitry Andric// VFNMADD_{S/D}
15695f757f3fSDimitry Andricdef : Pat<(fneg (fma v4f32:$vj, v4f32:$vk, v4f32:$va)),
15705f757f3fSDimitry Andric          (VFNMADD_S v4f32:$vj, v4f32:$vk, v4f32:$va)>;
15715f757f3fSDimitry Andricdef : Pat<(fneg (fma v2f64:$vj, v2f64:$vk, v2f64:$va)),
15725f757f3fSDimitry Andric          (VFNMADD_D v2f64:$vj, v2f64:$vk, v2f64:$va)>;
15735f757f3fSDimitry Andricdef : Pat<(fma_nsz (fneg v4f32:$vj), v4f32:$vk, (fneg v4f32:$va)),
15745f757f3fSDimitry Andric          (VFNMADD_S v4f32:$vj, v4f32:$vk, v4f32:$va)>;
15755f757f3fSDimitry Andricdef : Pat<(fma_nsz (fneg v2f64:$vj), v2f64:$vk, (fneg v2f64:$va)),
15765f757f3fSDimitry Andric          (VFNMADD_D v2f64:$vj, v2f64:$vk, v2f64:$va)>;
15775f757f3fSDimitry Andric
15785f757f3fSDimitry Andric// VFNMSUB_{S/D}
15795f757f3fSDimitry Andricdef : Pat<(fneg (fma v4f32:$vj, v4f32:$vk, (fneg v4f32:$va))),
15805f757f3fSDimitry Andric          (VFNMSUB_S v4f32:$vj, v4f32:$vk, v4f32:$va)>;
15815f757f3fSDimitry Andricdef : Pat<(fneg (fma v2f64:$vj, v2f64:$vk, (fneg v2f64:$va))),
15825f757f3fSDimitry Andric          (VFNMSUB_D v2f64:$vj, v2f64:$vk, v2f64:$va)>;
15835f757f3fSDimitry Andricdef : Pat<(fma_nsz (fneg v4f32:$vj), v4f32:$vk, v4f32:$va),
15845f757f3fSDimitry Andric          (VFNMSUB_S v4f32:$vj, v4f32:$vk, v4f32:$va)>;
15855f757f3fSDimitry Andricdef : Pat<(fma_nsz (fneg v2f64:$vj), v2f64:$vk, v2f64:$va),
15865f757f3fSDimitry Andric          (VFNMSUB_D v2f64:$vj, v2f64:$vk, v2f64:$va)>;
15875f757f3fSDimitry Andric
15885f757f3fSDimitry Andric// VFSQRT_{S/D}
15895f757f3fSDimitry Andricdefm : PatVrF<fsqrt, "VFSQRT">;
15905f757f3fSDimitry Andric
15915f757f3fSDimitry Andric// VFRECIP_{S/D}
15925f757f3fSDimitry Andricdef : Pat<(fdiv vsplatf32_fpimm_eq_1, v4f32:$vj),
15935f757f3fSDimitry Andric          (VFRECIP_S v4f32:$vj)>;
15945f757f3fSDimitry Andricdef : Pat<(fdiv vsplatf64_fpimm_eq_1, v2f64:$vj),
15955f757f3fSDimitry Andric          (VFRECIP_D v2f64:$vj)>;
15965f757f3fSDimitry Andric
15975f757f3fSDimitry Andric// VFRSQRT_{S/D}
15985f757f3fSDimitry Andricdef : Pat<(fdiv vsplatf32_fpimm_eq_1, (fsqrt v4f32:$vj)),
15995f757f3fSDimitry Andric          (VFRSQRT_S v4f32:$vj)>;
16005f757f3fSDimitry Andricdef : Pat<(fdiv vsplatf64_fpimm_eq_1, (fsqrt v2f64:$vj)),
16015f757f3fSDimitry Andric          (VFRSQRT_D v2f64:$vj)>;
16025f757f3fSDimitry Andric
16035f757f3fSDimitry Andric// VSEQ[I]_{B/H/W/D}
16045f757f3fSDimitry Andricdefm : PatCCVrSimm5<SETEQ, "VSEQI">;
16055f757f3fSDimitry Andricdefm : PatCCVrVr<SETEQ, "VSEQ">;
16065f757f3fSDimitry Andric
16075f757f3fSDimitry Andric// VSLE[I]_{B/H/W/D}[U]
16085f757f3fSDimitry Andricdefm : PatCCVrSimm5<SETLE, "VSLEI">;
16095f757f3fSDimitry Andricdefm : PatCCVrUimm5<SETULE, "VSLEI">;
16105f757f3fSDimitry Andricdefm : PatCCVrVr<SETLE, "VSLE">;
16115f757f3fSDimitry Andricdefm : PatCCVrVrU<SETULE, "VSLE">;
16125f757f3fSDimitry Andric
16135f757f3fSDimitry Andric// VSLT[I]_{B/H/W/D}[U]
16145f757f3fSDimitry Andricdefm : PatCCVrSimm5<SETLT, "VSLTI">;
16155f757f3fSDimitry Andricdefm : PatCCVrUimm5<SETULT, "VSLTI">;
16165f757f3fSDimitry Andricdefm : PatCCVrVr<SETLT, "VSLT">;
16175f757f3fSDimitry Andricdefm : PatCCVrVrU<SETULT, "VSLT">;
16185f757f3fSDimitry Andric
16195f757f3fSDimitry Andric// VFCMP.cond.{S/D}
16205f757f3fSDimitry Andricdefm : PatCCVrVrF<SETEQ, "VFCMP_CEQ">;
16215f757f3fSDimitry Andricdefm : PatCCVrVrF<SETOEQ, "VFCMP_CEQ">;
16225f757f3fSDimitry Andricdefm : PatCCVrVrF<SETUEQ, "VFCMP_CUEQ">;
16235f757f3fSDimitry Andric
16245f757f3fSDimitry Andricdefm : PatCCVrVrF<SETLE, "VFCMP_CLE">;
16255f757f3fSDimitry Andricdefm : PatCCVrVrF<SETOLE, "VFCMP_CLE">;
16265f757f3fSDimitry Andricdefm : PatCCVrVrF<SETULE, "VFCMP_CULE">;
16275f757f3fSDimitry Andric
16285f757f3fSDimitry Andricdefm : PatCCVrVrF<SETLT, "VFCMP_CLT">;
16295f757f3fSDimitry Andricdefm : PatCCVrVrF<SETOLT, "VFCMP_CLT">;
16305f757f3fSDimitry Andricdefm : PatCCVrVrF<SETULT, "VFCMP_CULT">;
16315f757f3fSDimitry Andric
16325f757f3fSDimitry Andricdefm : PatCCVrVrF<SETNE, "VFCMP_CNE">;
16335f757f3fSDimitry Andricdefm : PatCCVrVrF<SETONE, "VFCMP_CNE">;
16345f757f3fSDimitry Andricdefm : PatCCVrVrF<SETUNE, "VFCMP_CUNE">;
16355f757f3fSDimitry Andric
16365f757f3fSDimitry Andricdefm : PatCCVrVrF<SETO, "VFCMP_COR">;
16375f757f3fSDimitry Andricdefm : PatCCVrVrF<SETUO, "VFCMP_CUN">;
16385f757f3fSDimitry Andric
16395f757f3fSDimitry Andric// VINSGR2VR_{B/H/W/D}
16405f757f3fSDimitry Andricdef : Pat<(vector_insert v16i8:$vd, GRLenVT:$rj, uimm4:$imm),
16415f757f3fSDimitry Andric          (VINSGR2VR_B v16i8:$vd, GRLenVT:$rj, uimm4:$imm)>;
16425f757f3fSDimitry Andricdef : Pat<(vector_insert v8i16:$vd, GRLenVT:$rj, uimm3:$imm),
16435f757f3fSDimitry Andric          (VINSGR2VR_H v8i16:$vd, GRLenVT:$rj, uimm3:$imm)>;
16445f757f3fSDimitry Andricdef : Pat<(vector_insert v4i32:$vd, GRLenVT:$rj, uimm2:$imm),
16455f757f3fSDimitry Andric          (VINSGR2VR_W v4i32:$vd, GRLenVT:$rj, uimm2:$imm)>;
16465f757f3fSDimitry Andricdef : Pat<(vector_insert v2i64:$vd, GRLenVT:$rj, uimm1:$imm),
16475f757f3fSDimitry Andric          (VINSGR2VR_D v2i64:$vd, GRLenVT:$rj, uimm1:$imm)>;
16485f757f3fSDimitry Andric
16495f757f3fSDimitry Andricdef : Pat<(vector_insert v4f32:$vd, FPR32:$fj, uimm2:$imm),
16505f757f3fSDimitry Andric          (VINSGR2VR_W $vd, (COPY_TO_REGCLASS FPR32:$fj, GPR), uimm2:$imm)>;
16515f757f3fSDimitry Andricdef : Pat<(vector_insert v2f64:$vd, FPR64:$fj, uimm1:$imm),
16525f757f3fSDimitry Andric          (VINSGR2VR_D $vd, (COPY_TO_REGCLASS FPR64:$fj, GPR), uimm1:$imm)>;
16535f757f3fSDimitry Andric
16545f757f3fSDimitry Andric// VPICKVE2GR_{B/H/W}[U]
16555f757f3fSDimitry Andricdef : Pat<(loongarch_vpick_sext_elt v16i8:$vd, uimm4:$imm, i8),
16565f757f3fSDimitry Andric          (VPICKVE2GR_B v16i8:$vd, uimm4:$imm)>;
16575f757f3fSDimitry Andricdef : Pat<(loongarch_vpick_sext_elt v8i16:$vd, uimm3:$imm, i16),
16585f757f3fSDimitry Andric          (VPICKVE2GR_H v8i16:$vd, uimm3:$imm)>;
16595f757f3fSDimitry Andricdef : Pat<(loongarch_vpick_sext_elt v4i32:$vd, uimm2:$imm, i32),
16605f757f3fSDimitry Andric          (VPICKVE2GR_W v4i32:$vd, uimm2:$imm)>;
16615f757f3fSDimitry Andric
16625f757f3fSDimitry Andricdef : Pat<(loongarch_vpick_zext_elt v16i8:$vd, uimm4:$imm, i8),
16635f757f3fSDimitry Andric          (VPICKVE2GR_BU v16i8:$vd, uimm4:$imm)>;
16645f757f3fSDimitry Andricdef : Pat<(loongarch_vpick_zext_elt v8i16:$vd, uimm3:$imm, i16),
16655f757f3fSDimitry Andric          (VPICKVE2GR_HU v8i16:$vd, uimm3:$imm)>;
16665f757f3fSDimitry Andricdef : Pat<(loongarch_vpick_zext_elt v4i32:$vd, uimm2:$imm, i32),
16675f757f3fSDimitry Andric          (VPICKVE2GR_WU v4i32:$vd, uimm2:$imm)>;
16685f757f3fSDimitry Andric
16695f757f3fSDimitry Andric// VREPLGR2VR_{B/H/W/D}
16705f757f3fSDimitry Andricdef : Pat<(lsxsplati8 GPR:$rj), (VREPLGR2VR_B GPR:$rj)>;
16715f757f3fSDimitry Andricdef : Pat<(lsxsplati16 GPR:$rj), (VREPLGR2VR_H GPR:$rj)>;
16725f757f3fSDimitry Andricdef : Pat<(lsxsplati32 GPR:$rj), (VREPLGR2VR_W GPR:$rj)>;
16735f757f3fSDimitry Andricdef : Pat<(lsxsplati64 GPR:$rj), (VREPLGR2VR_D GPR:$rj)>;
16745f757f3fSDimitry Andric
16755f757f3fSDimitry Andric// VREPLVE_{B/H/W/D}
16765f757f3fSDimitry Andricdef : Pat<(loongarch_vreplve v16i8:$vj, GRLenVT:$rk),
16775f757f3fSDimitry Andric          (VREPLVE_B v16i8:$vj, GRLenVT:$rk)>;
16785f757f3fSDimitry Andricdef : Pat<(loongarch_vreplve v8i16:$vj, GRLenVT:$rk),
16795f757f3fSDimitry Andric          (VREPLVE_H v8i16:$vj, GRLenVT:$rk)>;
16805f757f3fSDimitry Andricdef : Pat<(loongarch_vreplve v4i32:$vj, GRLenVT:$rk),
16815f757f3fSDimitry Andric          (VREPLVE_W v4i32:$vj, GRLenVT:$rk)>;
16825f757f3fSDimitry Andricdef : Pat<(loongarch_vreplve v2i64:$vj, GRLenVT:$rk),
16835f757f3fSDimitry Andric          (VREPLVE_D v2i64:$vj, GRLenVT:$rk)>;
16845f757f3fSDimitry Andric
16855f757f3fSDimitry Andric// VREPLVEI_{W/D}
16865f757f3fSDimitry Andricdef : Pat<(lsxsplatf32 FPR32:$fj),
16875f757f3fSDimitry Andric          (VREPLVEI_W (SUBREG_TO_REG (i64 0), FPR32:$fj, sub_32), 0)>;
16885f757f3fSDimitry Andricdef : Pat<(lsxsplatf64 FPR64:$fj),
16895f757f3fSDimitry Andric          (VREPLVEI_D (SUBREG_TO_REG (i64 0), FPR64:$fj, sub_64), 0)>;
16905f757f3fSDimitry Andric
16915f757f3fSDimitry Andric// Loads/Stores
16925f757f3fSDimitry Andricforeach vt = [v16i8, v8i16, v4i32, v2i64, v4f32, v2f64] in {
16935f757f3fSDimitry Andric  defm : LdPat<load, VLD, vt>;
16945f757f3fSDimitry Andric  def  : RegRegLdPat<load, VLDX, vt>;
16955f757f3fSDimitry Andric  defm : StPat<store, VST, LSX128, vt>;
16965f757f3fSDimitry Andric  def  : RegRegStPat<store, VSTX, LSX128, vt>;
16975f757f3fSDimitry Andric}
16985f757f3fSDimitry Andric
16995f757f3fSDimitry Andric// Vector extraction with constant index.
17005f757f3fSDimitry Andricdef : Pat<(i64 (vector_extract v16i8:$vj, uimm4:$imm)),
17015f757f3fSDimitry Andric          (VPICKVE2GR_B v16i8:$vj, uimm4:$imm)>;
17025f757f3fSDimitry Andricdef : Pat<(i64 (vector_extract v8i16:$vj, uimm3:$imm)),
17035f757f3fSDimitry Andric          (VPICKVE2GR_H v8i16:$vj, uimm3:$imm)>;
17045f757f3fSDimitry Andricdef : Pat<(i64 (vector_extract v4i32:$vj, uimm2:$imm)),
17055f757f3fSDimitry Andric          (VPICKVE2GR_W v4i32:$vj, uimm2:$imm)>;
17065f757f3fSDimitry Andricdef : Pat<(i64 (vector_extract v2i64:$vj, uimm1:$imm)),
17075f757f3fSDimitry Andric          (VPICKVE2GR_D v2i64:$vj, uimm1:$imm)>;
17085f757f3fSDimitry Andricdef : Pat<(f32 (vector_extract v4f32:$vj, uimm2:$imm)),
17095f757f3fSDimitry Andric          (f32 (EXTRACT_SUBREG (VREPLVEI_W v4f32:$vj, uimm2:$imm), sub_32))>;
17105f757f3fSDimitry Andricdef : Pat<(f64 (vector_extract v2f64:$vj, uimm1:$imm)),
17115f757f3fSDimitry Andric          (f64 (EXTRACT_SUBREG (VREPLVEI_D v2f64:$vj, uimm1:$imm), sub_64))>;
17125f757f3fSDimitry Andric
17135f757f3fSDimitry Andric// Vector extraction with variable index.
17145f757f3fSDimitry Andricdef : Pat<(i64 (vector_extract v16i8:$vj, i64:$rk)),
17155f757f3fSDimitry Andric          (SRAI_W (COPY_TO_REGCLASS (f32 (EXTRACT_SUBREG (VREPLVE_B v16i8:$vj,
17165f757f3fSDimitry Andric                                                                    i64:$rk),
17175f757f3fSDimitry Andric                                                         sub_32)),
17185f757f3fSDimitry Andric                                    GPR), (i64 24))>;
17195f757f3fSDimitry Andricdef : Pat<(i64 (vector_extract v8i16:$vj, i64:$rk)),
17205f757f3fSDimitry Andric          (SRAI_W (COPY_TO_REGCLASS (f32 (EXTRACT_SUBREG (VREPLVE_H v8i16:$vj,
17215f757f3fSDimitry Andric                                                                    i64:$rk),
17225f757f3fSDimitry Andric                                                         sub_32)),
17235f757f3fSDimitry Andric                                    GPR), (i64 16))>;
17245f757f3fSDimitry Andricdef : Pat<(i64 (vector_extract v4i32:$vj, i64:$rk)),
17255f757f3fSDimitry Andric          (COPY_TO_REGCLASS (f32 (EXTRACT_SUBREG (VREPLVE_W v4i32:$vj, i64:$rk),
17265f757f3fSDimitry Andric                                                 sub_32)),
17275f757f3fSDimitry Andric                            GPR)>;
17285f757f3fSDimitry Andricdef : Pat<(i64 (vector_extract v2i64:$vj, i64:$rk)),
17295f757f3fSDimitry Andric          (COPY_TO_REGCLASS (f64 (EXTRACT_SUBREG (VREPLVE_D v2i64:$vj, i64:$rk),
17305f757f3fSDimitry Andric                                                 sub_64)),
17315f757f3fSDimitry Andric                            GPR)>;
17325f757f3fSDimitry Andricdef : Pat<(f32 (vector_extract v4f32:$vj, i64:$rk)),
17335f757f3fSDimitry Andric          (f32 (EXTRACT_SUBREG (VREPLVE_W v4f32:$vj, i64:$rk), sub_32))>;
17345f757f3fSDimitry Andricdef : Pat<(f64 (vector_extract v2f64:$vj, i64:$rk)),
17355f757f3fSDimitry Andric          (f64 (EXTRACT_SUBREG (VREPLVE_D v2f64:$vj, i64:$rk), sub_64))>;
17365f757f3fSDimitry Andric
17375f757f3fSDimitry Andric// vselect
1738647cbc5dSDimitry Andricdef : Pat<(v16i8 (vselect LSX128:$vd, (v16i8 (SplatPat_uimm8 uimm8:$imm)),
1739647cbc5dSDimitry Andric                          LSX128:$vj)),
17405f757f3fSDimitry Andric          (VBITSELI_B LSX128:$vd, LSX128:$vj, uimm8:$imm)>;
17415f757f3fSDimitry Andricforeach vt = [v16i8, v8i16, v4i32, v2i64, v4f32, v2f64] in
17425f757f3fSDimitry Andric  def  : Pat<(vt (vselect LSX128:$va, LSX128:$vk, LSX128:$vj)),
17435f757f3fSDimitry Andric             (VBITSEL_V LSX128:$vj, LSX128:$vk, LSX128:$va)>;
17445f757f3fSDimitry Andric
17455f757f3fSDimitry Andric// fneg
17465f757f3fSDimitry Andricdef : Pat<(fneg (v4f32 LSX128:$vj)), (VBITREVI_W LSX128:$vj, 31)>;
17475f757f3fSDimitry Andricdef : Pat<(fneg (v2f64 LSX128:$vj)), (VBITREVI_D LSX128:$vj, 63)>;
17485f757f3fSDimitry Andric
1749*7a6dacacSDimitry Andric// VFFINT_{S_W/D_L}
1750*7a6dacacSDimitry Andricdef : Pat<(v4f32 (sint_to_fp v4i32:$vj)), (VFFINT_S_W v4i32:$vj)>;
1751*7a6dacacSDimitry Andricdef : Pat<(v2f64 (sint_to_fp v2i64:$vj)), (VFFINT_D_L v2i64:$vj)>;
1752*7a6dacacSDimitry Andric
1753*7a6dacacSDimitry Andric// VFFINT_{S_WU/D_LU}
1754*7a6dacacSDimitry Andricdef : Pat<(v4f32 (uint_to_fp v4i32:$vj)), (VFFINT_S_WU v4i32:$vj)>;
1755*7a6dacacSDimitry Andricdef : Pat<(v2f64 (uint_to_fp v2i64:$vj)), (VFFINT_D_LU v2i64:$vj)>;
1756*7a6dacacSDimitry Andric
1757*7a6dacacSDimitry Andric// VFTINTRZ_{W_S/L_D}
1758*7a6dacacSDimitry Andricdef : Pat<(v4i32 (fp_to_sint v4f32:$vj)), (VFTINTRZ_W_S v4f32:$vj)>;
1759*7a6dacacSDimitry Andricdef : Pat<(v2i64 (fp_to_sint v2f64:$vj)), (VFTINTRZ_L_D v2f64:$vj)>;
1760*7a6dacacSDimitry Andric
1761*7a6dacacSDimitry Andric// VFTINTRZ_{W_SU/L_DU}
1762*7a6dacacSDimitry Andricdef : Pat<(v4i32 (fp_to_uint v4f32:$vj)), (VFTINTRZ_WU_S v4f32:$vj)>;
1763*7a6dacacSDimitry Andricdef : Pat<(v2i64 (fp_to_uint v2f64:$vj)), (VFTINTRZ_LU_D v2f64:$vj)>;
1764*7a6dacacSDimitry Andric
17655f757f3fSDimitry Andric} // Predicates = [HasExtLSX]
17665f757f3fSDimitry Andric
17675f757f3fSDimitry Andric/// Intrinsic pattern
17685f757f3fSDimitry Andric
17695f757f3fSDimitry Andricclass deriveLSXIntrinsic<string Inst> {
17705f757f3fSDimitry Andric  Intrinsic ret = !cast<Intrinsic>(!tolower("int_loongarch_lsx_"#Inst));
17715f757f3fSDimitry Andric}
17725f757f3fSDimitry Andric
17735f757f3fSDimitry Andriclet Predicates = [HasExtLSX] in {
17745f757f3fSDimitry Andric
17755f757f3fSDimitry Andric// vty: v16i8/v8i16/v4i32/v2i64
17765f757f3fSDimitry Andric// Pat<(Intrinsic vty:$vj, vty:$vk),
17775f757f3fSDimitry Andric//     (LAInst vty:$vj, vty:$vk)>;
17785f757f3fSDimitry Andricforeach Inst = ["VSADD_B", "VSADD_BU", "VSSUB_B", "VSSUB_BU",
17795f757f3fSDimitry Andric                "VHADDW_H_B", "VHADDW_HU_BU", "VHSUBW_H_B", "VHSUBW_HU_BU",
17805f757f3fSDimitry Andric                "VADDWEV_H_B", "VADDWOD_H_B", "VSUBWEV_H_B", "VSUBWOD_H_B",
17815f757f3fSDimitry Andric                "VADDWEV_H_BU", "VADDWOD_H_BU", "VSUBWEV_H_BU", "VSUBWOD_H_BU",
17825f757f3fSDimitry Andric                "VADDWEV_H_BU_B", "VADDWOD_H_BU_B",
17835f757f3fSDimitry Andric                "VAVG_B", "VAVG_BU", "VAVGR_B", "VAVGR_BU",
17845f757f3fSDimitry Andric                "VABSD_B", "VABSD_BU", "VADDA_B", "VMUH_B", "VMUH_BU",
17855f757f3fSDimitry Andric                "VMULWEV_H_B", "VMULWOD_H_B", "VMULWEV_H_BU", "VMULWOD_H_BU",
17865f757f3fSDimitry Andric                "VMULWEV_H_BU_B", "VMULWOD_H_BU_B", "VSIGNCOV_B",
17875f757f3fSDimitry Andric                "VANDN_V", "VORN_V", "VROTR_B", "VSRLR_B", "VSRAR_B",
17885f757f3fSDimitry Andric                "VSEQ_B", "VSLE_B", "VSLE_BU", "VSLT_B", "VSLT_BU",
17895f757f3fSDimitry Andric                "VPACKEV_B", "VPACKOD_B", "VPICKEV_B", "VPICKOD_B",
17905f757f3fSDimitry Andric                "VILVL_B", "VILVH_B"] in
17915f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret
17925f757f3fSDimitry Andric               (v16i8 LSX128:$vj), (v16i8 LSX128:$vk)),
17935f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vj, LSX128:$vk)>;
17945f757f3fSDimitry Andricforeach Inst = ["VSADD_H", "VSADD_HU", "VSSUB_H", "VSSUB_HU",
17955f757f3fSDimitry Andric                "VHADDW_W_H", "VHADDW_WU_HU", "VHSUBW_W_H", "VHSUBW_WU_HU",
17965f757f3fSDimitry Andric                "VADDWEV_W_H", "VADDWOD_W_H", "VSUBWEV_W_H", "VSUBWOD_W_H",
17975f757f3fSDimitry Andric                "VADDWEV_W_HU", "VADDWOD_W_HU", "VSUBWEV_W_HU", "VSUBWOD_W_HU",
17985f757f3fSDimitry Andric                "VADDWEV_W_HU_H", "VADDWOD_W_HU_H",
17995f757f3fSDimitry Andric                "VAVG_H", "VAVG_HU", "VAVGR_H", "VAVGR_HU",
18005f757f3fSDimitry Andric                "VABSD_H", "VABSD_HU", "VADDA_H", "VMUH_H", "VMUH_HU",
18015f757f3fSDimitry Andric                "VMULWEV_W_H", "VMULWOD_W_H", "VMULWEV_W_HU", "VMULWOD_W_HU",
18025f757f3fSDimitry Andric                "VMULWEV_W_HU_H", "VMULWOD_W_HU_H", "VSIGNCOV_H", "VROTR_H",
18035f757f3fSDimitry Andric                "VSRLR_H", "VSRAR_H", "VSRLN_B_H", "VSRAN_B_H", "VSRLRN_B_H",
18045f757f3fSDimitry Andric                "VSRARN_B_H", "VSSRLN_B_H", "VSSRAN_B_H", "VSSRLN_BU_H",
18055f757f3fSDimitry Andric                "VSSRAN_BU_H", "VSSRLRN_B_H", "VSSRARN_B_H", "VSSRLRN_BU_H",
18065f757f3fSDimitry Andric                "VSSRARN_BU_H",
18075f757f3fSDimitry Andric                "VSEQ_H", "VSLE_H", "VSLE_HU", "VSLT_H", "VSLT_HU",
18085f757f3fSDimitry Andric                "VPACKEV_H", "VPACKOD_H", "VPICKEV_H", "VPICKOD_H",
18095f757f3fSDimitry Andric                "VILVL_H", "VILVH_H"] in
18105f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret
18115f757f3fSDimitry Andric               (v8i16 LSX128:$vj), (v8i16 LSX128:$vk)),
18125f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vj, LSX128:$vk)>;
18135f757f3fSDimitry Andricforeach Inst = ["VSADD_W", "VSADD_WU", "VSSUB_W", "VSSUB_WU",
18145f757f3fSDimitry Andric                "VHADDW_D_W", "VHADDW_DU_WU", "VHSUBW_D_W", "VHSUBW_DU_WU",
18155f757f3fSDimitry Andric                "VADDWEV_D_W", "VADDWOD_D_W", "VSUBWEV_D_W", "VSUBWOD_D_W",
18165f757f3fSDimitry Andric                "VADDWEV_D_WU", "VADDWOD_D_WU", "VSUBWEV_D_WU", "VSUBWOD_D_WU",
18175f757f3fSDimitry Andric                "VADDWEV_D_WU_W", "VADDWOD_D_WU_W",
18185f757f3fSDimitry Andric                "VAVG_W", "VAVG_WU", "VAVGR_W", "VAVGR_WU",
18195f757f3fSDimitry Andric                "VABSD_W", "VABSD_WU", "VADDA_W", "VMUH_W", "VMUH_WU",
18205f757f3fSDimitry Andric                "VMULWEV_D_W", "VMULWOD_D_W", "VMULWEV_D_WU", "VMULWOD_D_WU",
18215f757f3fSDimitry Andric                "VMULWEV_D_WU_W", "VMULWOD_D_WU_W", "VSIGNCOV_W", "VROTR_W",
18225f757f3fSDimitry Andric                "VSRLR_W", "VSRAR_W", "VSRLN_H_W", "VSRAN_H_W", "VSRLRN_H_W",
18235f757f3fSDimitry Andric                "VSRARN_H_W", "VSSRLN_H_W", "VSSRAN_H_W", "VSSRLN_HU_W",
18245f757f3fSDimitry Andric                "VSSRAN_HU_W", "VSSRLRN_H_W", "VSSRARN_H_W", "VSSRLRN_HU_W",
18255f757f3fSDimitry Andric                "VSSRARN_HU_W",
18265f757f3fSDimitry Andric                "VSEQ_W", "VSLE_W", "VSLE_WU", "VSLT_W", "VSLT_WU",
18275f757f3fSDimitry Andric                "VPACKEV_W", "VPACKOD_W", "VPICKEV_W", "VPICKOD_W",
18285f757f3fSDimitry Andric                "VILVL_W", "VILVH_W"] in
18295f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret
18305f757f3fSDimitry Andric               (v4i32 LSX128:$vj), (v4i32 LSX128:$vk)),
18315f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vj, LSX128:$vk)>;
18325f757f3fSDimitry Andricforeach Inst = ["VADD_Q", "VSUB_Q",
18335f757f3fSDimitry Andric                "VSADD_D", "VSADD_DU", "VSSUB_D", "VSSUB_DU",
18345f757f3fSDimitry Andric                "VHADDW_Q_D", "VHADDW_QU_DU", "VHSUBW_Q_D", "VHSUBW_QU_DU",
18355f757f3fSDimitry Andric                "VADDWEV_Q_D", "VADDWOD_Q_D", "VSUBWEV_Q_D", "VSUBWOD_Q_D",
18365f757f3fSDimitry Andric                "VADDWEV_Q_DU", "VADDWOD_Q_DU", "VSUBWEV_Q_DU", "VSUBWOD_Q_DU",
18375f757f3fSDimitry Andric                "VADDWEV_Q_DU_D", "VADDWOD_Q_DU_D",
18385f757f3fSDimitry Andric                "VAVG_D", "VAVG_DU", "VAVGR_D", "VAVGR_DU",
18395f757f3fSDimitry Andric                "VABSD_D", "VABSD_DU", "VADDA_D", "VMUH_D", "VMUH_DU",
18405f757f3fSDimitry Andric                "VMULWEV_Q_D", "VMULWOD_Q_D", "VMULWEV_Q_DU", "VMULWOD_Q_DU",
18415f757f3fSDimitry Andric                "VMULWEV_Q_DU_D", "VMULWOD_Q_DU_D", "VSIGNCOV_D", "VROTR_D",
18425f757f3fSDimitry Andric                "VSRLR_D", "VSRAR_D", "VSRLN_W_D", "VSRAN_W_D", "VSRLRN_W_D",
18435f757f3fSDimitry Andric                "VSRARN_W_D", "VSSRLN_W_D", "VSSRAN_W_D", "VSSRLN_WU_D",
18445f757f3fSDimitry Andric                "VSSRAN_WU_D", "VSSRLRN_W_D", "VSSRARN_W_D", "VSSRLRN_WU_D",
18455f757f3fSDimitry Andric                "VSSRARN_WU_D", "VFFINT_S_L",
18465f757f3fSDimitry Andric                "VSEQ_D", "VSLE_D", "VSLE_DU", "VSLT_D", "VSLT_DU",
18475f757f3fSDimitry Andric                "VPACKEV_D", "VPACKOD_D", "VPICKEV_D", "VPICKOD_D",
18485f757f3fSDimitry Andric                "VILVL_D", "VILVH_D"] in
18495f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret
18505f757f3fSDimitry Andric               (v2i64 LSX128:$vj), (v2i64 LSX128:$vk)),
18515f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vj, LSX128:$vk)>;
18525f757f3fSDimitry Andric
18535f757f3fSDimitry Andric// vty: v16i8/v8i16/v4i32/v2i64
18545f757f3fSDimitry Andric// Pat<(Intrinsic vty:$vd, vty:$vj, vty:$vk),
18555f757f3fSDimitry Andric//     (LAInst vty:$vd, vty:$vj, vty:$vk)>;
18565f757f3fSDimitry Andricforeach Inst = ["VMADDWEV_H_B", "VMADDWOD_H_B", "VMADDWEV_H_BU",
18575f757f3fSDimitry Andric                "VMADDWOD_H_BU", "VMADDWEV_H_BU_B", "VMADDWOD_H_BU_B"] in
18585f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret
18595f757f3fSDimitry Andric               (v8i16 LSX128:$vd), (v16i8 LSX128:$vj), (v16i8 LSX128:$vk)),
18605f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vd, LSX128:$vj, LSX128:$vk)>;
18615f757f3fSDimitry Andricforeach Inst = ["VMADDWEV_W_H", "VMADDWOD_W_H", "VMADDWEV_W_HU",
18625f757f3fSDimitry Andric                "VMADDWOD_W_HU", "VMADDWEV_W_HU_H", "VMADDWOD_W_HU_H"] in
18635f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret
18645f757f3fSDimitry Andric               (v4i32 LSX128:$vd), (v8i16 LSX128:$vj), (v8i16 LSX128:$vk)),
18655f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vd, LSX128:$vj, LSX128:$vk)>;
18665f757f3fSDimitry Andricforeach Inst = ["VMADDWEV_D_W", "VMADDWOD_D_W", "VMADDWEV_D_WU",
18675f757f3fSDimitry Andric                "VMADDWOD_D_WU", "VMADDWEV_D_WU_W", "VMADDWOD_D_WU_W"] in
18685f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret
18695f757f3fSDimitry Andric               (v2i64 LSX128:$vd), (v4i32 LSX128:$vj), (v4i32 LSX128:$vk)),
18705f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vd, LSX128:$vj, LSX128:$vk)>;
18715f757f3fSDimitry Andricforeach Inst = ["VMADDWEV_Q_D", "VMADDWOD_Q_D", "VMADDWEV_Q_DU",
18725f757f3fSDimitry Andric                "VMADDWOD_Q_DU", "VMADDWEV_Q_DU_D", "VMADDWOD_Q_DU_D"] in
18735f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret
18745f757f3fSDimitry Andric               (v2i64 LSX128:$vd), (v2i64 LSX128:$vj), (v2i64 LSX128:$vk)),
18755f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vd, LSX128:$vj, LSX128:$vk)>;
18765f757f3fSDimitry Andric
18775f757f3fSDimitry Andric// vty: v16i8/v8i16/v4i32/v2i64
18785f757f3fSDimitry Andric// Pat<(Intrinsic vty:$vj),
18795f757f3fSDimitry Andric//     (LAInst vty:$vj)>;
18805f757f3fSDimitry Andricforeach Inst = ["VEXTH_H_B", "VEXTH_HU_BU",
18815f757f3fSDimitry Andric                "VMSKLTZ_B", "VMSKGEZ_B", "VMSKNZ_B",
18825f757f3fSDimitry Andric                "VCLO_B"] in
18835f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret (v16i8 LSX128:$vj)),
18845f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vj)>;
18855f757f3fSDimitry Andricforeach Inst = ["VEXTH_W_H", "VEXTH_WU_HU", "VMSKLTZ_H",
18865f757f3fSDimitry Andric                "VCLO_H", "VFCVTL_S_H", "VFCVTH_S_H"] in
18875f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret (v8i16 LSX128:$vj)),
18885f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vj)>;
18895f757f3fSDimitry Andricforeach Inst = ["VEXTH_D_W", "VEXTH_DU_WU", "VMSKLTZ_W",
18905f757f3fSDimitry Andric                "VCLO_W", "VFFINT_S_W", "VFFINT_S_WU",
18915f757f3fSDimitry Andric                "VFFINTL_D_W", "VFFINTH_D_W"] in
18925f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret (v4i32 LSX128:$vj)),
18935f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vj)>;
18945f757f3fSDimitry Andricforeach Inst = ["VEXTH_Q_D", "VEXTH_QU_DU", "VMSKLTZ_D",
18955f757f3fSDimitry Andric                "VEXTL_Q_D", "VEXTL_QU_DU",
18965f757f3fSDimitry Andric                "VCLO_D", "VFFINT_D_L", "VFFINT_D_LU"] in
18975f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret (v2i64 LSX128:$vj)),
18985f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vj)>;
18995f757f3fSDimitry Andric
19005f757f3fSDimitry Andric// Pat<(Intrinsic timm:$imm)
19015f757f3fSDimitry Andric//     (LAInst timm:$imm)>;
19025f757f3fSDimitry Andricdef : Pat<(int_loongarch_lsx_vldi timm:$imm),
19035f757f3fSDimitry Andric          (VLDI (to_valid_timm timm:$imm))>;
19045f757f3fSDimitry Andricforeach Inst = ["VREPLI_B", "VREPLI_H", "VREPLI_W", "VREPLI_D"] in
19055f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret timm:$imm),
19065f757f3fSDimitry Andric            (!cast<LAInst>("Pseudo"#Inst) (to_valid_timm timm:$imm))>;
19075f757f3fSDimitry Andric
19085f757f3fSDimitry Andric// vty: v16i8/v8i16/v4i32/v2i64
19095f757f3fSDimitry Andric// Pat<(Intrinsic vty:$vj, timm:$imm)
19105f757f3fSDimitry Andric//     (LAInst vty:$vj, timm:$imm)>;
19115f757f3fSDimitry Andricforeach Inst = ["VSAT_B", "VSAT_BU", "VNORI_B", "VROTRI_B", "VSLLWIL_H_B",
19125f757f3fSDimitry Andric                "VSLLWIL_HU_BU", "VSRLRI_B", "VSRARI_B",
19135f757f3fSDimitry Andric                "VSEQI_B", "VSLEI_B", "VSLEI_BU", "VSLTI_B", "VSLTI_BU",
19145f757f3fSDimitry Andric                "VREPLVEI_B", "VBSLL_V", "VBSRL_V", "VSHUF4I_B"] in
19155f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret (v16i8 LSX128:$vj), timm:$imm),
19165f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vj, (to_valid_timm timm:$imm))>;
19175f757f3fSDimitry Andricforeach Inst = ["VSAT_H", "VSAT_HU", "VROTRI_H", "VSLLWIL_W_H",
19185f757f3fSDimitry Andric                "VSLLWIL_WU_HU", "VSRLRI_H", "VSRARI_H",
19195f757f3fSDimitry Andric                "VSEQI_H", "VSLEI_H", "VSLEI_HU", "VSLTI_H", "VSLTI_HU",
19205f757f3fSDimitry Andric                "VREPLVEI_H", "VSHUF4I_H"] in
19215f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret (v8i16 LSX128:$vj), timm:$imm),
19225f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vj, (to_valid_timm timm:$imm))>;
19235f757f3fSDimitry Andricforeach Inst = ["VSAT_W", "VSAT_WU", "VROTRI_W", "VSLLWIL_D_W",
19245f757f3fSDimitry Andric                "VSLLWIL_DU_WU", "VSRLRI_W", "VSRARI_W",
19255f757f3fSDimitry Andric                "VSEQI_W", "VSLEI_W", "VSLEI_WU", "VSLTI_W", "VSLTI_WU",
19265f757f3fSDimitry Andric                "VREPLVEI_W", "VSHUF4I_W"] in
19275f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret (v4i32 LSX128:$vj), timm:$imm),
19285f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vj, (to_valid_timm timm:$imm))>;
19295f757f3fSDimitry Andricforeach Inst = ["VSAT_D", "VSAT_DU", "VROTRI_D", "VSRLRI_D", "VSRARI_D",
19305f757f3fSDimitry Andric                "VSEQI_D", "VSLEI_D", "VSLEI_DU", "VSLTI_D", "VSLTI_DU",
19315f757f3fSDimitry Andric                "VPICKVE2GR_D", "VPICKVE2GR_DU",
19325f757f3fSDimitry Andric                "VREPLVEI_D"] in
19335f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret (v2i64 LSX128:$vj), timm:$imm),
19345f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vj, (to_valid_timm timm:$imm))>;
19355f757f3fSDimitry Andric
19365f757f3fSDimitry Andric// vty: v16i8/v8i16/v4i32/v2i64
19375f757f3fSDimitry Andric// Pat<(Intrinsic vty:$vd, vty:$vj, timm:$imm)
19385f757f3fSDimitry Andric//     (LAInst vty:$vd, vty:$vj, timm:$imm)>;
19395f757f3fSDimitry Andricforeach Inst = ["VSRLNI_B_H", "VSRANI_B_H", "VSRLRNI_B_H", "VSRARNI_B_H",
19405f757f3fSDimitry Andric                "VSSRLNI_B_H", "VSSRANI_B_H", "VSSRLNI_BU_H", "VSSRANI_BU_H",
19415f757f3fSDimitry Andric                "VSSRLRNI_B_H", "VSSRARNI_B_H", "VSSRLRNI_BU_H", "VSSRARNI_BU_H",
19425f757f3fSDimitry Andric                "VFRSTPI_B", "VBITSELI_B", "VEXTRINS_B"] in
19435f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret
19445f757f3fSDimitry Andric               (v16i8 LSX128:$vd), (v16i8 LSX128:$vj), timm:$imm),
19455f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vd, LSX128:$vj,
19465f757f3fSDimitry Andric               (to_valid_timm timm:$imm))>;
19475f757f3fSDimitry Andricforeach Inst = ["VSRLNI_H_W", "VSRANI_H_W", "VSRLRNI_H_W", "VSRARNI_H_W",
19485f757f3fSDimitry Andric                "VSSRLNI_H_W", "VSSRANI_H_W", "VSSRLNI_HU_W", "VSSRANI_HU_W",
19495f757f3fSDimitry Andric                "VSSRLRNI_H_W", "VSSRARNI_H_W", "VSSRLRNI_HU_W", "VSSRARNI_HU_W",
19505f757f3fSDimitry Andric                "VFRSTPI_H", "VEXTRINS_H"] in
19515f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret
19525f757f3fSDimitry Andric               (v8i16 LSX128:$vd), (v8i16 LSX128:$vj), timm:$imm),
19535f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vd, LSX128:$vj,
19545f757f3fSDimitry Andric               (to_valid_timm timm:$imm))>;
19555f757f3fSDimitry Andricforeach Inst = ["VSRLNI_W_D", "VSRANI_W_D", "VSRLRNI_W_D", "VSRARNI_W_D",
19565f757f3fSDimitry Andric                "VSSRLNI_W_D", "VSSRANI_W_D", "VSSRLNI_WU_D", "VSSRANI_WU_D",
19575f757f3fSDimitry Andric                "VSSRLRNI_W_D", "VSSRARNI_W_D", "VSSRLRNI_WU_D", "VSSRARNI_WU_D",
19585f757f3fSDimitry Andric                "VPERMI_W", "VEXTRINS_W"] in
19595f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret
19605f757f3fSDimitry Andric               (v4i32 LSX128:$vd), (v4i32 LSX128:$vj), timm:$imm),
19615f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vd, LSX128:$vj,
19625f757f3fSDimitry Andric               (to_valid_timm timm:$imm))>;
19635f757f3fSDimitry Andricforeach Inst = ["VSRLNI_D_Q", "VSRANI_D_Q", "VSRLRNI_D_Q", "VSRARNI_D_Q",
19645f757f3fSDimitry Andric                "VSSRLNI_D_Q", "VSSRANI_D_Q", "VSSRLNI_DU_Q", "VSSRANI_DU_Q",
19655f757f3fSDimitry Andric                "VSSRLRNI_D_Q", "VSSRARNI_D_Q", "VSSRLRNI_DU_Q", "VSSRARNI_DU_Q",
19665f757f3fSDimitry Andric                "VSHUF4I_D", "VEXTRINS_D"] in
19675f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret
19685f757f3fSDimitry Andric               (v2i64 LSX128:$vd), (v2i64 LSX128:$vj), timm:$imm),
19695f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vd, LSX128:$vj,
19705f757f3fSDimitry Andric               (to_valid_timm timm:$imm))>;
19715f757f3fSDimitry Andric
19725f757f3fSDimitry Andric// vty: v16i8/v8i16/v4i32/v2i64
19735f757f3fSDimitry Andric// Pat<(Intrinsic vty:$vd, vty:$vj, vty:$vk),
19745f757f3fSDimitry Andric//     (LAInst vty:$vd, vty:$vj, vty:$vk)>;
19755f757f3fSDimitry Andricforeach Inst = ["VFRSTP_B", "VBITSEL_V", "VSHUF_B"] in
19765f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret
19775f757f3fSDimitry Andric               (v16i8 LSX128:$vd), (v16i8 LSX128:$vj), (v16i8 LSX128:$vk)),
19785f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vd, LSX128:$vj, LSX128:$vk)>;
19795f757f3fSDimitry Andricforeach Inst = ["VFRSTP_H", "VSHUF_H"] in
19805f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret
19815f757f3fSDimitry Andric               (v8i16 LSX128:$vd), (v8i16 LSX128:$vj), (v8i16 LSX128:$vk)),
19825f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vd, LSX128:$vj, LSX128:$vk)>;
19835f757f3fSDimitry Andricdef : Pat<(int_loongarch_lsx_vshuf_w (v4i32 LSX128:$vd), (v4i32 LSX128:$vj),
19845f757f3fSDimitry Andric                                     (v4i32 LSX128:$vk)),
19855f757f3fSDimitry Andric          (VSHUF_W LSX128:$vd, LSX128:$vj, LSX128:$vk)>;
19865f757f3fSDimitry Andricdef : Pat<(int_loongarch_lsx_vshuf_d (v2i64 LSX128:$vd), (v2i64 LSX128:$vj),
19875f757f3fSDimitry Andric                                     (v2i64 LSX128:$vk)),
19885f757f3fSDimitry Andric          (VSHUF_D LSX128:$vd, LSX128:$vj, LSX128:$vk)>;
19895f757f3fSDimitry Andric
19905f757f3fSDimitry Andric// vty: v4f32/v2f64
19915f757f3fSDimitry Andric// Pat<(Intrinsic vty:$vj, vty:$vk, vty:$va),
19925f757f3fSDimitry Andric//     (LAInst vty:$vj, vty:$vk, vty:$va)>;
19935f757f3fSDimitry Andricforeach Inst = ["VFMSUB_S", "VFNMADD_S", "VFNMSUB_S"] in
19945f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret
19955f757f3fSDimitry Andric               (v4f32 LSX128:$vj), (v4f32 LSX128:$vk), (v4f32 LSX128:$va)),
19965f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vj, LSX128:$vk, LSX128:$va)>;
19975f757f3fSDimitry Andricforeach Inst = ["VFMSUB_D", "VFNMADD_D", "VFNMSUB_D"] in
19985f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret
19995f757f3fSDimitry Andric               (v2f64 LSX128:$vj), (v2f64 LSX128:$vk), (v2f64 LSX128:$va)),
20005f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vj, LSX128:$vk, LSX128:$va)>;
20015f757f3fSDimitry Andric
20025f757f3fSDimitry Andric// vty: v4f32/v2f64
20035f757f3fSDimitry Andric// Pat<(Intrinsic vty:$vj, vty:$vk),
20045f757f3fSDimitry Andric//     (LAInst vty:$vj, vty:$vk)>;
20055f757f3fSDimitry Andricforeach Inst = ["VFMAX_S", "VFMIN_S", "VFMAXA_S", "VFMINA_S", "VFCVT_H_S",
20065f757f3fSDimitry Andric                "VFCMP_CAF_S", "VFCMP_CUN_S", "VFCMP_CEQ_S", "VFCMP_CUEQ_S",
20075f757f3fSDimitry Andric                "VFCMP_CLT_S", "VFCMP_CULT_S", "VFCMP_CLE_S", "VFCMP_CULE_S",
20085f757f3fSDimitry Andric                "VFCMP_CNE_S", "VFCMP_COR_S", "VFCMP_CUNE_S",
20095f757f3fSDimitry Andric                "VFCMP_SAF_S", "VFCMP_SUN_S", "VFCMP_SEQ_S", "VFCMP_SUEQ_S",
20105f757f3fSDimitry Andric                "VFCMP_SLT_S", "VFCMP_SULT_S", "VFCMP_SLE_S", "VFCMP_SULE_S",
20115f757f3fSDimitry Andric                "VFCMP_SNE_S", "VFCMP_SOR_S", "VFCMP_SUNE_S"] in
20125f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret
20135f757f3fSDimitry Andric               (v4f32 LSX128:$vj), (v4f32 LSX128:$vk)),
20145f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vj, LSX128:$vk)>;
20155f757f3fSDimitry Andricforeach Inst = ["VFMAX_D", "VFMIN_D", "VFMAXA_D", "VFMINA_D", "VFCVT_S_D",
20165f757f3fSDimitry Andric                "VFTINTRNE_W_D", "VFTINTRZ_W_D", "VFTINTRP_W_D", "VFTINTRM_W_D",
20175f757f3fSDimitry Andric                "VFTINT_W_D",
20185f757f3fSDimitry Andric                "VFCMP_CAF_D", "VFCMP_CUN_D", "VFCMP_CEQ_D", "VFCMP_CUEQ_D",
20195f757f3fSDimitry Andric                "VFCMP_CLT_D", "VFCMP_CULT_D", "VFCMP_CLE_D", "VFCMP_CULE_D",
20205f757f3fSDimitry Andric                "VFCMP_CNE_D", "VFCMP_COR_D", "VFCMP_CUNE_D",
20215f757f3fSDimitry Andric                "VFCMP_SAF_D", "VFCMP_SUN_D", "VFCMP_SEQ_D", "VFCMP_SUEQ_D",
20225f757f3fSDimitry Andric                "VFCMP_SLT_D", "VFCMP_SULT_D", "VFCMP_SLE_D", "VFCMP_SULE_D",
20235f757f3fSDimitry Andric                "VFCMP_SNE_D", "VFCMP_SOR_D", "VFCMP_SUNE_D"] in
20245f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret
20255f757f3fSDimitry Andric               (v2f64 LSX128:$vj), (v2f64 LSX128:$vk)),
20265f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vj, LSX128:$vk)>;
20275f757f3fSDimitry Andric
20285f757f3fSDimitry Andric// vty: v4f32/v2f64
20295f757f3fSDimitry Andric// Pat<(Intrinsic vty:$vj),
20305f757f3fSDimitry Andric//     (LAInst vty:$vj)>;
20315f757f3fSDimitry Andricforeach Inst = ["VFLOGB_S", "VFCLASS_S", "VFSQRT_S", "VFRECIP_S", "VFRSQRT_S",
20325f757f3fSDimitry Andric                "VFRINT_S", "VFCVTL_D_S", "VFCVTH_D_S",
20335f757f3fSDimitry Andric                "VFRINTRNE_S", "VFRINTRZ_S", "VFRINTRP_S", "VFRINTRM_S",
20345f757f3fSDimitry Andric                "VFTINTRNE_W_S", "VFTINTRZ_W_S", "VFTINTRP_W_S", "VFTINTRM_W_S",
20355f757f3fSDimitry Andric                "VFTINT_W_S", "VFTINTRZ_WU_S", "VFTINT_WU_S",
20365f757f3fSDimitry Andric                "VFTINTRNEL_L_S", "VFTINTRNEH_L_S", "VFTINTRZL_L_S",
20375f757f3fSDimitry Andric                "VFTINTRZH_L_S", "VFTINTRPL_L_S", "VFTINTRPH_L_S",
20385f757f3fSDimitry Andric                "VFTINTRML_L_S", "VFTINTRMH_L_S", "VFTINTL_L_S",
20395f757f3fSDimitry Andric                "VFTINTH_L_S"] in
20405f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret (v4f32 LSX128:$vj)),
20415f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vj)>;
20425f757f3fSDimitry Andricforeach Inst = ["VFLOGB_D", "VFCLASS_D", "VFSQRT_D", "VFRECIP_D", "VFRSQRT_D",
20435f757f3fSDimitry Andric                "VFRINT_D",
20445f757f3fSDimitry Andric                "VFRINTRNE_D", "VFRINTRZ_D", "VFRINTRP_D", "VFRINTRM_D",
20455f757f3fSDimitry Andric                "VFTINTRNE_L_D", "VFTINTRZ_L_D", "VFTINTRP_L_D", "VFTINTRM_L_D",
20465f757f3fSDimitry Andric                "VFTINT_L_D", "VFTINTRZ_LU_D", "VFTINT_LU_D"] in
20475f757f3fSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret (v2f64 LSX128:$vj)),
20485f757f3fSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vj)>;
20495f757f3fSDimitry Andric
2050*7a6dacacSDimitry Andric// 128-Bit vector FP approximate reciprocal operation
2051*7a6dacacSDimitry Andriclet Predicates = [HasFrecipe] in {
2052*7a6dacacSDimitry Andricforeach Inst = ["VFRECIPE_S", "VFRSQRTE_S"] in
2053*7a6dacacSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret (v4f32 LSX128:$vj)),
2054*7a6dacacSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vj)>;
2055*7a6dacacSDimitry Andricforeach Inst = ["VFRECIPE_D", "VFRSQRTE_D"] in
2056*7a6dacacSDimitry Andric  def : Pat<(deriveLSXIntrinsic<Inst>.ret (v2f64 LSX128:$vj)),
2057*7a6dacacSDimitry Andric            (!cast<LAInst>(Inst) LSX128:$vj)>;
2058*7a6dacacSDimitry Andric}
2059*7a6dacacSDimitry Andric
20605f757f3fSDimitry Andric// load
20615f757f3fSDimitry Andricdef : Pat<(int_loongarch_lsx_vld GPR:$rj, timm:$imm),
20625f757f3fSDimitry Andric          (VLD GPR:$rj, (to_valid_timm timm:$imm))>;
20635f757f3fSDimitry Andricdef : Pat<(int_loongarch_lsx_vldx GPR:$rj, GPR:$rk),
20645f757f3fSDimitry Andric          (VLDX GPR:$rj, GPR:$rk)>;
20655f757f3fSDimitry Andric
20665f757f3fSDimitry Andricdef : Pat<(int_loongarch_lsx_vldrepl_b GPR:$rj, timm:$imm),
20675f757f3fSDimitry Andric          (VLDREPL_B GPR:$rj, (to_valid_timm timm:$imm))>;
20685f757f3fSDimitry Andricdef : Pat<(int_loongarch_lsx_vldrepl_h GPR:$rj, timm:$imm),
20695f757f3fSDimitry Andric          (VLDREPL_H GPR:$rj, (to_valid_timm timm:$imm))>;
20705f757f3fSDimitry Andricdef : Pat<(int_loongarch_lsx_vldrepl_w GPR:$rj, timm:$imm),
20715f757f3fSDimitry Andric          (VLDREPL_W GPR:$rj, (to_valid_timm timm:$imm))>;
20725f757f3fSDimitry Andricdef : Pat<(int_loongarch_lsx_vldrepl_d GPR:$rj, timm:$imm),
20735f757f3fSDimitry Andric          (VLDREPL_D GPR:$rj, (to_valid_timm timm:$imm))>;
20745f757f3fSDimitry Andric
20755f757f3fSDimitry Andric// store
20765f757f3fSDimitry Andricdef : Pat<(int_loongarch_lsx_vst LSX128:$vd, GPR:$rj, timm:$imm),
20775f757f3fSDimitry Andric          (VST LSX128:$vd, GPR:$rj, (to_valid_timm timm:$imm))>;
20785f757f3fSDimitry Andricdef : Pat<(int_loongarch_lsx_vstx LSX128:$vd, GPR:$rj, GPR:$rk),
20795f757f3fSDimitry Andric          (VSTX LSX128:$vd, GPR:$rj, GPR:$rk)>;
20805f757f3fSDimitry Andric
20815f757f3fSDimitry Andricdef : Pat<(int_loongarch_lsx_vstelm_b v16i8:$vd, GPR:$rj, timm:$imm, timm:$idx),
20825f757f3fSDimitry Andric          (VSTELM_B v16i8:$vd, GPR:$rj, (to_valid_timm timm:$imm),
20835f757f3fSDimitry Andric                    (to_valid_timm timm:$idx))>;
20845f757f3fSDimitry Andricdef : Pat<(int_loongarch_lsx_vstelm_h v8i16:$vd, GPR:$rj, timm:$imm, timm:$idx),
20855f757f3fSDimitry Andric          (VSTELM_H v8i16:$vd, GPR:$rj, (to_valid_timm timm:$imm),
20865f757f3fSDimitry Andric                    (to_valid_timm timm:$idx))>;
20875f757f3fSDimitry Andricdef : Pat<(int_loongarch_lsx_vstelm_w v4i32:$vd, GPR:$rj, timm:$imm, timm:$idx),
20885f757f3fSDimitry Andric          (VSTELM_W v4i32:$vd, GPR:$rj, (to_valid_timm timm:$imm),
20895f757f3fSDimitry Andric                    (to_valid_timm timm:$idx))>;
20905f757f3fSDimitry Andricdef : Pat<(int_loongarch_lsx_vstelm_d v2i64:$vd, GPR:$rj, timm:$imm, timm:$idx),
20915f757f3fSDimitry Andric          (VSTELM_D v2i64:$vd, GPR:$rj, (to_valid_timm timm:$imm),
20925f757f3fSDimitry Andric                    (to_valid_timm timm:$idx))>;
20935f757f3fSDimitry Andric
209406c3fb27SDimitry Andric} // Predicates = [HasExtLSX]
2095