[llvm] [InstCombine] Fold selection between less than zero and one (PR #69961)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 24 04:38:59 PDT 2023
XChy wrote:
> I mean Is there a patch already for this?
Things like `A pred1 C1 ? A pred2 C2 : 1` are folded by previous patches. But **no one already for** `A pred C ? (A << BW - 1) : 1`.
Just fold `A pred C ? (A << BW - 1) : 1` -> `ZExt(A pred C ? A < 0 : 1)`, which is foldable for previous patches.
Does this explanation make sense to you?
https://github.com/llvm/llvm-project/pull/69961
More information about the llvm-commits
mailing list