From: Eric Anholt Date: Fri, 21 Sep 2018 22:00:21 +0000 (-0700) Subject: vc4: Remove dead i == 0 code from the cos() implementation. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cd667edecccf354f91386a6f4323d6593302583d;p=mesa.git vc4: Remove dead i == 0 code from the cos() implementation. The loop starts at 1. --- diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index 1f46b64005b..3c439806d36 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -758,13 +758,10 @@ ntq_fcos(struct vc4_compile *c, struct qreg src) if (i != 1) x = qir_FMUL(c, x, x2); - struct qreg mul = qir_FMUL(c, + sum = qir_FADD(c, qir_FMUL(c, x, - qir_uniform_f(c, coeff[i])); - if (i == 0) - sum = mul; - else - sum = qir_FADD(c, sum, mul); + qir_uniform_f(c, coeff[i])), + sum); } return sum; }