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

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 21 06:34:25 PDT 2025


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

>From what I can see only AArch64 and RISC-V targets have this target hook implemented.

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


More information about the llvm-commits mailing list