[PATCH] D114916: [LoopInterchange] Enable loop interchange with multiple outer loop indvars

Bardia Mahjour via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 12 10:23:16 PST 2022


bmahjour added inline comments.


================
Comment at: llvm/test/Transforms/LoopInterchange/interchangeable-outerloop-multiple-indvars.ll:19
+; CHECK-LABEL: @test1(
+; CHECK:  for.cond2.preheader:
+; CHECK:    [[INDVAR0:%.*]] = phi i64 [ [[INDVAR0_NEXT:%.*]], [[FOR_INC7:%.*]] ], [ 0, [[FOR_COND2_PREHEADER_PREHEADER:%.*]] ]
----------------
congzhe wrote:
> bmahjour wrote:
> > Please use CHECK-NEXT and show full context
> Thanks for the comment! I intentionally used "CHECK" instead of "CHECK-NEXT" since some time down the road even some trivial change in the pass could fail "CHECK-NEXT" (and one needs to update the tests accordingly), hence I extracted the essential IR I'd like to check using "CHECK". 
> 
> But your comment also makes sense, I'll use "CHECK-NEXT" and update them shortly.
I have had the same dilemma as well, but based on feedback from others, I'm now realizing the benefit of having full context in the LIT tests. It makes it much easier to follow the structure and semantics of the generated code. In case of future changes, the tests can be trivially regenerated (via `utils/update_test_checks.py`).


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

https://reviews.llvm.org/D114916



More information about the llvm-commits mailing list