[llvm] [llvm][UnifyLoopExits] Avoid optimization if no exit block is found (PR #165343)
Robert Imschweiler via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 23 09:01:58 PST 2026
https://github.com/ro-i approved this pull request.
LGTM modulo nits
I guess this is a typical fuzzer finding since a loop like this would probably be caught earlier in the pipeline and never reach UnifyLoopExits. E.g., for the AMDGPU backend, AMDGPUUnifyDivergentExitBlocks could add a dummy exit block to the loop or it could already be removed in earlier passes for other reasons (compile your test case with `llc -mtriple=amdgcn -mcpu=gfx942 llvm/test/Transforms/UnifyLoopExits/no-exit-blocks.ll -print-after-all` and look at the output).
Making code more robust is always a good thing.
https://github.com/llvm/llvm-project/pull/165343
More information about the llvm-commits
mailing list