[llvm] [LV] Create in-loop sub reductions (PR #147026)

Sam Tebbs via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 21 08:44:59 PDT 2025


================
@@ -5151,6 +5151,8 @@ bool AArch64TTIImpl::isLegalToVectorizeReduction(
     return false;
 
   switch (RdxDesc.getRecurrenceKind()) {
+  case RecurKind::Sub:
+  case RecurKind::AddChainWithSubs:
----------------
SamTebbs33 wrote:

Thanks for fixing that. Sander is right about it only being implemented for AArch64 and RISC-V. It just returns a blanket true by default. 

https://github.com/llvm/llvm-project/pull/147026


More information about the llvm-commits mailing list