[llvm] [LV] Add support for absolute difference partial reductions (PR #188043)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 14 08:33:39 PDT 2026
================
@@ -6030,6 +6030,31 @@ optimizeExtendsForPartialReduction(VPSingleDefRecipe *BinOp,
return BinOp;
}
+ // reduce.add(abs(sub(ext(A), ext(B))))
+ // -> reduce.add(ext(absolute-difference(A, B)))
+ VPValue *X, *Y;
+ if (match(BinOp,
----------------
sdesmalen-arm wrote:
nit: more an observation that `BinOp` is not a binary operator if it is `Intrinsic::abs`. Maybe you can rename this in an NFC follow up for something.
https://github.com/llvm/llvm-project/pull/188043
More information about the llvm-commits
mailing list