Skip to content

nir: Revert "nir: add merge loop terminators optimisation"

Alyssa Rosenzweig requested to merge alyssa/mesa:nir/revert-loop into main

This optimization is complicated and subtle. Few Mesa devs are equipped to understand it. I am not one. Even fewer have the bandwidth to review, given that it's motivated by r300 of all drivers. It landed with an ack but without review.

It is broken in ways that I am not qualified to root-cause:

Across 440k tests on lavapipe, there is a single regression (dEQP-VK.graphicsfuzz.cov-loop-switch-discard-never-hit). Caught by our nightly full run [1], missed by fractional premerge. Similarly across 800k tests run on M1, it regressed just one (dEQP-VK.graphicsfuzz.nested-for-loops-switch-fallthrough). It also blew up NIR validation in a radv fossil without any apparent CTS changes [2].

All of this is to say - I don't have confidence in our ability to test this change, only relying on qualified thorough code review. And we don't have the qualified review bandwidth for that. (I'm ok at compilers, but not nearly good enough to review this.)

Let's revert the commit, fixing the nightly regressions. It was only an optimization after all.

This reverts commit 9995f336.

[1] https://gitlab.freedesktop.org/mesa/mesa/-/jobs/59729003 [2] !29679 (closed)

Merge request reports