freedreno/ir3/cp: fix cmps folding
authorRob Clark <robdclark@chromium.org>
Sun, 17 May 2020 01:03:25 +0000 (18:03 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 19 May 2020 16:06:17 +0000 (16:06 +0000)
commit16cd232dbc31fd594b8ce6b04576870b36d301f6
tree3421bb3502bf633fec25823d0d896f28ad65d508
parent39de27d3b9031af5115504893b5e1bd42756d3db
freedreno/ir3/cp: fix cmps folding

When we start doing cp iteratively, we hit the case that we've already
`cmps.s.*` into a `cmps.s.ne p0.x, ...`..  when we try to do that again
we can invert the logic condition.  So check specifically the condition
to prevent this.

TODO we could maybe be more clever about this to combine conditions.
But why isn't that happening in nir?  For example, see
dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.bool

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048>
src/freedreno/ir3/ir3_cp.c