[all-commits] [llvm/llvm-project] cd2060: [LoopConstrainer] Apply loop gurads to check that ...

Aleksandr Popov via All-commits all-commits at lists.llvm.org
Wed Mar 13 10:30:26 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cd20600767409b183a6d213d56f85f8041a21487
      https://github.com/llvm/llvm-project/commit/cd20600767409b183a6d213d56f85f8041a21487
  Author: Aleksandr Popov <42888396+aleks-tmb at users.noreply.github.com>
  Date:   2024-03-13 (Wed, 13 Mar 2024)

  Changed paths:
    M llvm/lib/Transforms/Utils/LoopConstrainer.cpp
    M llvm/test/Transforms/IRCE/compound-loop-bound.ll

  Log Message:
  -----------
  [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: Aleksander Popov <apopov at azul.com>



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