Unverified Commit cd206007 authored by Aleksandr Popov's avatar Aleksandr Popov Committed by GitHub
Browse files

[LoopConstrainer] Apply loop gurads to check that loop bounds are safe (#71531)



Loop guards that apply to loop SCEV bounds allow IRCE for cases with
compound loop bounds such as:

if (K > 0 && M > 0)
  for (i = 0; i < min(K, M); i++) {...}

if (K > 0 && M > 0)
  for (i = min(K, M); i >= 0; i--) {...}

Otherwise SCEV couldn't prove that loops have safe bounds in these
cases.

Co-authored-by: default avatarAleksander Popov <apopov@azul.com>
parent 13ccaf9b
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment