From: Ben Skeggs Date: Sat, 6 Jun 2020 06:58:00 +0000 (+1000) Subject: nir: use bitfield_insert instead of bfi in nir_lower_double_ops X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a6c747e8e0b982c707b1ff73edd1087a1c5e1db2;p=mesa.git nir: use bitfield_insert instead of bfi in nir_lower_double_ops NVIDIA hardware doesn't have an equivilant to bfi, but we do already have a lowering for bitfield_insert->bfi. Signed-off-by: Ben Skeggs Reviewed-by: Jason Ekstrand Part-of: --- diff --git a/src/compiler/nir/nir_lower_double_ops.c b/src/compiler/nir/nir_lower_double_ops.c index f9c93a910a5..73226fd62ef 100644 --- a/src/compiler/nir/nir_lower_double_ops.c +++ b/src/compiler/nir/nir_lower_double_ops.c @@ -49,7 +49,9 @@ set_exponent(nir_builder *b, nir_ssa_def *src, nir_ssa_def *exp) /* The exponent is bits 52-62, or 20-30 of the high word, so set the exponent * to 1023 */ - nir_ssa_def *new_hi = nir_bfi(b, nir_imm_int(b, 0x7ff00000), exp, hi); + nir_ssa_def *new_hi = nir_bitfield_insert(b, hi, exp, + nir_imm_int(b, 20), + nir_imm_int(b, 11)); /* recombine */ return nir_pack_64_2x32_split(b, lo, new_hi); }