[all-commits] [llvm/llvm-project] 6f194a: [SimplifyCFG] Avoid truncation in linear map overf...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Mon Sep 23 06:14:00 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6f194a6dea4b4067336431e699ea3588417d4b96
https://github.com/llvm/llvm-project/commit/6f194a6dea4b4067336431e699ea3588417d4b96
Author: Nikita Popov <npopov at redhat.com>
Date: 2024-09-23 (Mon, 23 Sep 2024)
Changed paths:
M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
M llvm/test/Transforms/SimplifyCFG/X86/switch_to_lookup_table.ll
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list