Good luck finding such a bug, because you will be looking on correct code, but computer will be executing invalid output.
Most work in ML for compilers focuses on replacing heuristics and phase ordering precisely because they don't impact correctness. There is some work being done on neural compilation [1], but I'm not sure that's going to be a viable approach anytime soon.
lol let's say they're less likely to impact correctness than an arbitrary new optimization.
At this point this is like (usefully) fuzzing your optimizer, which long term is going to be great for correctness.
3% code size reduction without changing semantics would be more interesting but might still be a bad thing for performance.
*fast-math etc is a thing, where similar-enough output is fine
3% code size reduction is really good. The challenge will be having codegen like this that someone is willing to support. And for that they'd want to be able to reason about why the compiler made this decision or that one. IIUC that's an outstanding problem for AI in general.