[all-commits] [llvm/llvm-project] cdcefd: [IRCE] Implement runtime overflow check for comput...
Aleksandr Popov via All-commits
all-commits at lists.llvm.org
Wed Jul 12 02:20:11 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: cdcefd2f9a2d08e774fc7dcf631361a03bf6b810
https://github.com/llvm/llvm-project/commit/cdcefd2f9a2d08e774fc7dcf631361a03bf6b810
Author: Aleksandr Popov <a.popov.tmb at gmail.com>
Date: 2023-07-12 (Wed, 12 Jul 2023)
Changed paths:
M llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
M llvm/test/Transforms/IRCE/iv-plus-offset-range-check.ll
Log Message:
-----------
[IRCE] Implement runtime overflow check for computed range's end
Here is activated check elimination which was parsed previously in
https://reviews.llvm.org/D154069
* Added runtime check that computed range's boundary doesn't overflow in
terms of range type.
* From the statement INT_MIN <= END <= INT_MAX is inferred check:
isNonNegative(INT_MAX - END) * isNonNegative(END - INT_MIN).
* If overflow happens, check will return 0 and the safe interval will be
empty.
Reviewed By: skatkov
Differential Revision: https://reviews.llvm.org/D154188
More information about the All-commits
mailing list