[llvm] [InstCombine] Fold signed-max sub-or pattern (PR #202274)

Antonio Frighetto via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 01:20:12 PDT 2026


https://github.com/antoniofrighetto commented:

I don't think we need to exclude nuw/nsw here (even when the overflow occurs, we refine poison to a concrete value here, the sign mask, which is always a valid refinement: https://alive2.llvm.org/ce/z/6fWzUg). I wonder though, could this fold be generalized further?

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


More information about the llvm-commits mailing list