[PATCH] D110813: [LoopRotate] Forget SCEV values in RewriteUsesOfClonedInstructions

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 6 07:41:09 PDT 2021


bjope added a comment.

In D110813#3041983 <https://reviews.llvm.org/D110813#3041983>, @fhahn wrote:

> It looks like the crash/differences may be caused by stale entries in the loop disposition cache. Are those caught by the checks in D110385 <https://reviews.llvm.org/D110385>?

Yep. I've downloaded D110385 <https://reviews.llvm.org/D110385>, and used `verify<scalar-evolution>` after loop-rotate instead of  `print<scalar-evolution>`. Then I see this:

  Cached block disposition of SCEV (trunc i32 %wide to i16) for basic block: 
  loop.inner:                                       ; preds = %loop.inner, %loop.inner.ph
    %iv = phi i16 [ %narrow, %loop.inner.ph ], [ %iv.plus, %loop.inner ]
    %iv.promoted = zext i16 %iv to i32
    %gep = getelementptr inbounds [11263 x i32], [11263 x i32]* @array, i32 0, i32 %iv.promoted
    store i32 7, i32* %gep, align 1
    %iv.plus = add i16 %iv, 1
    %cmp = icmp ult i16 %iv.plus, 700
    br i1 %cmp, label %loop.inner, label %loop.outer.latch
   has changed!
  Cached: 2
  Actual: 0


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110813/new/

https://reviews.llvm.org/D110813



More information about the llvm-commits mailing list