[llvm] [InstCombine] Fold selection between less than zero and one (PR #69961)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 03:17:26 PDT 2023


elhewaty wrote:

> My 2c is to transform `(A pred C) ? (A << BW - 1) : 1` into `ZExt ((A pred C) ? A < 0 : 1)`.

@XChy Should first transform `A pred C ? (A << BW - 1) : 1` --> `Zext(A pred C ? A < 0 : 1)`, and then 
to fold `Zext(A pred C ? A < 0: 1)`, by similar patterns like this pull

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


More information about the llvm-commits mailing list