From 70b25d9fe87a6d1fe14388df338e9f3e039c99e4 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 14 Jun 2022 21:50:14 -0700 Subject: [PATCH] nir/lower_int_to_float: Add support for i32csel opcodes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These lower naturally to the corresponding fcsel opcodes. Reviewed-by: Emma Anholt Reviewed-by: Pavel Ondračka Part-of: --- src/compiler/nir/nir_lower_int_to_float.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/nir/nir_lower_int_to_float.c b/src/compiler/nir/nir_lower_int_to_float.c index 9dd2ae9aaf8..cd45db0d465 100644 --- a/src/compiler/nir/nir_lower_int_to_float.c +++ b/src/compiler/nir/nir_lower_int_to_float.c @@ -178,6 +178,9 @@ lower_alu_instr(nir_builder *b, nir_alu_instr *alu) case nir_op_bany_inequal3: alu->op = nir_op_bany_fnequal3; break; case nir_op_bany_inequal4: alu->op = nir_op_bany_fnequal4; break; + case nir_op_i32csel_gt: alu->op = nir_op_fcsel_gt; break; + case nir_op_i32csel_ge: alu->op = nir_op_fcsel_ge; break; + default: assert(nir_alu_type_get_base_type(info->output_type) != nir_type_int && nir_alu_type_get_base_type(info->output_type) != nir_type_uint);