From c9c637a707627e4be939063fab9f494d95f9b27b Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Fri, 1 Jan 2021 02:05:34 +1300 Subject: [PATCH] pan/bi: Implement ihadd/irhadd operations Reviewed-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bifrost_compile.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index 3219d0ee5f4..ddb1e2b307a 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -1260,6 +1260,14 @@ bi_emit_alu(bi_builder *b, nir_alu_instr *instr) bi_iadd_to(b, sz, dst, s0, s1, true); break; + case nir_op_ihadd: + bi_hadd_to(b, sz, dst, s0, s1, BI_ROUND_RTN); + break; + + case nir_op_irhadd: + bi_hadd_to(b, sz, dst, s0, s1, BI_ROUND_RTP); + break; + case nir_op_isub: bi_isub_to(b, sz, dst, s0, s1, false); break;