nir/opt_uniform_subgroup: don't try to optimize non trivial clustered reduce

Fixes: 535caaf3e0 ("nir: Optimize uniform iadd, fadd, and ixor reduction operations")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38867>
This commit is contained in:
Georg Lehmann 2025-12-09 15:11:24 +01:00 committed by Marge Bot
parent a265cdaa18
commit e11d7f06d0

View file

@ -47,7 +47,8 @@ opt_uniform_subgroup_filter(const nir_instr *instr, const void *_state)
case nir_op_iadd:
case nir_op_fadd:
case nir_op_ixor:
return true;
return !nir_intrinsic_has_cluster_size(intrin) ||
nir_intrinsic_cluster_size(intrin) == 0;
case nir_op_imin:
case nir_op_umin: