[llvm] [InstCombine] Fold (X == 0 ? Y : 0) | X to X == 0 ? Y : X (PR #138373)

via llvm-commits llvm-commits at lists.llvm.org
Sat May 3 19:24:57 PDT 2025


YLChenZ wrote:

> At a high level, this seems like we should be able to handle it generically with a FoldOpIntoSelect-style transform, but that currently only works with a constant binop operand.
You're right, we should add support for this kind of folding in FoldOpIntoSelect.


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


More information about the llvm-commits mailing list