[all-commits] [llvm/llvm-project] fd229c: [polly] Fix SCEVLoopAddRecRewriter to avoid invali...

Eli Friedman via All-commits all-commits at lists.llvm.org
Tue Jun 1 09:51:28 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fd229caa0138d296090c101655c82ca7da58ddd6
      https://github.com/llvm/llvm-project/commit/fd229caa0138d296090c101655c82ca7da58ddd6
  Author: Eli Friedman <efriedma at quicinc.com>
  Date:   2021-06-01 (Tue, 01 Jun 2021)

  Changed paths:
    M llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h
    M llvm/lib/Analysis/ScalarEvolution.cpp
    A polly/test/Isl/CodeGen/OpenMP/scev-rewriting.ll

  Log Message:
  -----------
  [polly] Fix SCEVLoopAddRecRewriter to avoid invalid AddRecs.

When we're remapping an AddRec, the AddRec constructed by a partial
rewrite might not make sense.  This triggers an assertion complaining
it's not loop-invariant.

Instead of constructing the partially rewritten AddRec, just skip
straight to calling evaluateAtIteration.

Testcase was automatically reduced using llvm-reduce, so it's a little
messy, but hopefully makes sense.

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




More information about the All-commits mailing list