[PATCH] D85394: [NewPM][GuardWidening] Fix loop guard widening tests under NPM

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 13:05:43 PDT 2020


asbirlea added inline comments.


================
Comment at: llvm/test/Transforms/GuardWidening/loop-schedule.ll:7
 
-; CHECK: Loop Pass Manager
-; CHECK:   Loop Invariant Code Motion
-; CHECK:   Widen guards (within a single loop, as a loop pass)
-; CHECK:   Loop Invariant Code Motion
+; LPM: Loop Pass Manager
+; LPM:   Loop Invariant Code Motion
----------------
aeubanks wrote:
> bjope wrote:
> > Why isn't this checked for NewPM? 
> > If this is the main point with the test, then the main point verification is missing with NewPM!?!?
> > 
> > Btw, shouldn't it be CHECK-NEXT if one wants to verify that there is nothing between those checked lines.
> I also was wondering why it wasn't CHECK-NEXT.
> 
> Here's the relevant output:
>       Loop Pass Manager
>         Loop Invariant Code Motion
>       Loop Pass Manager
>         Widen guards (within a single loop, as a loop pass)
>       Memory SSA
>       Loop Pass Manager
>         Loop Invariant Code Motion
> 
> The "Memory SSA" looks like what the test is hoping doesn't exist, maybe that's why it isn't CHECK-NEXT. You can try and fix this test up if you want.
> 
> The NPM version does work as intended though, added that.
This seems to be due to the widen guards pass not marking MemorySSA as preserved. This seems worth fixing in GuardWidening to explicitly mark it preserved for all types of passes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85394



More information about the llvm-commits mailing list