diff options
-rw-r--r-- | src/gallium/drivers/vc4/vc4_opt_algebraic.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_opt_algebraic.c b/src/gallium/drivers/vc4/vc4_opt_algebraic.c index 207686b4af7..aea2b9dbe87 100644 --- a/src/gallium/drivers/vc4/vc4_opt_algebraic.c +++ b/src/gallium/drivers/vc4/vc4_opt_algebraic.c @@ -182,6 +182,24 @@ qir_opt_algebraic(struct vc4_compile *c) break; + case QOP_FMIN: + if (is_1f(c, inst->src[1]) && + inst->src[0].pack >= QPU_UNPACK_8D_REP && + inst->src[0].pack <= QPU_UNPACK_8D) { + replace_with_mov(c, inst, inst->src[0]); + progress = true; + } + break; + + case QOP_FMAX: + if (is_zero(c, inst->src[1]) && + inst->src[0].pack >= QPU_UNPACK_8D_REP && + inst->src[0].pack <= QPU_UNPACK_8D) { + replace_with_mov(c, inst, inst->src[0]); + progress = true; + } + break; + case QOP_FSUB: case QOP_SUB: if (is_zero(c, inst->src[1])) { |