[llvm] [RISCV] Enumerate all RecurKind cases in isLegalToVectorizeReduction. nfc (PR #207932)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 7 01:51:10 PDT 2026
================
@@ -446,8 +447,18 @@ class RISCVTTIImpl final : public BasicTTIImplBase<RISCVTTIImpl> {
if (Ty->isBFloatTy() || (Ty->isHalfTy() && !ST->hasVInstructionsF16()))
return false;
return true;
- default:
+ case RecurKind::Mul:
+ case RecurKind::FMul:
+ case RecurKind::FMinNum:
+ case RecurKind::FMaxNum:
+ case RecurKind::FMinimum:
+ case RecurKind::FMaximum:
+ case RecurKind::FMinimumNum:
+ case RecurKind::FMaximumNum:
+ case RecurKind::FAddChainWithSubs:
----------------
Mel-Chen wrote:
IIUC, this should also work with scalable VFs.
However, to keep this patch NFC, it might be better to open a separate PR with test cases for that.
https://github.com/llvm/llvm-project/pull/207932
More information about the llvm-commits
mailing list