aaf00a1b4d
This pass (lowering discard_if to control flow and unconditional discard) was originally written for Zink, but is useful for hardware that lacks conditional discard instructions like AGX. In theory AGX could implement a conditional discard with CSEL, but the vendor compiler uses a lowering like this one. Since I like not writing code, I'd like to use the pass that's already in tree. v2: Don't preserve dominance (Jason). Assert we don't see demotes or terminates (Jason). Add Mike's ack. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14217>