Skip to content

Commit b624008

Browse files
author
Yeting Kuo
committed
Use VCPOP_VL to avoid checking use of mask.
1 parent b787353 commit b624008

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19766,14 +19766,8 @@ RISCVTargetLowering::lowerVPPopcountExperimental(SDValue N,
1976619766
Mask = convertToScalableVector(ContainerVT, Mask, DAG, Subtarget);
1976719767
}
1976819768

19769-
if (IsUnMasked)
19770-
return DAG.getNode(ISD::INTRINSIC_WO_CHAIN, DL, Subtarget.getXLenVT(),
19771-
DAG.getConstant(Intrinsic::riscv_vcpop, DL, XLenVT), Op,
19772-
N->getOperand(2));
19773-
19774-
return DAG.getNode(ISD::INTRINSIC_WO_CHAIN, DL, Subtarget.getXLenVT(),
19775-
DAG.getConstant(Intrinsic::riscv_vcpop_mask, DL, XLenVT),
19776-
Op, Mask, N->getOperand(2));
19769+
return DAG.getNode(RISCVISD::VCPOP_VL, DL, XLenVT, Op, Mask,
19770+
N->getOperand(2));
1977719771
}
1977819772

1977919773
MachineInstr *

0 commit comments

Comments
 (0)