nir/opt_vectorize: fix typo in instr_can_rewrite()

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8391>
This commit is contained in:
Rhys Perry 2021-01-08 15:13:44 +00:00 committed by Marge Bot
parent e7444bd3a6
commit bdf316ae7b

View file

@ -158,7 +158,7 @@ instr_can_rewrite(nir_instr *instr, bool vectorize_16bit)
* outside of max_components: these should better be scalarized */
uint32_t mask = vectorize_16bit ? ~1 : ~3;
for (unsigned j = 0; j < alu->dest.dest.ssa.num_components; j++) {
if ((alu->src[i].swizzle[0] & mask) != (alu->src[i].swizzle[i] & mask))
if ((alu->src[i].swizzle[0] & mask) != (alu->src[i].swizzle[j] & mask))
return false;
}
}