nir/builder: Add a nir_imm_zero helper

v2: replace nir_zero_vec with nir_imm_zero (Karol Herbst)

Reviewed-by: Karol Herbst <kherbst@redhat.com>
This commit is contained in:
Jason Ekstrand
2019-04-01 21:31:26 -05:00
committed by Karol Herbst
parent daaf777376
commit 9b1e4bab6b
4 changed files with 18 additions and 17 deletions

View File

@@ -493,9 +493,8 @@ lower_udiv64_mod64(nir_builder *b, nir_ssa_def *n, nir_ssa_def *d,
nir_ssa_def *d_lo = nir_unpack_64_2x32_split_x(b, d);
nir_ssa_def *d_hi = nir_unpack_64_2x32_split_y(b, d);
nir_const_value v = { .u32 = { 0, 0, 0, 0 } };
nir_ssa_def *q_lo = nir_build_imm(b, n->num_components, 32, v);
nir_ssa_def *q_hi = nir_build_imm(b, n->num_components, 32, v);
nir_ssa_def *q_lo = nir_imm_zero(b, n->num_components, 32);
nir_ssa_def *q_hi = nir_imm_zero(b, n->num_components, 32);
nir_ssa_def *n_hi_before_if = n_hi;
nir_ssa_def *q_hi_before_if = q_hi;