[all-commits] [llvm/llvm-project] 99a6e4: [IRCE] Use SCEVExpander to modify loop bound

dantrushin via All-commits all-commits at lists.llvm.org
Thu Feb 6 01:54:12 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 99a6e405edbfc4eb54af5fe7804f47aae139ce53
      https://github.com/llvm/llvm-project/commit/99a6e405edbfc4eb54af5fe7804f47aae139ce53
  Author: Denis Antrushin <dantrushin at gmail.com>
  Date:   2020-02-06 (Thu, 06 Feb 2020)

  Changed paths:
    M llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
    A llvm/test/Transforms/IRCE/non-loop-invariant-rhs-instr.ll

  Log Message:
  -----------
  [IRCE] Use SCEVExpander to modify loop bound

IRCE pass checks that it can calculate loop bounds by checking
SCEV availability at loop entry. However it is possible that loop
bound SCEV is loop invariant, but instruction used to compute it
resides within loop. In such case adjusting loop bound in preheader
using IRBuilder leads to malformed SSA.
Use SCEVExpander instead to generate proper instructions.

Reviewed-by: mkazantsev
Differential Revision: https://reviews.llvm.org/D73496




More information about the All-commits mailing list