[llvm] [LLVM][CodeGen] Flooring BW to 1 in isSaturatingMinMax (PR #160637)

David Green via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 25 00:45:53 PDT 2025


================
@@ -6047,7 +6047,7 @@ static SDValue isSaturatingMinMax(SDValue N0, SDValue N1, SDValue N2,
   }
 
   if (MaxC == 0 && MinCPlus1.isPowerOf2()) {
----------------
davemgreen wrote:

Add a check that MinC != 0 to this too instead. It is not really a saturate if both limits are 0.

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


More information about the llvm-commits mailing list