[llvm] [VectorCombine] Fold binary op of reductions. (PR #121567)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 04:09:41 PST 2025


================
@@ -1,12 +1,11 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
-; RUN: opt < %s -passes=instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=vector-combine -vector-combine-force-fold-binop-of-reductions=true -S | FileCheck %s
----------------
RKSimon wrote:

I'd recommend dropping the vector-combine-force-fold-binop-of-reductions flag and moving this inside a target and test on various CPUs for different costs - x86 has a good range of cost levels (x86-64/x86-64-v2/x86-64-v3/x86-64-v4) which should give good cost coverage.

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


More information about the llvm-commits mailing list