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>
(cherry picked from commit e11d7f06d0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
This commit is contained in:
Georg Lehmann 2025-12-09 15:11:24 +01:00 committed by Dylan Baker
parent 26d7753c99
commit 3349c578ed
2 changed files with 3 additions and 2 deletions

View file

@ -104,7 +104,7 @@
"description": "nir/opt_uniform_subgroup: don't try to optimize non trivial clustered reduce",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "535caaf3e027963536e48fa5bbb59dc779523e00",
"notes": null

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: