Files
clang-p2996/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
Nikita Popov 6f194a6dea [SimplifyCFG] Avoid truncation in linear map overflow check
This is supposed to test multiplication of the linear multiplifier
with the largest value it can be multiplied with. However, if
we truncate TableSize-1 here, it might not actually be the largest
value. I think in practice this still works out, because in cases
where we'd truncate the value here we'd also fail the NonMonotonic
check. But to match the intent of the code, we should treat the
truncating case as overflowing.
2024-09-23 15:13:32 +02:00

312 KiB