diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index 52b5eecd90f..ca1d33f862b 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -1969,6 +1969,10 @@ bi_emit_alu(bi_builder *b, nir_alu_instr *instr) bi_hadd_to(b, nir_type_int, sz, dst, s0, s1, BI_ROUND_RTP); break; + case nir_op_ineg: + bi_isub_to(b, nir_type_int, sz, dst, bi_zero(), s0, false); + break; + case nir_op_isub: bi_isub_to(b, nir_type_int, sz, dst, s0, s1, false); break; diff --git a/src/panfrost/bifrost/bifrost_nir_algebraic.py b/src/panfrost/bifrost/bifrost_nir_algebraic.py index 81d2708573a..5dd553cb685 100644 --- a/src/panfrost/bifrost/bifrost_nir_algebraic.py +++ b/src/panfrost/bifrost/bifrost_nir_algebraic.py @@ -30,13 +30,7 @@ a = 'a' b = 'b' c = 'c' -algebraic_late = [ - # ineg must be lowered late, but only for integers; floats will try to - # have modifiers attached... hence why this has to be here rather than - # a more standard lower_negate approach - - (('ineg', a), ('isub', 0, a)), -] +algebraic_late = [] for isz in ('8', '16', '32'): for osz in ('16', '32', '64'):