We've run into a bug where the opt binary segfaults. To catch such errors in the future, it's clearly not enough to just run #guard_msgs in #eval ...-based tests, but we actually need to run the opt binary in CI.
Still, I'd like to avoid a workflow that relies on hand-crafting bash scripts that check the output, so let's investigate if there's a low-overhead existing solution we can adopt. I believe the LLVM community uses filecheck, maybe we can adopt that?