Files
llvm-project/llvm/lib/Transforms/Utils/SCCPSolver.cpp
Craig Topper e8a0b40d6c [SCCP] Correct range calculation for get.vector.length to use getUnsignedMax instead of getUpper. (#176493)
getUpper returns 1 more than the maxium value included in the range.
This may be 0. We should not use this in a umin. Instead we should
get the maximum value included in the range and use that for the umin.
Then convert that to Upper for the new range by adding 1.

The test was manually reduced from a downstream failure, but I couldn't
get it behave exactly the same way without more instructions. It should
be enough to show an incorrect range being calculated.

Fixes #176471
2026-01-17 21:32:33 -08:00

88 KiB