nikic wrote: Can you please add a test in llvm/test/Transforms/SimplifyCFG (something that doesn't fold without your change and folds with)? It's a bit hard to tell what exactly it is you are trying to fix here. https://github.com/llvm/llvm-project/pull/87431