[PATCH] D110812: [test] Pre-commit test case for PR51981. NFC

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 5 02:33:41 PDT 2021


fhahn added inline comments.


================
Comment at: llvm/test/Transforms/LoopRotate/pr51981-scev-problem.ll:3
+; RUN: opt < %s -passes='print<scalar-evolution>,loop(loop-rotate),print<scalar-evolution>' -disable-output 2>&1 | FileCheck -check-prefixes CHECK-SCEV,CHECK-SCEV-NOK %s
+; FIXME (crashes): opt < %s -passes='loop(canon-freeze),loop(loop-rotate),function(bounds-checking)' -disable-output
+
----------------
bjope wrote:
> fhahn wrote:
> > Just do double check, running `loop(canon-freeze)` is required for the crash? Is that only so the SCEV cache is populated?
> Yes, that is my understanding. I tried to populate it using `print<scalar-evolution>` instead, or `require<scalar-evolution>`, but then I do not see the crash for some reason. 
> Btw, I noticed right now that I can replace `bounds-checking` by `print<scalar-evolution>` and then I still get the crash (but in the printing pass instead).
> 
> Not quite sure why the symptom is a bit different depending on how I populate the cache. Afaict canon-freeze isn't doing any modifications to the IR (and neither should the printing).
> Btw, I noticed right now that I can replace bounds-checking by print<scalar-evolution> and then I still get the crash (but in the printing pass instead).

Using ` print<scalar-evolution> ` instead of `bounds-checking` would be better, as  ` print<scalar-evolution> ` should be more stable.


================
Comment at: llvm/test/Transforms/LoopRotate/pr51981-scev-problem.ll:36
+
+for.cond109:                                      ; preds = %crit_edge, %entry
+  %div210 = load i32, i32* @offset, align 1
----------------
it might be good to rename the blocks to make it easier to identify that there is a loop nest with 2 loops (maybe something like `loop.1.header`, `loop.2`, `loop.1.latch`)


================
Comment at: llvm/test/Transforms/LoopRotate/pr51981-scev-problem.ll:37
+for.cond109:                                      ; preds = %crit_edge, %entry
+  %div210 = load i32, i32* @offset, align 1
+  br i1 %a, label %exit, label %for.body215.lr.ph
----------------
does this have to be a load?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110812



More information about the llvm-commits mailing list