nir: Clean up nir_op_is_vec() and its callers
The nir_op_is_vec() helper I added in 842338e2f0
("nir: Add a
nir_op_is_vec helper") treats nir_op_mov as a vec even though the
semanitcs of the two are different. In retrospect, this was a mistake
as the previous three fixup commits show. This commit splits the helper
into two: nir_op_is_vec() and nir_op_is_vec_or_mov() and uses the
appropriate helper at each call site. Hopefully, this rename will
encurage any future users of these helpers to think about nir_op_mov as
separate from nir_op_vecN and we can avoid these bugs.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24704>
This commit is contained in:

committed by
Marge Bot

parent
408929289a
commit
4e2830c9ef
@@ -570,9 +570,6 @@ ntt_extract_const_src_offset(nir_src *src)
|
||||
/* We'd like to reuse nir_scalar_chase_movs(), but it assumes SSA and that
|
||||
* seems reasonable for something used in inner loops of the compiler.
|
||||
*/
|
||||
if (!nir_alu_instr_is_copy(alu))
|
||||
return 0;
|
||||
|
||||
if (alu->op == nir_op_mov) {
|
||||
s.def = alu->src[0].src.ssa;
|
||||
s.comp = alu->src[0].swizzle[s.comp];
|
||||
|
Reference in New Issue
Block a user