Skip to content

Commit 64a9714

Browse files
committed
Clean up vector type creation
1 parent d4d8d8c commit 64a9714

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,21 +1791,17 @@ SDValue VectorLegalizer::ExpandLOOP_DEPENDENCE_MASK(SDNode *N) {
17911791
Diff = DAG.getNode(ISD::SDIV, DL, PtrVT, Diff, EltSize);
17921792

17931793
// If the difference is positive then some elements may alias
1794-
auto CmpVT = TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(),
1795-
Diff.getValueType());
1794+
EVT CmpVT = TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(),
1795+
Diff.getValueType());
17961796
SDValue Zero = DAG.getTargetConstant(0, DL, PtrVT);
17971797
SDValue Cmp = DAG.getSetCC(DL, CmpVT, Diff, Zero,
17981798
IsReadAfterWrite ? ISD::SETEQ : ISD::SETLE);
17991799

18001800
// Create the lane mask
1801-
EVT SplatTY =
1802-
EVT::getVectorVT(*DAG.getContext(), PtrVT, VT.getVectorMinNumElements(),
1803-
VT.isScalableVector());
1801+
EVT SplatTY = VT.changeElementType(PtrVT);
18041802
SDValue DiffSplat = DAG.getSplat(SplatTY, DL, Diff);
18051803
SDValue VectorStep = DAG.getStepVector(DL, SplatTY);
1806-
EVT MaskVT =
1807-
EVT::getVectorVT(*DAG.getContext(), MVT::i1, VT.getVectorMinNumElements(),
1808-
VT.isScalableVector());
1804+
EVT MaskVT = VT.changeElementType(MVT::i1);
18091805
SDValue DiffMask =
18101806
DAG.getSetCC(DL, MaskVT, VectorStep, DiffSplat, ISD::CondCode::SETULT);
18111807

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8247,7 +8247,6 @@ void SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I,
82478247
case Intrinsic::loop_dependence_war_mask:
82488248
case Intrinsic::loop_dependence_raw_mask: {
82498249
auto IntrinsicVT = EVT::getEVT(I.getType());
8250-
SmallVector<SDValue, 4> Ops;
82518250
unsigned ID = Intrinsic == Intrinsic::loop_dependence_war_mask
82528251
? ISD::LOOP_DEPENDENCE_WAR_MASK
82538252
: ISD::LOOP_DEPENDENCE_RAW_MASK;

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6390,7 +6390,8 @@ SDValue AArch64TargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op,
63906390
return DAG.getNode(AArch64ISD::USDOT, dl, Op.getValueType(),
63916391
Op.getOperand(1), Op.getOperand(2), Op.getOperand(3));
63926392
}
6393-
case Intrinsic::experimental_get_nonalias_lane_mask: {
6393+
case Intrinsic::loop_dependence_war_mask:
6394+
case Intrinsic::loop_dependence_raw_mask: {
63946395
unsigned IntrinsicID = 0;
63956396
uint64_t EltSize = Op.getOperand(3)->getAsZExtVal();
63966397
bool IsWriteAfterRead = Op.getOperand(4)->getAsZExtVal() == 1;
@@ -19643,9 +19644,9 @@ static SDValue getPTest(SelectionDAG &DAG, EVT VT, SDValue Pg, SDValue Op,
1964319644
AArch64CC::CondCode Cond);
1964419645

1964519646
static bool isPredicateCCSettingOp(SDValue N) {
19646-
if ((N.getOpcode() == ISD::SETCC ||
19647-
// get_active_lane_mask is lowered to a whilelo instruction.
19648-
N.getOpcode() == ISD::GET_ACTIVE_LANE_MASK) ||
19647+
if ((N.getOpcode() == ISD::SETCC) ||
19648+
// get_active_lane_mask is lowered to a whilelo instruction.
19649+
(N.getOpcode() == ISD::GET_ACTIVE_LANE_MASK) ||
1964919650
(N.getOpcode() == ISD::INTRINSIC_WO_CHAIN &&
1965019651
(N.getConstantOperandVal(0) == Intrinsic::aarch64_sve_whilege ||
1965119652
N.getConstantOperandVal(0) == Intrinsic::aarch64_sve_whilegt ||

0 commit comments

Comments
 (0)