[llvm] [AArch64][SelectionDAG] Fix UDOT regression (PR #144907)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 19 08:41:56 PDT 2025
================
@@ -16865,14 +16865,13 @@ bool AArch64TargetLowering::optimizeExtendOrTruncateConversion(
if (SrcWidth * 4 <= DstWidth) {
if (all_of(I->users(), [&](auto *U) {
auto *SingleUser = cast<Instruction>(&*U);
- return (
- match(SingleUser, m_c_Mul(m_Specific(I), m_SExt(m_Value()))) ||
- (match(SingleUser,
- m_Intrinsic<
- Intrinsic::experimental_vector_partial_reduce_add>(
- m_Value(), m_Specific(I))) &&
- !shouldExpandPartialReductionIntrinsic(
- cast<IntrinsicInst>(SingleUser))));
+ bool IsMul =
----------------
david-arm wrote:
nit: Right now we no longer return early if `IsMul` is true, but I understand the code looks more readable now. If your intention is to reduce the level of indentation and split the if statements out to be more readable, what about
```
if (match(SingleUser, m_c_Mul(m_Specific(I), m_SExt(m_Value()))))
return true;
if (match(SingleUser,
m_Intrinsic<Intrinsic::experimental_vector_partial_reduce_add>(
m_Value(), m_Specific(I))))
return true;
return false;
```
? If you prefer the original version that's also fine!
https://github.com/llvm/llvm-project/pull/144907
More information about the llvm-commits
mailing list