[llvm] [BranchFolding][RISCV] Optimize branches NE/EQ to zero or one (PR #131684)

Mikhail R. Gadelha via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 19 09:58:57 PDT 2025


mikhailramalho wrote:

> @topperc @mikhailramalho I have updated this patch to use optimizeCondBranch. In order to get it to work, we needed to update the PeepholeOptimizer to no longer preserve the CFG, DT, and LI, since we're possibly removing a successor from the CFG.

Nice, I'm surprised with the new changes to the tests

Are you planning to push the changes here to ##131728?


https://github.com/llvm/llvm-project/pull/131684


More information about the llvm-commits mailing list