Skip to content

Commit

Permalink
use getConstant
Browse files Browse the repository at this point in the history
  • Loading branch information
tgymnich committed Jun 18, 2024
1 parent 96f7965 commit 21df20b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9803,10 +9803,8 @@ SDValue AArch64TargetLowering::LowerCTPOP_PARITY(SDValue Op,
if (Subtarget->hasDotProd() && VT.getScalarSizeInBits() != 16 &&
VT.getVectorNumElements() >= 2) {
EVT DT = VT == MVT::v2i64 ? MVT::v4i32 : VT;
SDValue Zeros = DAG.getSplatBuildVector(
DT, DL, DAG.getConstant(0, DL, DT.getScalarType()));
SDValue Ones =
DAG.getSplatBuildVector(VT8Bit, DL, DAG.getConstant(1, DL, MVT::i8));
SDValue Zeros = DAG.getConstant(0, DL, DT);
SDValue Ones = DAG.getConstant(1, DL, DT);

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

0 comments on commit 21df20b

Please sign in to comment.