Skip to content

Commit 480c058

Browse files
committed
Address review comment
1 parent 83ff73b commit 480c058

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2055,8 +2055,9 @@ bool AArch64TargetLowering::shouldExpandGetActiveLaneMask(EVT ResVT,
20552055

20562056
bool AArch64TargetLowering::shouldExpandPartialReductionIntrinsic(
20572057
const IntrinsicInst *I) const {
2058-
if (I->getIntrinsicID() != Intrinsic::experimental_vector_partial_reduce_add)
2059-
return true;
2058+
assert(I->getIntrinsicID() ==
2059+
Intrinsic::experimental_vector_partial_reduce_add &&
2060+
"Unexpected intrinsic!");
20602061
if (EnablePartialReduceNodes)
20612062
return true;
20622063

@@ -16895,7 +16896,9 @@ bool AArch64TargetLowering::optimizeExtendOrTruncateConversion(
1689516896
if (SrcWidth * 4 <= DstWidth && I->hasOneUser()) {
1689616897
auto *SingleUser = cast<Instruction>(*I->user_begin());
1689716898
if (match(SingleUser, m_c_Mul(m_Specific(I), m_SExt(m_Value()))) ||
16898-
(isa<IntrinsicInst>(SingleUser) &&
16899+
(match(SingleUser,
16900+
m_Intrinsic<Intrinsic::experimental_vector_partial_reduce_add>(
16901+
m_Value(), m_Specific(I))) &&
1689916902
!shouldExpandPartialReductionIntrinsic(
1690016903
cast<IntrinsicInst>(SingleUser))))
1690116904
return false;

0 commit comments

Comments
 (0)