[PATCH] D71687: Fix full loop unrolling initialization in new pass manager

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 5 21:33:44 PDT 2020


chandlerc added a comment.

Wooot about finally having a test case! (Sorry for nit picking it a bit ....)



================
Comment at: llvm/test/Transforms/LoopUnroll/FullUnroll.ll:4-6
+; We don't end up deleting the loop, but we remove everything inside of it so checking for any
+; reasonable instruction from the original loop will work.
+; CHECK-NOT: br i1
----------------
Make sure it is in the correct function at least, and maybe after the label for the loop header?


================
Comment at: llvm/test/Transforms/LoopUnroll/FullUnroll.ll:12-17
+; Function Attrs: noinline optnone uwtable
+define dso_local void @_Z3Runv() #0 {
+entry:
+  call void @_Z6Helperv()
+  ret void
+}
----------------
Are both functions needed?


================
Comment at: llvm/test/Transforms/LoopUnroll/FullUnroll.ll:19-20
+
+; Function Attrs: noinline nounwind optnone uwtable
+define linkonce_odr dso_local void @_Z6Helperv() #1 comdat {
+entry:
----------------
Nit, but minimize and clean this function up a touch?

At the least, removing all the target features seems valuable, and I'd give things stable names instead of numbered values.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71687





More information about the llvm-commits mailing list