Skip to content

Commit 00a1be2

Browse files
committed
Simplify shouldExpandPartialReductionIntrinsic
1 parent 2f3a0dc commit 00a1be2

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1991,21 +1991,12 @@ bool AArch64TargetLowering::shouldExpandGetActiveLaneMask(EVT ResVT,
19911991
bool AArch64TargetLowering::shouldExpandPartialReductionIntrinsic(
19921992
const IntrinsicInst *I) const {
19931993

1994-
VectorType *RetTy = dyn_cast<VectorType>(I->getType());
1995-
if (!RetTy || !RetTy->isScalableTy())
1994+
if (I->getIntrinsicID() != Intrinsic::experimental_vector_partial_reduce_add)
19961995
return true;
19971996

1998-
if (RetTy->getScalarType()->isIntegerTy(32) &&
1999-
RetTy->getElementCount() == ElementCount::get(4, RetTy->isScalableTy()))
2000-
return false;
2001-
if (RetTy->getScalarType()->isIntegerTy(64) &&
2002-
RetTy->getElementCount() == ElementCount::get(2, RetTy->isScalableTy()))
2003-
return false;
2004-
if (RetTy->getScalarType()->isIntegerTy(64) &&
2005-
RetTy->getElementCount() == ElementCount::get(4, RetTy->isScalableTy()))
2006-
return false;
1997+
EVT VT = EVT::getEVT(I->getType());
20071998

2008-
return true;
1999+
return VT != MVT::nxv4i32 && VT != MVT::nxv2i64 && VT != MVT::nxv4i64;
20092000
}
20102001

20112002
bool AArch64TargetLowering::shouldExpandCttzElements(EVT VT) const {

0 commit comments

Comments
 (0)