Skip to content

Commit 6637a70

Browse files
DevM-ukyuxuanchen1997
authored andcommitted
Revert "[AArch64] Lower scalable i1 vector add reduction to cntp" (#99853)
Summary: Reverts #99031 Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251290
1 parent 1cbe49f commit 6637a70

File tree

2 files changed

+0
-146
lines changed

2 files changed

+0
-146
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27640,20 +27640,6 @@ SDValue AArch64TargetLowering::LowerReductionToSVE(unsigned Opcode,
2764027640
VecOp = convertToScalableVector(DAG, ContainerVT, VecOp);
2764127641
}
2764227642

27643-
// Lower VECREDUCE_ADD of nxv2i1-nxv16i1 to CNTP rather than UADDV.
27644-
if (ScalarOp.getOpcode() == ISD::VECREDUCE_ADD &&
27645-
VecOp.getOpcode() == ISD::ZERO_EXTEND) {
27646-
SDValue BoolVec = VecOp.getOperand(0);
27647-
if (BoolVec.getValueType().getVectorElementType() == MVT::i1) {
27648-
// CNTP(BoolVec & BoolVec) <=> CNTP(BoolVec & PTRUE)
27649-
SDValue CntpOp = DAG.getNode(
27650-
ISD::INTRINSIC_WO_CHAIN, DL, MVT::i64,
27651-
DAG.getTargetConstant(Intrinsic::aarch64_sve_cntp, DL, MVT::i64),
27652-
BoolVec, BoolVec);
27653-
return DAG.getAnyExtOrTrunc(CntpOp, DL, ScalarOp.getValueType());
27654-
}
27655-
}
27656-
2765727643
// UADDV always returns an i64 result.
2765827644
EVT ResVT = (Opcode == AArch64ISD::UADDV_PRED) ? MVT::i64 :
2765927645
SrcVT.getVectorElementType();

llvm/test/CodeGen/AArch64/sve-i1-add-reduce.ll

Lines changed: 0 additions & 132 deletions
This file was deleted.

0 commit comments

Comments
 (0)