Skip to content
Commit e16c5c09 authored by Aleksandr Popov's avatar Aleksandr Popov
Browse files

[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
parent b7d462a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment