agx: Fix float copyprop of neg(neg) case

They should cancel each other. Fixes:

   dEQP-GLES2.functional.shaders.random.basic_expression.combined.0

Fixes: 28801b4849 ("agx: Add forward optimizing pass for fmov")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18380>
This commit is contained in:
Alyssa Rosenzweig
2022-09-02 22:53:59 -04:00
committed by Marge Bot
parent 9645e46a53
commit 095415cdf7

View File

@@ -81,11 +81,12 @@ agx_is_fmov(agx_instr *def)
static agx_index
agx_compose_float_src(agx_index to, agx_index from)
{
if (to.abs)
if (to.abs) {
from.neg = false;
from.abs = true;
}
from.abs |= to.abs;
from.neg |= to.neg;
from.neg ^= to.neg;
return from;
}