[all-commits] [llvm/llvm-project] e16c5c: [IRCE] Parse range checks in the form of 'LHS - RH...
Aleksandr Popov via All-commits
all-commits at lists.llvm.org
Mon Jul 10 04:01:18 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e16c5c092205f68825466c25a1dd30783c4820f3
https://github.com/llvm/llvm-project/commit/e16c5c092205f68825466c25a1dd30783c4820f3
Author: Aleksandr Popov <a.popov.tmb at gmail.com>
Date: 2023-07-10 (Mon, 10 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] Parse range checks in the form of 'LHS - RHS vs Limit'
Introduced the following range checks forms parsing:
* IV - Offset vs Limit
* Offset - IV vs Limit
Range's end boundary is computed as (Offset +/- Limit ).
If it's not possible to prove at compile time that computed upper bound
will not overflow, then scale boundary computation to a wider type to
perform overflow check at runtime.
Runtime overflow will be implemented in the next patch. In the meantime
safe range for such kind of checks isn't computed.
Reviewed By: skatkov
Differential Revision: https://reviews.llvm.org/D154069
More information about the All-commits
mailing list