nir/load_store_vectorize: Fix parsing offsets through u2u64
Fixes: cfba417316 ('nir/load_store_vectorize: optimize accesses with u2u64(ishl.nuw(iadd))')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36936>
This commit is contained in:
committed by
Marge Bot
parent
d896c490df
commit
cacb390ec9
@@ -400,13 +400,16 @@ parse_offset(nir_scalar base, uint64_t *offset)
|
||||
add += add2 * mul;
|
||||
}
|
||||
|
||||
if (nir_scalar_is_alu(base) && (nir_scalar_alu_op(base) == nir_op_mov ||
|
||||
nir_scalar_alu_op(base) == nir_op_u2u64)) {
|
||||
if (nir_scalar_alu_op(base) == nir_op_u2u64) {
|
||||
if (nir_scalar_is_alu(base)) {
|
||||
if (nir_scalar_alu_op(base) == nir_op_mov) {
|
||||
base = nir_scalar_chase_alu_src(base, 0);
|
||||
} else if (nir_scalar_alu_op(base) == nir_op_u2u64) {
|
||||
base = nir_scalar_chase_alu_src(base, 0);
|
||||
require_nuw = true;
|
||||
uub = u_uintN_max(base.def->bit_size);
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
base = nir_scalar_chase_alu_src(base, 0);
|
||||
progress = true;
|
||||
}
|
||||
} while (progress);
|
||||
|
||||
Reference in New Issue
Block a user