[all-commits] [llvm/llvm-project] bca550: [IRCE] Add NSW flag to main loop's indvar base

Aleksandr Popov via All-commits all-commits at lists.llvm.org
Mon Jul 17 07:18:16 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bca5501869f2b6b1a2dc2654d5cc384f0cf69e2f
      https://github.com/llvm/llvm-project/commit/bca5501869f2b6b1a2dc2654d5cc384f0cf69e2f
  Author: Aleksandr Popov <a.popov.tmb at gmail.com>
  Date:   2023-07-17 (Mon, 17 Jul 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
    M llvm/test/Transforms/IRCE/conjunctive-checks.ll
    M llvm/test/Transforms/IRCE/correct-loop-info.ll
    M llvm/test/Transforms/IRCE/iv-plus-offset-range-check.ll
    M llvm/test/Transforms/IRCE/multiple-access-no-preloop.ll
    M llvm/test/Transforms/IRCE/pre_post_loops.ll
    M llvm/test/Transforms/IRCE/ranges_of_different_types.ll
    M llvm/test/Transforms/IRCE/rc-negative-bound.ll
    M llvm/test/Transforms/IRCE/stride_more_than_1.ll

  Log Message:
  -----------
  [IRCE] Add NSW flag to main loop's indvar base

We have guarantees that induction variable will not overflow in the main
loop after the loop constrained. Therefore we can add no wrap flags on
its base in order not to miss info that loop is countable.

Add NSW flag now, since adding NUW flag requires a bit more complicated
analysis.

Reviewed By: skatkov

Differential Revision: https://reviews.llvm.org/D154954




More information about the All-commits mailing list