mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[NFC] Fix a few whitespace issues and typos.
This commit is contained in:
parent
ecd2dc975e
commit
ba16635997
@ -22,7 +22,7 @@
|
||||
|
||||
#if !(defined(TLI_DEFINE_VECFUNC))
|
||||
#define TLI_DEFINE_VECFUNC(SCAL, VEC, VF) {SCAL, VEC, VF},
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(TLI_DEFINE_ACCELERATE_VECFUNCS)
|
||||
// Accelerate framework's Vector Functions
|
||||
|
@ -31,7 +31,7 @@ enum class VFParamKind {
|
||||
OMP_LinearPos, // declare simd linear(i:c) uniform(c)
|
||||
OMP_LinearValPos, // declare simd linear(val(i:c)) uniform(c)
|
||||
OMP_LinearRefPos, // declare simd linear(ref(i:c)) uniform(c)
|
||||
OMP_LinearUValPos, // declare simd linear(uval(i:c)) uniform(c
|
||||
OMP_LinearUValPos, // declare simd linear(uval(i:c)) uniform(c)
|
||||
OMP_Uniform, // declare simd uniform(i)
|
||||
GlobalPredicate, // Global logical predicate that acts on all lanes
|
||||
// of the input and output mask concurrently. For
|
||||
|
@ -1474,9 +1474,6 @@ public:
|
||||
///
|
||||
/// If GroupNo is not NULL, it will receive the number of the operand group
|
||||
/// containing OpIdx.
|
||||
///
|
||||
/// The flag operand is an immediate that can be decoded with methods like
|
||||
/// InlineAsm::hasRegClassConstraint().
|
||||
int findInlineAsmFlagIdx(unsigned OpIdx, unsigned *GroupNo = nullptr) const;
|
||||
|
||||
/// Compute the static register class constraint for operand OpIdx.
|
||||
|
@ -216,7 +216,7 @@ class LLVMVectorOfAnyPointersToElt<int num> : LLVMMatchType<num>;
|
||||
class LLVMVectorElementType<int num> : LLVMMatchType<num>;
|
||||
|
||||
// Match the type of another intrinsic parameter that is expected to be a
|
||||
// vector type, but change the element count to be half as many
|
||||
// vector type, but change the element count to be half as many.
|
||||
class LLVMHalfElementsVectorType<int num> : LLVMMatchType<num>;
|
||||
|
||||
// Match the type of another intrinsic parameter that is expected to be a
|
||||
|
@ -707,7 +707,6 @@ def assertsext : SDNode<"ISD::AssertSext", SDT_assert>;
|
||||
def assertzext : SDNode<"ISD::AssertZext", SDT_assert>;
|
||||
def assertalign : SDNode<"ISD::AssertAlign", SDT_assert>;
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Selection DAG Condition Codes
|
||||
|
||||
|
@ -646,6 +646,7 @@ bool RecurrenceDescriptor::hasMultipleUsesOf(
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool RecurrenceDescriptor::isReductionPHI(PHINode *Phi, Loop *TheLoop,
|
||||
RecurrenceDescriptor &RedDes,
|
||||
DemandedBits *DB, AssumptionCache *AC,
|
||||
|
@ -903,7 +903,6 @@ bool llvm::maskIsAllZeroOrUndef(Value *Mask) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool llvm::maskIsAllOneOrUndef(Value *Mask) {
|
||||
assert(isa<VectorType>(Mask->getType()) &&
|
||||
isa<IntegerType>(Mask->getType()->getScalarType()) &&
|
||||
|
@ -1236,6 +1236,7 @@ void DwarfDebug::beginModule(Module *M) {
|
||||
if (!GVMapEntry.size() || (Expr && Expr->isConstant()))
|
||||
GVMapEntry.push_back({nullptr, Expr});
|
||||
}
|
||||
|
||||
DenseSet<DIGlobalVariable *> Processed;
|
||||
for (auto *GVE : CUNode->getGlobalVariables()) {
|
||||
DIGlobalVariable *GV = GVE->getVariable();
|
||||
@ -1553,6 +1554,7 @@ void DwarfDebug::collectVariableInfoFromMFTable(
|
||||
RegVar->initializeMMI(VI.Expr, VI.Slot);
|
||||
LLVM_DEBUG(dbgs() << "Created DbgVariable for " << VI.Var->getName()
|
||||
<< "\n");
|
||||
|
||||
if (DbgVariable *DbgVar = MFVars.lookup(Var))
|
||||
DbgVar->addMMIEntry(*RegVar);
|
||||
else if (InfoHolder.addScopeVariable(Scope, RegVar.get())) {
|
||||
|
@ -3549,7 +3549,7 @@ SDValue DAGCombiner::visitSUB(SDNode *N) {
|
||||
}
|
||||
}
|
||||
|
||||
// canonicalize (sub X, (vscale * C)) to (add X, (vscale * -C))
|
||||
// canonicalize (sub X, (vscale * C)) to (add X, (vscale * -C))
|
||||
if (N1.getOpcode() == ISD::VSCALE) {
|
||||
const APInt &IntVal = N1.getConstantOperandAPInt(0);
|
||||
return DAG.getNode(ISD::ADD, DL, VT, N0, DAG.getVScale(DL, VT, -IntVal));
|
||||
@ -12031,6 +12031,7 @@ SDValue DAGCombiner::visitSIGN_EXTEND_INREG(SDNode *N) {
|
||||
AddToWorklist(ExtLoad.getNode());
|
||||
return SDValue(N, 0); // Return N so it doesn't get rechecked!
|
||||
}
|
||||
|
||||
// fold (sext_inreg (zextload x)) -> (sextload x) iff load has one use
|
||||
if (ISD::isZEXTLoad(N0.getNode()) && ISD::isUNINDEXEDLoad(N0.getNode()) &&
|
||||
N0.hasOneUse() &&
|
||||
|
@ -2854,6 +2854,7 @@ SDValue DAGTypeLegalizer::SplitVecOp_TruncateHelper(SDNode *N) {
|
||||
HalfLo = DAG.getNode(N->getOpcode(), DL, HalfVT, InLoVec);
|
||||
HalfHi = DAG.getNode(N->getOpcode(), DL, HalfVT, InHiVec);
|
||||
}
|
||||
|
||||
// Concatenate them to get the full intermediate truncation result.
|
||||
EVT InterVT = EVT::getVectorVT(*DAG.getContext(), HalfElementVT, NumElements);
|
||||
SDValue InterVec = DAG.getNode(ISD::CONCAT_VECTORS, DL, InterVT, HalfLo,
|
||||
|
@ -1769,7 +1769,7 @@ static void commuteShuffle(SDValue &N1, SDValue &N2, MutableArrayRef<int> M) {
|
||||
SDValue SelectionDAG::getVectorShuffle(EVT VT, const SDLoc &dl, SDValue N1,
|
||||
SDValue N2, ArrayRef<int> Mask) {
|
||||
assert(VT.getVectorNumElements() == Mask.size() &&
|
||||
"Must have the same number of vector elements as mask elements!");
|
||||
"Must have the same number of vector elements as mask elements!");
|
||||
assert(VT == N1.getValueType() && VT == N2.getValueType() &&
|
||||
"Invalid VECTOR_SHUFFLE");
|
||||
|
||||
@ -5693,6 +5693,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT,
|
||||
const APInt &Val = N1C->getAPIntValue();
|
||||
return SignExtendInReg(Val, VT);
|
||||
}
|
||||
|
||||
if (ISD::isBuildVectorOfConstantSDNodes(N1.getNode())) {
|
||||
SmallVector<SDValue, 8> Ops;
|
||||
llvm::EVT OpVT = N1.getOperand(0).getValueType();
|
||||
@ -5830,7 +5831,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT,
|
||||
return getConstant(Val.extractBits(ElementSize, Shift), DL, VT);
|
||||
}
|
||||
break;
|
||||
case ISD::EXTRACT_SUBVECTOR:
|
||||
case ISD::EXTRACT_SUBVECTOR: {
|
||||
EVT N1VT = N1.getValueType();
|
||||
assert(VT.isVector() && N1VT.isVector() &&
|
||||
"Extract subvector VTs must be vectors!");
|
||||
@ -5873,6 +5874,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT,
|
||||
return N1.getOperand(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Perform trivial constant folding.
|
||||
if (SDValue SV = FoldConstantArithmetic(Opcode, DL, VT, {N1, N2}))
|
||||
|
@ -76,7 +76,7 @@ namespace {
|
||||
// OrigAlignments - Alignments of stack objects before coloring.
|
||||
SmallVector<Align, 16> OrigAlignments;
|
||||
|
||||
// OrigSizes - Sizess of stack objects before coloring.
|
||||
// OrigSizes - Sizes of stack objects before coloring.
|
||||
SmallVector<unsigned, 16> OrigSizes;
|
||||
|
||||
// AllColors - If index is set, it's a spill slot, i.e. color.
|
||||
|
@ -442,6 +442,7 @@ Constant *Constant::getAggregateElement(unsigned Elt) const {
|
||||
if (const auto *CDS = dyn_cast<ConstantDataSequential>(this))
|
||||
return Elt < CDS->getNumElements() ? CDS->getElementAsConstant(Elt)
|
||||
: nullptr;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -2092,6 +2092,7 @@ void ShuffleVectorInst::setShuffleMask(ArrayRef<int> Mask) {
|
||||
ShuffleMask.assign(Mask.begin(), Mask.end());
|
||||
ShuffleMaskForBitcode = convertShuffleMaskForBitcode(Mask, getType());
|
||||
}
|
||||
|
||||
Constant *ShuffleVectorInst::convertShuffleMaskForBitcode(ArrayRef<int> Mask,
|
||||
Type *ResultTy) {
|
||||
Type *Int32Ty = Type::getInt32Ty(ResultTy->getContext());
|
||||
|
@ -87,7 +87,7 @@ public:
|
||||
TargetStackID::Value getStackIDForScalableVectors() const override;
|
||||
|
||||
void processFunctionBeforeFrameFinalized(MachineFunction &MF,
|
||||
RegScavenger *RS) const override;
|
||||
RegScavenger *RS) const override;
|
||||
|
||||
void
|
||||
processFunctionBeforeFrameIndicesReplaced(MachineFunction &MF,
|
||||
|
@ -5158,7 +5158,6 @@ SDValue AArch64TargetLowering::LowerFormalArguments(
|
||||
ExtType, DL, VA.getLocVT(), Chain, FIN,
|
||||
MachinePointerInfo::getFixedStack(DAG.getMachineFunction(), FI),
|
||||
MemVT);
|
||||
|
||||
}
|
||||
|
||||
if (VA.getLocInfo() == CCValAssign::Indirect) {
|
||||
@ -12528,6 +12527,7 @@ static SDValue performMulCombine(SDNode *N, SelectionDAG &DAG,
|
||||
// e.g. 6=3*2=(2+1)*2.
|
||||
// TODO: consider lowering more cases, e.g. C = 14, -6, -14 or even 45
|
||||
// which equals to (1+2)*16-(1+2).
|
||||
|
||||
// TrailingZeroes is used to test if the mul can be lowered to
|
||||
// shift+add+shift.
|
||||
unsigned TrailingZeroes = ConstValue.countTrailingZeros();
|
||||
@ -15952,7 +15952,6 @@ static SDValue getScaledOffsetForBitWidth(SelectionDAG &DAG, SDValue Offset,
|
||||
/// [<Zn>.[S|D]{, #<imm>}]
|
||||
///
|
||||
/// where <imm> = sizeof(<T>) * k, for k = 0, 1, ..., 31.
|
||||
|
||||
inline static bool isValidImmForSVEVecImmAddrMode(unsigned OffsetInBytes,
|
||||
unsigned ScalarSizeInBytes) {
|
||||
// The immediate is not a multiple of the scalar size.
|
||||
|
@ -455,7 +455,7 @@ unsigned getBLRCallOpcode(const MachineFunction &MF);
|
||||
|
||||
// struct TSFlags {
|
||||
#define TSFLAG_ELEMENT_SIZE_TYPE(X) (X) // 3-bits
|
||||
#define TSFLAG_DESTRUCTIVE_INST_TYPE(X) ((X) << 3) // 4-bit
|
||||
#define TSFLAG_DESTRUCTIVE_INST_TYPE(X) ((X) << 3) // 4-bits
|
||||
#define TSFLAG_FALSE_LANE_TYPE(X) ((X) << 7) // 2-bits
|
||||
#define TSFLAG_INSTR_FLAGS(X) ((X) << 9) // 2-bits
|
||||
// }
|
||||
|
@ -209,8 +209,8 @@ def AArch64clz_mt : SDNode<"AArch64ISD::CTLZ_MERGE_PASSTHRU", SDT_AArch64Arit
|
||||
def AArch64cnt_mt : SDNode<"AArch64ISD::CTPOP_MERGE_PASSTHRU", SDT_AArch64Arith>;
|
||||
def AArch64fneg_mt : SDNode<"AArch64ISD::FNEG_MERGE_PASSTHRU", SDT_AArch64Arith>;
|
||||
def AArch64fabs_mt : SDNode<"AArch64ISD::FABS_MERGE_PASSTHRU", SDT_AArch64Arith>;
|
||||
def AArch64abs_mt : SDNode<"AArch64ISD::ABS_MERGE_PASSTHRU", SDT_AArch64Arith>;
|
||||
def AArch64neg_mt : SDNode<"AArch64ISD::NEG_MERGE_PASSTHRU", SDT_AArch64Arith>;
|
||||
def AArch64abs_mt : SDNode<"AArch64ISD::ABS_MERGE_PASSTHRU", SDT_AArch64Arith>;
|
||||
def AArch64neg_mt : SDNode<"AArch64ISD::NEG_MERGE_PASSTHRU", SDT_AArch64Arith>;
|
||||
def AArch64sxt_mt : SDNode<"AArch64ISD::SIGN_EXTEND_INREG_MERGE_PASSTHRU", SDT_AArch64IntExtend>;
|
||||
def AArch64uxt_mt : SDNode<"AArch64ISD::ZERO_EXTEND_INREG_MERGE_PASSTHRU", SDT_AArch64IntExtend>;
|
||||
def AArch64frintp_mt : SDNode<"AArch64ISD::FCEIL_MERGE_PASSTHRU", SDT_AArch64Arith>;
|
||||
@ -337,9 +337,9 @@ let Predicates = [HasSVE] in {
|
||||
defm UMAXV_VPZ : sve_int_reduce_1<0b001, "umaxv", AArch64umaxv_p>;
|
||||
defm SMINV_VPZ : sve_int_reduce_1<0b010, "sminv", AArch64sminv_p>;
|
||||
defm UMINV_VPZ : sve_int_reduce_1<0b011, "uminv", AArch64uminv_p>;
|
||||
defm ORV_VPZ : sve_int_reduce_2<0b000, "orv", AArch64orv_p>;
|
||||
defm EORV_VPZ : sve_int_reduce_2<0b001, "eorv", AArch64eorv_p>;
|
||||
defm ANDV_VPZ : sve_int_reduce_2<0b010, "andv", AArch64andv_p>;
|
||||
defm ORV_VPZ : sve_int_reduce_2<0b000, "orv", AArch64orv_p>;
|
||||
defm EORV_VPZ : sve_int_reduce_2<0b001, "eorv", AArch64eorv_p>;
|
||||
defm ANDV_VPZ : sve_int_reduce_2<0b010, "andv", AArch64andv_p>;
|
||||
|
||||
defm ORR_ZI : sve_int_log_imm<0b00, "orr", "orn", or>;
|
||||
defm EOR_ZI : sve_int_log_imm<0b01, "eor", "eon", xor>;
|
||||
@ -398,10 +398,10 @@ let Predicates = [HasSVE] in {
|
||||
defm SABD_ZPmZ : sve_int_bin_pred_arit_1<0b100, "sabd", "SABD_ZPZZ", int_aarch64_sve_sabd, DestructiveBinaryComm>;
|
||||
defm UABD_ZPmZ : sve_int_bin_pred_arit_1<0b101, "uabd", "UABD_ZPZZ", int_aarch64_sve_uabd, DestructiveBinaryComm>;
|
||||
|
||||
defm SMAX_ZPZZ : sve_int_bin_pred_bhsd<AArch64smax_p>;
|
||||
defm UMAX_ZPZZ : sve_int_bin_pred_bhsd<AArch64umax_p>;
|
||||
defm SMIN_ZPZZ : sve_int_bin_pred_bhsd<AArch64smin_p>;
|
||||
defm UMIN_ZPZZ : sve_int_bin_pred_bhsd<AArch64umin_p>;
|
||||
defm SMAX_ZPZZ : sve_int_bin_pred_bhsd<AArch64smax_p>;
|
||||
defm UMAX_ZPZZ : sve_int_bin_pred_bhsd<AArch64umax_p>;
|
||||
defm SMIN_ZPZZ : sve_int_bin_pred_bhsd<AArch64smin_p>;
|
||||
defm UMIN_ZPZZ : sve_int_bin_pred_bhsd<AArch64umin_p>;
|
||||
|
||||
defm FRECPE_ZZ : sve_fp_2op_u_zd<0b110, "frecpe", int_aarch64_sve_frecpe_x>;
|
||||
defm FRSQRTE_ZZ : sve_fp_2op_u_zd<0b111, "frsqrte", int_aarch64_sve_frsqrte_x>;
|
||||
@ -534,8 +534,8 @@ let Predicates = [HasSVE] in {
|
||||
defm FMINV_VPZ : sve_fp_fast_red<0b111, "fminv", AArch64fminv_p>;
|
||||
|
||||
// Splat immediate (unpredicated)
|
||||
defm DUP_ZI : sve_int_dup_imm<"dup">;
|
||||
defm FDUP_ZI : sve_int_dup_fpimm<"fdup">;
|
||||
defm DUP_ZI : sve_int_dup_imm<"dup">;
|
||||
defm FDUP_ZI : sve_int_dup_fpimm<"fdup">;
|
||||
defm DUPM_ZI : sve_int_dup_mask_imm<"dupm">;
|
||||
|
||||
// Splat immediate (predicated)
|
||||
@ -969,7 +969,7 @@ let Predicates = [HasSVE] in {
|
||||
// st1h z0.d, p0, [x0, z0.d, uxtw]
|
||||
defm SST1B_D : sve_mem_64b_sst_sv_32_unscaled<0b000, "st1b", AArch64st1_scatter_sxtw, AArch64st1_scatter_uxtw, ZPR64ExtSXTW8Only, ZPR64ExtUXTW8Only, nxv2i8>;
|
||||
defm SST1H_D : sve_mem_64b_sst_sv_32_unscaled<0b010, "st1h", AArch64st1_scatter_sxtw, AArch64st1_scatter_uxtw, ZPR64ExtSXTW8, ZPR64ExtUXTW8, nxv2i16>;
|
||||
defm SST1W_D : sve_mem_64b_sst_sv_32_unscaled<0b100, "st1w", AArch64st1_scatter_sxtw, AArch64st1_scatter_uxtw, ZPR64ExtSXTW8, ZPR64ExtUXTW8,nxv2i32>;
|
||||
defm SST1W_D : sve_mem_64b_sst_sv_32_unscaled<0b100, "st1w", AArch64st1_scatter_sxtw, AArch64st1_scatter_uxtw, ZPR64ExtSXTW8, ZPR64ExtUXTW8, nxv2i32>;
|
||||
defm SST1D : sve_mem_64b_sst_sv_32_unscaled<0b110, "st1d", AArch64st1_scatter_sxtw, AArch64st1_scatter_uxtw, ZPR64ExtSXTW8, ZPR64ExtUXTW8, nxv2i64>;
|
||||
|
||||
// Scatters using packed, unscaled 32-bit offsets, e.g.
|
||||
@ -1402,10 +1402,10 @@ let Predicates = [HasSVE] in {
|
||||
defm LSL_ZPZI : sve_int_shift_pred_bhsd<AArch64lsl_p, SVEShiftImmL8, SVEShiftImmL16, SVEShiftImmL32, SVEShiftImmL64>;
|
||||
|
||||
let Predicates = [HasSVE, UseExperimentalZeroingPseudos] in {
|
||||
defm ASR_ZPZZ : sve_int_bin_pred_zeroing_bhsd<int_aarch64_sve_asr>;
|
||||
defm LSR_ZPZZ : sve_int_bin_pred_zeroing_bhsd<int_aarch64_sve_lsr>;
|
||||
defm LSL_ZPZZ : sve_int_bin_pred_zeroing_bhsd<int_aarch64_sve_lsl>;
|
||||
defm ASRD_ZPZI : sve_int_bin_pred_shift_imm_right_zeroing_bhsd<int_aarch64_sve_asrd>;
|
||||
defm ASR_ZPZZ : sve_int_bin_pred_zeroing_bhsd<int_aarch64_sve_asr>;
|
||||
defm LSR_ZPZZ : sve_int_bin_pred_zeroing_bhsd<int_aarch64_sve_lsr>;
|
||||
defm LSL_ZPZZ : sve_int_bin_pred_zeroing_bhsd<int_aarch64_sve_lsl>;
|
||||
defm ASRD_ZPZI : sve_int_bin_pred_shift_imm_right_zeroing_bhsd<int_aarch64_sve_asrd>;
|
||||
}
|
||||
|
||||
defm ASR_ZPmZ : sve_int_bin_pred_shift<0b000, "asr", "ASR_ZPZZ", int_aarch64_sve_asr, "ASRR_ZPmZ">;
|
||||
@ -1415,9 +1415,9 @@ let Predicates = [HasSVE] in {
|
||||
defm LSRR_ZPmZ : sve_int_bin_pred_shift<0b101, "lsrr", "LSRR_ZPZZ", null_frag, "LSR_ZPmZ", /*isReverseInstr*/ 1>;
|
||||
defm LSLR_ZPmZ : sve_int_bin_pred_shift<0b111, "lslr", "LSLR_ZPZZ", null_frag, "LSL_ZPmZ", /*isReverseInstr*/ 1>;
|
||||
|
||||
defm ASR_ZPZZ : sve_int_bin_pred_bhsd<AArch64asr_p>;
|
||||
defm LSR_ZPZZ : sve_int_bin_pred_bhsd<AArch64lsr_p>;
|
||||
defm LSL_ZPZZ : sve_int_bin_pred_bhsd<AArch64lsl_p>;
|
||||
defm ASR_ZPZZ : sve_int_bin_pred_bhsd<AArch64asr_p>;
|
||||
defm LSR_ZPZZ : sve_int_bin_pred_bhsd<AArch64lsr_p>;
|
||||
defm LSL_ZPZZ : sve_int_bin_pred_bhsd<AArch64lsl_p>;
|
||||
|
||||
defm ASR_WIDE_ZPmZ : sve_int_bin_pred_shift_wide<0b000, "asr", int_aarch64_sve_asr_wide>;
|
||||
defm LSR_WIDE_ZPmZ : sve_int_bin_pred_shift_wide<0b001, "lsr", int_aarch64_sve_lsr_wide>;
|
||||
@ -1798,12 +1798,10 @@ let Predicates = [HasSVE] in {
|
||||
// Add more complex addressing modes here as required
|
||||
multiclass pred_load<ValueType Ty, ValueType PredTy, SDPatternOperator Load,
|
||||
Instruction RegRegInst, Instruction RegImmInst, ComplexPattern AddrCP> {
|
||||
// reg + reg
|
||||
let AddedComplexity = 1 in {
|
||||
def _reg_reg_z : Pat<(Ty (Load (AddrCP GPR64:$base, GPR64:$offset), (PredTy PPR:$gp), (SVEDup0Undef))),
|
||||
(RegRegInst PPR:$gp, GPR64:$base, GPR64:$offset)>;
|
||||
}
|
||||
// reg + imm
|
||||
let AddedComplexity = 2 in {
|
||||
def _reg_imm_z : Pat<(Ty (Load (am_sve_indexed_s4 GPR64sp:$base, simm4s1:$offset), (PredTy PPR:$gp), (SVEDup0Undef))),
|
||||
(RegImmInst PPR:$gp, GPR64:$base, simm4s1:$offset)>;
|
||||
@ -1845,12 +1843,10 @@ let Predicates = [HasSVE] in {
|
||||
|
||||
multiclass pred_store<ValueType Ty, ValueType PredTy, SDPatternOperator Store,
|
||||
Instruction RegRegInst, Instruction RegImmInst, ComplexPattern AddrCP> {
|
||||
// reg + reg
|
||||
let AddedComplexity = 1 in {
|
||||
def _reg_reg : Pat<(Store (Ty ZPR:$vec), (AddrCP GPR64:$base, GPR64:$offset), (PredTy PPR:$gp)),
|
||||
(RegRegInst ZPR:$vec, PPR:$gp, GPR64:$base, GPR64:$offset)>;
|
||||
}
|
||||
// reg + imm
|
||||
let AddedComplexity = 2 in {
|
||||
def _reg_imm : Pat<(Store (Ty ZPR:$vec), (am_sve_indexed_s4 GPR64sp:$base, simm4s1:$offset), (PredTy PPR:$gp)),
|
||||
(RegImmInst ZPR:$vec, PPR:$gp, GPR64:$base, simm4s1:$offset)>;
|
||||
|
@ -2544,13 +2544,13 @@ multiclass sve_int_bin_pred_arit_0<bits<3> opc, string asm, string Ps,
|
||||
string revname="", bit isReverseInstr=0> {
|
||||
let DestructiveInstType = flags in {
|
||||
def _B : sve_int_bin_pred_arit_log<0b00, 0b00, opc, asm, ZPR8>,
|
||||
SVEPseudo2Instr<Ps # _B, 1>, SVEInstr2Rev<NAME # _B, revname # _B, isReverseInstr>;
|
||||
SVEPseudo2Instr<Ps # _B, 1>, SVEInstr2Rev<NAME # _B, revname # _B, isReverseInstr>;
|
||||
def _H : sve_int_bin_pred_arit_log<0b01, 0b00, opc, asm, ZPR16>,
|
||||
SVEPseudo2Instr<Ps # _H, 1>, SVEInstr2Rev<NAME # _H, revname # _H, isReverseInstr>;
|
||||
SVEPseudo2Instr<Ps # _H, 1>, SVEInstr2Rev<NAME # _H, revname # _H, isReverseInstr>;
|
||||
def _S : sve_int_bin_pred_arit_log<0b10, 0b00, opc, asm, ZPR32>,
|
||||
SVEPseudo2Instr<Ps # _S, 1>, SVEInstr2Rev<NAME # _S, revname # _S, isReverseInstr>;
|
||||
SVEPseudo2Instr<Ps # _S, 1>, SVEInstr2Rev<NAME # _S, revname # _S, isReverseInstr>;
|
||||
def _D : sve_int_bin_pred_arit_log<0b11, 0b00, opc, asm, ZPR64>,
|
||||
SVEPseudo2Instr<Ps # _D, 1>, SVEInstr2Rev<NAME # _D, revname # _D, isReverseInstr>;
|
||||
SVEPseudo2Instr<Ps # _D, 1>, SVEInstr2Rev<NAME # _D, revname # _D, isReverseInstr>;
|
||||
}
|
||||
|
||||
def : SVE_3_Op_Pat<nxv16i8, op, nxv16i1, nxv16i8, nxv16i8, !cast<Instruction>(NAME # _B)>;
|
||||
@ -2564,13 +2564,13 @@ multiclass sve_int_bin_pred_arit_1<bits<3> opc, string asm, string Ps,
|
||||
DestructiveInstTypeEnum flags> {
|
||||
let DestructiveInstType = flags in {
|
||||
def _B : sve_int_bin_pred_arit_log<0b00, 0b01, opc, asm, ZPR8>,
|
||||
SVEPseudo2Instr<Ps # _B, 1>;
|
||||
SVEPseudo2Instr<Ps # _B, 1>;
|
||||
def _H : sve_int_bin_pred_arit_log<0b01, 0b01, opc, asm, ZPR16>,
|
||||
SVEPseudo2Instr<Ps # _H, 1>;
|
||||
SVEPseudo2Instr<Ps # _H, 1>;
|
||||
def _S : sve_int_bin_pred_arit_log<0b10, 0b01, opc, asm, ZPR32>,
|
||||
SVEPseudo2Instr<Ps # _S, 1>;
|
||||
SVEPseudo2Instr<Ps # _S, 1>;
|
||||
def _D : sve_int_bin_pred_arit_log<0b11, 0b01, opc, asm, ZPR64>,
|
||||
SVEPseudo2Instr<Ps # _D, 1>;
|
||||
SVEPseudo2Instr<Ps # _D, 1>;
|
||||
}
|
||||
|
||||
def : SVE_3_Op_Pat<nxv16i8, op, nxv16i1, nxv16i8, nxv16i8, !cast<Instruction>(NAME # _B)>;
|
||||
@ -2584,13 +2584,13 @@ multiclass sve_int_bin_pred_arit_2<bits<3> opc, string asm, string Ps,
|
||||
DestructiveInstTypeEnum flags> {
|
||||
let DestructiveInstType = flags in {
|
||||
def _B : sve_int_bin_pred_arit_log<0b00, 0b10, opc, asm, ZPR8>,
|
||||
SVEPseudo2Instr<Ps # _B, 1>;
|
||||
SVEPseudo2Instr<Ps # _B, 1>;
|
||||
def _H : sve_int_bin_pred_arit_log<0b01, 0b10, opc, asm, ZPR16>,
|
||||
SVEPseudo2Instr<Ps # _H, 1>;
|
||||
SVEPseudo2Instr<Ps # _H, 1>;
|
||||
def _S : sve_int_bin_pred_arit_log<0b10, 0b10, opc, asm, ZPR32>,
|
||||
SVEPseudo2Instr<Ps # _S, 1>;
|
||||
SVEPseudo2Instr<Ps # _S, 1>;
|
||||
def _D : sve_int_bin_pred_arit_log<0b11, 0b10, opc, asm, ZPR64>,
|
||||
SVEPseudo2Instr<Ps # _D, 1>;
|
||||
SVEPseudo2Instr<Ps # _D, 1>;
|
||||
}
|
||||
|
||||
def : SVE_3_Op_Pat<nxv16i8, op, nxv16i1, nxv16i8, nxv16i8, !cast<Instruction>(NAME # _B)>;
|
||||
@ -2606,9 +2606,9 @@ multiclass sve_int_bin_pred_arit_2_div<bits<3> opc, string asm, string Ps,
|
||||
string revname="", bit isReverseInstr=0> {
|
||||
let DestructiveInstType = flags in {
|
||||
def _S : sve_int_bin_pred_arit_log<0b10, 0b10, opc, asm, ZPR32>,
|
||||
SVEPseudo2Instr<Ps # _S, 1>, SVEInstr2Rev<NAME # _S, revname # _S, isReverseInstr>;
|
||||
SVEPseudo2Instr<Ps # _S, 1>, SVEInstr2Rev<NAME # _S, revname # _S, isReverseInstr>;
|
||||
def _D : sve_int_bin_pred_arit_log<0b11, 0b10, opc, asm, ZPR64>,
|
||||
SVEPseudo2Instr<Ps # _D, 1>, SVEInstr2Rev<NAME # _D, revname # _D, isReverseInstr>;
|
||||
SVEPseudo2Instr<Ps # _D, 1>, SVEInstr2Rev<NAME # _D, revname # _D, isReverseInstr>;
|
||||
}
|
||||
|
||||
def : SVE_3_Op_Pat<nxv4i32, op, nxv4i1, nxv4i32, nxv4i32, !cast<Instruction>(NAME # _S)>;
|
||||
@ -3179,13 +3179,13 @@ multiclass sve2_int_arith_pred<bits<6> opc, string asm, SDPatternOperator op,
|
||||
string revname="", bit isReverseInstr=0> {
|
||||
let DestructiveInstType = flags in {
|
||||
def _B : sve2_int_arith_pred<0b00, opc, asm, ZPR8>,
|
||||
SVEPseudo2Instr<Ps # _B, 1>, SVEInstr2Rev<NAME # _B, revname # _B, isReverseInstr>;
|
||||
SVEPseudo2Instr<Ps # _B, 1>, SVEInstr2Rev<NAME # _B, revname # _B, isReverseInstr>;
|
||||
def _H : sve2_int_arith_pred<0b01, opc, asm, ZPR16>,
|
||||
SVEPseudo2Instr<Ps # _H, 1>, SVEInstr2Rev<NAME # _H, revname # _H, isReverseInstr>;
|
||||
SVEPseudo2Instr<Ps # _H, 1>, SVEInstr2Rev<NAME # _H, revname # _H, isReverseInstr>;
|
||||
def _S : sve2_int_arith_pred<0b10, opc, asm, ZPR32>,
|
||||
SVEPseudo2Instr<Ps # _S, 1>, SVEInstr2Rev<NAME # _S, revname # _S, isReverseInstr>;
|
||||
SVEPseudo2Instr<Ps # _S, 1>, SVEInstr2Rev<NAME # _S, revname # _S, isReverseInstr>;
|
||||
def _D : sve2_int_arith_pred<0b11, opc, asm, ZPR64>,
|
||||
SVEPseudo2Instr<Ps # _D, 1>, SVEInstr2Rev<NAME # _D, revname # _D, isReverseInstr>;
|
||||
SVEPseudo2Instr<Ps # _D, 1>, SVEInstr2Rev<NAME # _D, revname # _D, isReverseInstr>;
|
||||
}
|
||||
|
||||
def : SVE_3_Op_Pat<nxv16i8, op, nxv16i1, nxv16i8, nxv16i8, !cast<Instruction>(NAME # _B)>;
|
||||
|
@ -365,6 +365,7 @@ Instruction *InstCombinerImpl::visitExtractElementInst(ExtractElementInst &EI) {
|
||||
return replaceInstUsesWith(EI, Idx);
|
||||
}
|
||||
}
|
||||
|
||||
// InstSimplify should handle cases where the index is invalid.
|
||||
// For fixed-length vector, it's invalid to extract out-of-range element.
|
||||
if (!EC.isScalable() && IndexC->getValue().uge(NumElts))
|
||||
@ -400,6 +401,7 @@ Instruction *InstCombinerImpl::visitExtractElementInst(ExtractElementInst &EI) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Instruction *I = foldBitcastExtElt(EI, Builder, DL.isBigEndian()))
|
||||
return I;
|
||||
|
||||
|
@ -586,7 +586,7 @@ bool LoopVectorizationLegality::setupOuterLoopInductions() {
|
||||
|
||||
/// Checks if a function is scalarizable according to the TLI, in
|
||||
/// the sense that it should be vectorized and then expanded in
|
||||
/// multiple scalarcalls. This is represented in the
|
||||
/// multiple scalar calls. This is represented in the
|
||||
/// TLI via mappings that do not specify a vector name, as in the
|
||||
/// following example:
|
||||
///
|
||||
@ -885,6 +885,7 @@ bool LoopVectorizationLegality::canVectorizeMemory() {
|
||||
"loop not vectorized: ", *LAR);
|
||||
});
|
||||
}
|
||||
|
||||
if (!LAI->canVectorizeMemory())
|
||||
return false;
|
||||
|
||||
@ -894,9 +895,9 @@ bool LoopVectorizationLegality::canVectorizeMemory() {
|
||||
"CantVectorizeStoreToLoopInvariantAddress", ORE, TheLoop);
|
||||
return false;
|
||||
}
|
||||
|
||||
Requirements->addRuntimePointerChecks(LAI->getNumRuntimePointerChecks());
|
||||
PSE.addPredicate(LAI->getPSE().getUnionPredicate());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user