Skip to content

Commit 256b37a

Browse files
committed
use getConstant
1 parent 0d57b39 commit 256b37a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9817,10 +9817,8 @@ SDValue AArch64TargetLowering::LowerCTPOP_PARITY(SDValue Op,
98179817
if (Subtarget->hasDotProd() && VT.getScalarSizeInBits() != 16 &&
98189818
VT.getVectorNumElements() >= 2) {
98199819
EVT DT = VT == MVT::v2i64 ? MVT::v4i32 : VT;
9820-
SDValue Zeros = DAG.getSplatBuildVector(
9821-
DT, DL, DAG.getConstant(0, DL, DT.getScalarType()));
9822-
SDValue Ones =
9823-
DAG.getSplatBuildVector(VT8Bit, DL, DAG.getConstant(1, DL, MVT::i8));
9820+
SDValue Zeros = DAG.getConstant(0, DL, DT);
9821+
SDValue Ones = DAG.getConstant(1, DL, VT8Bit);
98249822

98259823
if (VT == MVT::v2i64) {
98269824
Val = DAG.getNode(AArch64ISD::UDOT, DL, DT, Zeros, Ones, Val);

0 commit comments

Comments
 (0)