agx: Ensure that the optimizer sees legitimate SSA

Expecting it to keep around unused definitions around is wishful. Add an
"anchoring" unit_test instruction to consume the results so they don't
have to be precoloured registers.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18687>
This commit is contained in:
Alyssa Rosenzweig
2022-09-10 17:31:07 -04:00
committed by Marge Bot
parent 52467c2d1e
commit 640fd089a2
2 changed files with 50 additions and 34 deletions

View File

@@ -272,3 +272,5 @@ op("p_split", _, srcs = 1, dests = 4)
# Phis are special-cased in the IR as they (uniquely) can take an unbounded
# number of source.
op("phi", _, srcs = 0)
op("unit_test", _, dests = 0, srcs = 1, can_eliminate = False)