[PATCH] D125574: [BasicBlockUtils] Do not move loop metadata if outer loop header.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 16 00:55:08 PDT 2022


fhahn added reviewers: Meinersbur, reames.
fhahn added a comment.

Thanks for the patch! Makes sense, I added some suggestions with respect to the test.



================
Comment at: llvm/test/Transforms/LoopSimplify/update_latch_md2.ll:4
+
+; RUN: opt < %s -loop-simplify -S | FileCheck %s
+; CHECK-LABEL: _bb7.loopexit:
----------------
nit: this uses the legacy PM syntax, would be good to update this to use `-passes=loop-simplify`,


================
Comment at: llvm/test/Transforms/LoopSimplify/update_latch_md2.ll:14
+
+_bb7:
+  br i1 %p, label %_bb4, label %_bb2
----------------
it would make the test a bit easier to read if the names would be a bit more descriptive, e.g. `_bb7 -> loop.header`, `_bb6 -> loop.latch`, `_bb2 -> exit` and so on.

Also, would it be possible to pre-commit the cleaned up test and then only include the diff caused by the patch?


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

https://reviews.llvm.org/D125574



More information about the llvm-commits mailing list