[llvm] [LLVM][CodeGen] Flooring BW to 1 in isSaturatingMinMax (PR #160637)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 25 02:04:47 PDT 2025
================
@@ -6047,7 +6047,7 @@ static SDValue isSaturatingMinMax(SDValue N0, SDValue N1, SDValue N2,
}
if (MaxC == 0 && MinCPlus1.isPowerOf2()) {
- BW = MinCPlus1.exactLogBase2();
+ BW = std::max(MinCPlus1.exactLogBase2(), 1);
----------------
MitchBriles wrote:
Should this be MinBitWidth instead of 1?
https://github.com/llvm/llvm-project/pull/160637
More information about the llvm-commits
mailing list