[PATCH] D99354: [SimpleLoopUnswitch] Port partially invariant unswitch from LoopUnswitch to SimpleLoopUnswitch

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 2 02:21:55 PDT 2021


fhahn reopened this revision.
fhahn added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/test/Transforms/SimpleLoopUnswitch/partial-unswitch-check-metadata.ll:9
+
+define i32 @partial_unswitch_check_metadata(i32* %ptr, i32 %N) {
+; CHECK-LABEL: @partial_unswitch_check_metadata(
----------------
Can this test just be part of llvm/test/Transforms/SimpleLoopUnswitch/partial-unswitch.ll?


================
Comment at: llvm/test/Transforms/SimpleLoopUnswitch/partial-unswitch-generate-metadata.ll:8
+;
+; CHECK: [[LOOP0:![0-9]+]] = !{!"llvm.loop.unswitch.partial.disable"}
+
----------------
can you also include checks for the generated IR, ensuring that the whole metadata chain is correct (!llvm.loop attached to the right unswitched loop and contains the disable metadata? Also, can this just be part of `llvm/test/Transforms/SimpleLoopUnswitch/partial-unswitch.ll`? I think we can just extend the checks there, rather than adding a new file + function.


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

https://reviews.llvm.org/D99354



More information about the llvm-commits mailing list