mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[SVE] Fix shift-by-imm patterns used by asr, lsl & lsr intrinsics.
Right shift patterns will no longer incorrectly accept a shift amount of zero. At the same time they will allow larger shift amounts that are now saturated to their upper bound. Patterns have been extended to enable immediate forms for shifts taking an arbitrary predicate. This patch also unifies the code path for immediate parsing so the i64 based shifts are no longer treated specially. Differential Revision: https://reviews.llvm.org/D86084
This commit is contained in:
parent
ba17d3abc4
commit
17b7f05023
@ -190,9 +190,9 @@ public:
|
|||||||
return SelectSVELogicalImm(N, VT, Imm);
|
return SelectSVELogicalImm(N, VT, Imm);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <unsigned Low, unsigned High>
|
template <unsigned Low, unsigned High, bool AllowSaturation = false>
|
||||||
bool SelectSVEShiftImm64(SDValue N, SDValue &Imm) {
|
bool SelectSVEShiftImm(SDValue N, SDValue &Imm) {
|
||||||
return SelectSVEShiftImm64(N, Low, High, Imm);
|
return SelectSVEShiftImm(N, Low, High, AllowSaturation, Imm);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns a suitable CNT/INC/DEC/RDVL multiplier to calculate VSCALE*N.
|
// Returns a suitable CNT/INC/DEC/RDVL multiplier to calculate VSCALE*N.
|
||||||
@ -323,8 +323,8 @@ private:
|
|||||||
bool SelectSVELogicalImm(SDValue N, MVT VT, SDValue &Imm);
|
bool SelectSVELogicalImm(SDValue N, MVT VT, SDValue &Imm);
|
||||||
|
|
||||||
bool SelectSVESignedArithImm(SDValue N, SDValue &Imm);
|
bool SelectSVESignedArithImm(SDValue N, SDValue &Imm);
|
||||||
bool SelectSVEShiftImm64(SDValue N, uint64_t Low, uint64_t High,
|
bool SelectSVEShiftImm(SDValue N, uint64_t Low, uint64_t High,
|
||||||
SDValue &Imm);
|
bool AllowSaturation, SDValue &Imm);
|
||||||
|
|
||||||
bool SelectSVEArithImm(SDValue N, SDValue &Imm);
|
bool SelectSVEArithImm(SDValue N, SDValue &Imm);
|
||||||
bool SelectSVERegRegAddrMode(SDValue N, unsigned Scale, SDValue &Base,
|
bool SelectSVERegRegAddrMode(SDValue N, unsigned Scale, SDValue &Base,
|
||||||
@ -3177,19 +3177,30 @@ bool AArch64DAGToDAGISel::SelectSVELogicalImm(SDValue N, MVT VT, SDValue &Imm) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method is only needed to "cast" i64s into i32s when the value
|
// SVE shift intrinsics allow shift amounts larger than the element's bitwidth.
|
||||||
// is a valid shift which has been splatted into a vector with i64 elements.
|
// Rather than attempt to normalise everything we can sometimes saturate the
|
||||||
// Every other type is fine in tablegen.
|
// shift amount during selection. This function also allows for consistent
|
||||||
bool AArch64DAGToDAGISel::SelectSVEShiftImm64(SDValue N, uint64_t Low,
|
// isel patterns by ensuring the resulting "Imm" node is of the i32 type
|
||||||
uint64_t High, SDValue &Imm) {
|
// required by the instructions.
|
||||||
|
bool AArch64DAGToDAGISel::SelectSVEShiftImm(SDValue N, uint64_t Low,
|
||||||
|
uint64_t High, bool AllowSaturation,
|
||||||
|
SDValue &Imm) {
|
||||||
if (auto *CN = dyn_cast<ConstantSDNode>(N)) {
|
if (auto *CN = dyn_cast<ConstantSDNode>(N)) {
|
||||||
uint64_t ImmVal = CN->getZExtValue();
|
uint64_t ImmVal = CN->getZExtValue();
|
||||||
SDLoc DL(N);
|
|
||||||
|
|
||||||
if (ImmVal >= Low && ImmVal <= High) {
|
// Reject shift amounts that are too small.
|
||||||
Imm = CurDAG->getTargetConstant(ImmVal, DL, MVT::i32);
|
if (ImmVal < Low)
|
||||||
return true;
|
return false;
|
||||||
|
|
||||||
|
// Reject or saturate shift amounts that are too big.
|
||||||
|
if (ImmVal > High) {
|
||||||
|
if (!AllowSaturation)
|
||||||
|
return false;
|
||||||
|
ImmVal = High;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Imm = CurDAG->getTargetConstant(ImmVal, SDLoc(N), MVT::i32);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -1343,10 +1343,10 @@ multiclass sve_prefetch<SDPatternOperator prefetch, ValueType PredTy, Instructio
|
|||||||
defm LSL_WIDE_ZZZ : sve_int_bin_cons_shift_wide<0b11, "lsl">;
|
defm LSL_WIDE_ZZZ : sve_int_bin_cons_shift_wide<0b11, "lsl">;
|
||||||
|
|
||||||
// Predicated shifts
|
// Predicated shifts
|
||||||
defm ASR_ZPmI : sve_int_bin_pred_shift_imm_right<0b0000, "asr", "ASR_ZPZI">;
|
defm ASR_ZPmI : sve_int_bin_pred_shift_imm_right_dup<0b0000, "asr", "ASR_ZPZI", int_aarch64_sve_asr>;
|
||||||
defm LSR_ZPmI : sve_int_bin_pred_shift_imm_right<0b0001, "lsr", "LSR_ZPZI">;
|
defm LSR_ZPmI : sve_int_bin_pred_shift_imm_right_dup<0b0001, "lsr", "LSR_ZPZI", int_aarch64_sve_lsr>;
|
||||||
defm LSL_ZPmI : sve_int_bin_pred_shift_imm_left< 0b0011, "lsl">;
|
defm LSL_ZPmI : sve_int_bin_pred_shift_imm_left_dup< 0b0011, "lsl", "LSL_ZPZI", int_aarch64_sve_lsl>;
|
||||||
defm ASRD_ZPmI : sve_int_bin_pred_shift_imm_right<0b0100, "asrd", "ASRD_ZPZI", int_aarch64_sve_asrd>;
|
defm ASRD_ZPmI : sve_int_bin_pred_shift_imm_right< 0b0100, "asrd", "ASRD_ZPZI", int_aarch64_sve_asrd>;
|
||||||
|
|
||||||
let Predicates = [HasSVE, UseExperimentalZeroingPseudos] in {
|
let Predicates = [HasSVE, UseExperimentalZeroingPseudos] in {
|
||||||
defm ASR_ZPZZ : sve_int_bin_pred_zeroing_bhsd<int_aarch64_sve_asr>;
|
defm ASR_ZPZZ : sve_int_bin_pred_zeroing_bhsd<int_aarch64_sve_asr>;
|
||||||
@ -2385,11 +2385,11 @@ let Predicates = [HasSVE2] in {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SVE2 predicated shifts
|
// SVE2 predicated shifts
|
||||||
defm SQSHL_ZPmI : sve_int_bin_pred_shift_imm_left< 0b0110, "sqshl", "SQSHL_ZPZI">;
|
defm SQSHL_ZPmI : sve_int_bin_pred_shift_imm_left< 0b0110, "sqshl", "SQSHL_ZPZI">;
|
||||||
defm UQSHL_ZPmI : sve_int_bin_pred_shift_imm_left< 0b0111, "uqshl", "UQSHL_ZPZI">;
|
defm UQSHL_ZPmI : sve_int_bin_pred_shift_imm_left< 0b0111, "uqshl", "UQSHL_ZPZI">;
|
||||||
defm SRSHR_ZPmI : sve_int_bin_pred_shift_imm_right<0b1100, "srshr", "SRSHR_ZPZI", int_aarch64_sve_srshr>;
|
defm SRSHR_ZPmI : sve_int_bin_pred_shift_imm_right<0b1100, "srshr", "SRSHR_ZPZI", int_aarch64_sve_srshr>;
|
||||||
defm URSHR_ZPmI : sve_int_bin_pred_shift_imm_right<0b1101, "urshr", "URSHR_ZPZI", int_aarch64_sve_urshr>;
|
defm URSHR_ZPmI : sve_int_bin_pred_shift_imm_right<0b1101, "urshr", "URSHR_ZPZI", int_aarch64_sve_urshr>;
|
||||||
defm SQSHLU_ZPmI : sve2_int_bin_pred_shift_imm_left< 0b1111, "sqshlu", "SQSHLU_ZPZI", int_aarch64_sve_sqshlu>;
|
defm SQSHLU_ZPmI : sve_int_bin_pred_shift_imm_left< 0b1111, "sqshlu", "SQSHLU_ZPZI", int_aarch64_sve_sqshlu>;
|
||||||
|
|
||||||
// SVE2 integer add/subtract long
|
// SVE2 integer add/subtract long
|
||||||
defm SADDLB_ZZZ : sve2_wide_int_arith_long<0b00000, "saddlb", int_aarch64_sve_saddlb>;
|
defm SADDLB_ZZZ : sve2_wide_int_arith_long<0b00000, "saddlb", int_aarch64_sve_saddlb>;
|
||||||
|
@ -209,7 +209,14 @@ def SVE8BitLslImm : ComplexPattern<i32, 2, "SelectSVE8BitLslImm", [imm]>;
|
|||||||
def SVEArithUImmPat : ComplexPattern<i32, 1, "SelectSVEArithImm", []>;
|
def SVEArithUImmPat : ComplexPattern<i32, 1, "SelectSVEArithImm", []>;
|
||||||
def SVEArithSImmPat : ComplexPattern<i32, 1, "SelectSVESignedArithImm", []>;
|
def SVEArithSImmPat : ComplexPattern<i32, 1, "SelectSVESignedArithImm", []>;
|
||||||
|
|
||||||
def SVEShiftImm64 : ComplexPattern<i32, 1, "SelectSVEShiftImm64<0, 64>", []>;
|
def SVEShiftImmL8 : ComplexPattern<i32, 1, "SelectSVEShiftImm<0, 7>", []>;
|
||||||
|
def SVEShiftImmL16 : ComplexPattern<i32, 1, "SelectSVEShiftImm<0, 15>", []>;
|
||||||
|
def SVEShiftImmL32 : ComplexPattern<i32, 1, "SelectSVEShiftImm<0, 31>", []>;
|
||||||
|
def SVEShiftImmL64 : ComplexPattern<i32, 1, "SelectSVEShiftImm<0, 63>", []>;
|
||||||
|
def SVEShiftImmR8 : ComplexPattern<i32, 1, "SelectSVEShiftImm<1, 8, true>", []>;
|
||||||
|
def SVEShiftImmR16 : ComplexPattern<i32, 1, "SelectSVEShiftImm<1, 16, true>", []>;
|
||||||
|
def SVEShiftImmR32 : ComplexPattern<i32, 1, "SelectSVEShiftImm<1, 32, true>", []>;
|
||||||
|
def SVEShiftImmR64 : ComplexPattern<i32, 1, "SelectSVEShiftImm<1, 64, true>", []>;
|
||||||
|
|
||||||
class SVEExactFPImm<string Suffix, string ValA, string ValB> : AsmOperandClass {
|
class SVEExactFPImm<string Suffix, string ValA, string ValB> : AsmOperandClass {
|
||||||
let Name = "SVEExactFPImmOperand" # Suffix;
|
let Name = "SVEExactFPImmOperand" # Suffix;
|
||||||
@ -315,11 +322,6 @@ class SVE_1_Op_Imm_OptLsl_Pat<ValueType vt, SDPatternOperator op, ZPRRegOp zprty
|
|||||||
: Pat<(vt (op (vt zprty:$Op1), (vt (AArch64dup (it (cpx i32:$imm, i32:$shift)))))),
|
: Pat<(vt (op (vt zprty:$Op1), (vt (AArch64dup (it (cpx i32:$imm, i32:$shift)))))),
|
||||||
(inst $Op1, i32:$imm, i32:$shift)>;
|
(inst $Op1, i32:$imm, i32:$shift)>;
|
||||||
|
|
||||||
class SVE_1_Op_Imm_Shift_Pred_Pat<ValueType vt, ValueType pt, SDPatternOperator op,
|
|
||||||
ZPRRegOp zprty, Operand ImmTy, Instruction inst>
|
|
||||||
: Pat<(vt (op (pt (AArch64ptrue 31)), (vt zprty:$Op1), (vt (AArch64dup (ImmTy:$imm))))),
|
|
||||||
(inst $Op1, ImmTy:$imm)>;
|
|
||||||
|
|
||||||
class SVE_1_Op_Imm_Arith_Pred_Pat<ValueType vt, ValueType pt, SDPatternOperator op,
|
class SVE_1_Op_Imm_Arith_Pred_Pat<ValueType vt, ValueType pt, SDPatternOperator op,
|
||||||
ZPRRegOp zprty, ValueType it, ComplexPattern cpx, Instruction inst>
|
ZPRRegOp zprty, ValueType it, ComplexPattern cpx, Instruction inst>
|
||||||
: Pat<(vt (op (pt (AArch64ptrue 31)), (vt zprty:$Op1), (vt (AArch64dup (it (cpx i32:$imm)))))),
|
: Pat<(vt (op (pt (AArch64ptrue 31)), (vt zprty:$Op1), (vt (AArch64dup (it (cpx i32:$imm)))))),
|
||||||
@ -409,6 +411,18 @@ class SVE_InReg_Extend<ValueType vt, SDPatternOperator op, ValueType pt,
|
|||||||
: Pat<(vt (op pt:$Pg, vt:$Src, inreg_vt, vt:$PassThru)),
|
: Pat<(vt (op pt:$Pg, vt:$Src, inreg_vt, vt:$PassThru)),
|
||||||
(inst $PassThru, $Pg, $Src)>;
|
(inst $PassThru, $Pg, $Src)>;
|
||||||
|
|
||||||
|
class SVE_Shift_DupImm_Pred_Pat<ValueType vt, SDPatternOperator op,
|
||||||
|
ValueType pt, ValueType it,
|
||||||
|
ComplexPattern cast, Instruction inst>
|
||||||
|
: Pat<(vt (op pt:$Pg, vt:$Rn, (vt (AArch64dup (it (cast i32:$imm)))))),
|
||||||
|
(inst $Pg, $Rn, i32:$imm)>;
|
||||||
|
|
||||||
|
class SVE_Shift_DupImm_All_Active_Pat<ValueType vt, SDPatternOperator op,
|
||||||
|
ValueType pt, ValueType it,
|
||||||
|
ComplexPattern cast, Instruction inst>
|
||||||
|
: Pat<(vt (op (pt (AArch64ptrue 31)), vt:$Rn, (vt (AArch64dup (it (cast i32:$imm)))))),
|
||||||
|
(inst $Rn, i32:$imm)>;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Pseudo -> Instruction mappings
|
// Pseudo -> Instruction mappings
|
||||||
//
|
//
|
||||||
@ -4761,38 +4775,19 @@ class sve_int_bin_pred_shift_imm<bits<4> tsz8_64, bits<4> opc, string asm,
|
|||||||
let ElementSize = zprty.ElementSize;
|
let ElementSize = zprty.ElementSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
multiclass sve_int_bin_pred_shift_imm_left<bits<4> opc, string asm, string psName=""> {
|
multiclass sve_int_bin_pred_shift_imm_left<bits<4> opc, string asm, string Ps,
|
||||||
def _B : SVEPseudo2Instr<psName # _B, 1>,
|
SDPatternOperator op = null_frag> {
|
||||||
|
def _B : SVEPseudo2Instr<Ps # _B, 1>,
|
||||||
sve_int_bin_pred_shift_imm<{0,0,0,1}, opc, asm, ZPR8, vecshiftL8>;
|
sve_int_bin_pred_shift_imm<{0,0,0,1}, opc, asm, ZPR8, vecshiftL8>;
|
||||||
def _H : SVEPseudo2Instr<psName # _H, 1>,
|
def _H : SVEPseudo2Instr<Ps # _H, 1>,
|
||||||
sve_int_bin_pred_shift_imm<{0,0,1,?}, opc, asm, ZPR16, vecshiftL16> {
|
sve_int_bin_pred_shift_imm<{0,0,1,?}, opc, asm, ZPR16, vecshiftL16> {
|
||||||
let Inst{8} = imm{3};
|
let Inst{8} = imm{3};
|
||||||
}
|
}
|
||||||
def _S : SVEPseudo2Instr<psName # _S, 1>,
|
def _S : SVEPseudo2Instr<Ps # _S, 1>,
|
||||||
sve_int_bin_pred_shift_imm<{0,1,?,?}, opc, asm, ZPR32, vecshiftL32> {
|
sve_int_bin_pred_shift_imm<{0,1,?,?}, opc, asm, ZPR32, vecshiftL32> {
|
||||||
let Inst{9-8} = imm{4-3};
|
let Inst{9-8} = imm{4-3};
|
||||||
}
|
}
|
||||||
def _D : SVEPseudo2Instr<psName # _D, 1>,
|
def _D : SVEPseudo2Instr<Ps # _D, 1>,
|
||||||
sve_int_bin_pred_shift_imm<{1,?,?,?}, opc, asm, ZPR64, vecshiftL64> {
|
|
||||||
let Inst{22} = imm{5};
|
|
||||||
let Inst{9-8} = imm{4-3};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
multiclass sve2_int_bin_pred_shift_imm_left<bits<4> opc, string asm,
|
|
||||||
string psName,
|
|
||||||
SDPatternOperator op> {
|
|
||||||
|
|
||||||
def _B : SVEPseudo2Instr<psName # _B, 1>, sve_int_bin_pred_shift_imm<{0,0,0,1}, opc, asm, ZPR8, vecshiftL8>;
|
|
||||||
def _H : SVEPseudo2Instr<psName # _H, 1>,
|
|
||||||
sve_int_bin_pred_shift_imm<{0,0,1,?}, opc, asm, ZPR16, vecshiftL16> {
|
|
||||||
let Inst{8} = imm{3};
|
|
||||||
}
|
|
||||||
def _S : SVEPseudo2Instr<psName # _S, 1>,
|
|
||||||
sve_int_bin_pred_shift_imm<{0,1,?,?}, opc, asm, ZPR32, vecshiftL32> {
|
|
||||||
let Inst{9-8} = imm{4-3};
|
|
||||||
}
|
|
||||||
def _D : SVEPseudo2Instr<psName # _D, 1>,
|
|
||||||
sve_int_bin_pred_shift_imm<{1,?,?,?}, opc, asm, ZPR64, vecshiftL64> {
|
sve_int_bin_pred_shift_imm<{1,?,?,?}, opc, asm, ZPR64, vecshiftL64> {
|
||||||
let Inst{22} = imm{5};
|
let Inst{22} = imm{5};
|
||||||
let Inst{9-8} = imm{4-3};
|
let Inst{9-8} = imm{4-3};
|
||||||
@ -4804,6 +4799,16 @@ multiclass sve2_int_bin_pred_shift_imm_left<bits<4> opc, string asm,
|
|||||||
def : SVE_3_Op_Imm_Pat<nxv2i64, op, nxv2i1, nxv2i64, i32, tvecshiftL64, !cast<Instruction>(NAME # _D)>;
|
def : SVE_3_Op_Imm_Pat<nxv2i64, op, nxv2i1, nxv2i64, i32, tvecshiftL64, !cast<Instruction>(NAME # _D)>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// As above but shift amount takes the form of a "vector immediate".
|
||||||
|
multiclass sve_int_bin_pred_shift_imm_left_dup<bits<4> opc, string asm,
|
||||||
|
string Ps, SDPatternOperator op>
|
||||||
|
: sve_int_bin_pred_shift_imm_left<opc, asm, Ps, null_frag> {
|
||||||
|
def : SVE_Shift_DupImm_Pred_Pat<nxv16i8, op, nxv16i1, i32, SVEShiftImmL8, !cast<Instruction>(NAME # _B)>;
|
||||||
|
def : SVE_Shift_DupImm_Pred_Pat<nxv8i16, op, nxv8i1, i32, SVEShiftImmL16, !cast<Instruction>(NAME # _H)>;
|
||||||
|
def : SVE_Shift_DupImm_Pred_Pat<nxv4i32, op, nxv4i1, i32, SVEShiftImmL32, !cast<Instruction>(NAME # _S)>;
|
||||||
|
def : SVE_Shift_DupImm_Pred_Pat<nxv2i64, op, nxv2i1, i64, SVEShiftImmL64, !cast<Instruction>(NAME # _D)>;
|
||||||
|
}
|
||||||
|
|
||||||
multiclass sve_int_bin_pred_shift_imm_left_zeroing_bhsd<SDPatternOperator op> {
|
multiclass sve_int_bin_pred_shift_imm_left_zeroing_bhsd<SDPatternOperator op> {
|
||||||
def _ZERO_B : PredTwoOpImmPseudo<NAME # _B, ZPR8, tvecshiftL8, FalseLanesZero>;
|
def _ZERO_B : PredTwoOpImmPseudo<NAME # _B, ZPR8, tvecshiftL8, FalseLanesZero>;
|
||||||
def _ZERO_H : PredTwoOpImmPseudo<NAME # _H, ZPR16, tvecshiftL16, FalseLanesZero>;
|
def _ZERO_H : PredTwoOpImmPseudo<NAME # _H, ZPR16, tvecshiftL16, FalseLanesZero>;
|
||||||
@ -4840,6 +4845,16 @@ multiclass sve_int_bin_pred_shift_imm_right<bits<4> opc, string asm, string Ps,
|
|||||||
def : SVE_3_Op_Imm_Pat<nxv2i64, op, nxv2i1, nxv2i64, i32, tvecshiftR64, !cast<Instruction>(NAME # _D)>;
|
def : SVE_3_Op_Imm_Pat<nxv2i64, op, nxv2i1, nxv2i64, i32, tvecshiftR64, !cast<Instruction>(NAME # _D)>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// As above but shift amount takes the form of a "vector immediate".
|
||||||
|
multiclass sve_int_bin_pred_shift_imm_right_dup<bits<4> opc, string asm,
|
||||||
|
string Ps, SDPatternOperator op>
|
||||||
|
: sve_int_bin_pred_shift_imm_right<opc, asm, Ps, null_frag> {
|
||||||
|
def : SVE_Shift_DupImm_Pred_Pat<nxv16i8, op, nxv16i1, i32, SVEShiftImmR8, !cast<Instruction>(NAME # _B)>;
|
||||||
|
def : SVE_Shift_DupImm_Pred_Pat<nxv8i16, op, nxv8i1, i32, SVEShiftImmR16, !cast<Instruction>(NAME # _H)>;
|
||||||
|
def : SVE_Shift_DupImm_Pred_Pat<nxv4i32, op, nxv4i1, i32, SVEShiftImmR32, !cast<Instruction>(NAME # _S)>;
|
||||||
|
def : SVE_Shift_DupImm_Pred_Pat<nxv2i64, op, nxv2i1, i64, SVEShiftImmR64, !cast<Instruction>(NAME # _D)>;
|
||||||
|
}
|
||||||
|
|
||||||
multiclass sve_int_bin_pred_shift_imm_right_zeroing_bhsd<SDPatternOperator op = null_frag> {
|
multiclass sve_int_bin_pred_shift_imm_right_zeroing_bhsd<SDPatternOperator op = null_frag> {
|
||||||
def _ZERO_B : PredTwoOpImmPseudo<NAME # _B, ZPR8, vecshiftR8, FalseLanesZero>;
|
def _ZERO_B : PredTwoOpImmPseudo<NAME # _B, ZPR8, vecshiftR8, FalseLanesZero>;
|
||||||
def _ZERO_H : PredTwoOpImmPseudo<NAME # _H, ZPR16, vecshiftR16, FalseLanesZero>;
|
def _ZERO_H : PredTwoOpImmPseudo<NAME # _H, ZPR16, vecshiftR16, FalseLanesZero>;
|
||||||
@ -4980,10 +4995,10 @@ multiclass sve_int_bin_cons_shift_imm_left<bits<2> opc, string asm,
|
|||||||
let Inst{20-19} = imm{4-3};
|
let Inst{20-19} = imm{4-3};
|
||||||
}
|
}
|
||||||
|
|
||||||
def : SVE_1_Op_Imm_Shift_Pred_Pat<nxv16i8, nxv16i1, op, ZPR8, vecshiftL8, !cast<Instruction>(NAME # _B)>;
|
def : SVE_Shift_DupImm_All_Active_Pat<nxv16i8, op, nxv16i1, i32, SVEShiftImmL8, !cast<Instruction>(NAME # _B)>;
|
||||||
def : SVE_1_Op_Imm_Shift_Pred_Pat<nxv8i16, nxv8i1, op, ZPR16, vecshiftL16, !cast<Instruction>(NAME # _H)>;
|
def : SVE_Shift_DupImm_All_Active_Pat<nxv8i16, op, nxv8i1, i32, SVEShiftImmL16, !cast<Instruction>(NAME # _H)>;
|
||||||
def : SVE_1_Op_Imm_Shift_Pred_Pat<nxv4i32, nxv4i1, op, ZPR32, vecshiftL32, !cast<Instruction>(NAME # _S)>;
|
def : SVE_Shift_DupImm_All_Active_Pat<nxv4i32, op, nxv4i1, i32, SVEShiftImmL32, !cast<Instruction>(NAME # _S)>;
|
||||||
def : SVE_1_Op_Imm_Arith_Pred_Pat<nxv2i64, nxv2i1, op, ZPR64, i64, SVEShiftImm64, !cast<Instruction>(NAME # _D)>;
|
def : SVE_Shift_DupImm_All_Active_Pat<nxv2i64, op, nxv2i1, i64, SVEShiftImmL64, !cast<Instruction>(NAME # _D)>;
|
||||||
}
|
}
|
||||||
|
|
||||||
multiclass sve_int_bin_cons_shift_imm_right<bits<2> opc, string asm,
|
multiclass sve_int_bin_cons_shift_imm_right<bits<2> opc, string asm,
|
||||||
@ -5000,10 +5015,10 @@ multiclass sve_int_bin_cons_shift_imm_right<bits<2> opc, string asm,
|
|||||||
let Inst{20-19} = imm{4-3};
|
let Inst{20-19} = imm{4-3};
|
||||||
}
|
}
|
||||||
|
|
||||||
def : SVE_1_Op_Imm_Shift_Pred_Pat<nxv16i8, nxv16i1, op, ZPR8, vecshiftR8, !cast<Instruction>(NAME # _B)>;
|
def : SVE_Shift_DupImm_All_Active_Pat<nxv16i8, op, nxv16i1, i32, SVEShiftImmR8, !cast<Instruction>(NAME # _B)>;
|
||||||
def : SVE_1_Op_Imm_Shift_Pred_Pat<nxv8i16, nxv8i1, op, ZPR16, vecshiftR16, !cast<Instruction>(NAME # _H)>;
|
def : SVE_Shift_DupImm_All_Active_Pat<nxv8i16, op, nxv8i1, i32, SVEShiftImmR16, !cast<Instruction>(NAME # _H)>;
|
||||||
def : SVE_1_Op_Imm_Shift_Pred_Pat<nxv4i32, nxv4i1, op, ZPR32, vecshiftR32, !cast<Instruction>(NAME # _S)>;
|
def : SVE_Shift_DupImm_All_Active_Pat<nxv4i32, op, nxv4i1, i32, SVEShiftImmR32, !cast<Instruction>(NAME # _S)>;
|
||||||
def : SVE_1_Op_Imm_Arith_Pred_Pat<nxv2i64, nxv2i1, op, ZPR64, i64, SVEShiftImm64, !cast<Instruction>(NAME # _D)>;
|
def : SVE_Shift_DupImm_All_Active_Pat<nxv2i64, op, nxv2i1, i64, SVEShiftImmR64, !cast<Instruction>(NAME # _D)>;
|
||||||
}
|
}
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// SVE Memory - Store Group
|
// SVE Memory - Store Group
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user