[Mlir-commits] [mlir] [MLIR][Vector] Support vector reduction for xor/maxnumf/minnumf (PR #163310)

Andrzej WarzyƄski llvmlistbot at llvm.org
Mon Nov 3 13:00:24 PST 2025


banach-space wrote:

Sorry for the delay, I was away travelling. 

> Tests for `minnumf`, `maxnumf`, `xor` ops are already added in: https://github.com/llvm/llvm-project/blob/main/mlir/test/Dialect/Vector/ops.mlir https://github.com/llvm/llvm-project/blob/main/mlir/test/Dialect/Vector/invalid.mlir#L1176 https://github.com/llvm/llvm-project/blob/main/mlir/test/Dialect/Vector/break-down-vector-reduction.mlir#L19
> 
> As for conversion tests to LLVM, they are already in it. https://github.com/llvm/llvm-project/blob/main/mlir/test/Conversion/VectorToLLVM/vector-reduction-to-llvm.mlir#L133
> 
> For conversion to SPIR-V, `xor` reduction op is missing. I'll add the implementation and tests in a separate PR. As for integration test, I'll create a follow-up PR as well.

This makes me realise that I over-indexed on your PR title: "[MLIR][Vector] Support vector reduction for xor/maxnumf/minnumf ". These types of "reductions" are _already supported_. This PR is merely extending `getVectorReductionOp`, which is only used for the affine vectoriser, right? This is much smaller scope than I initially assumed - sorry, my bad!

Please update the title and the summary accordingly. Otherwise LGTM.

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


More information about the Mlir-commits mailing list