[PATCH] D149281: Not disable loop unroll for vectorized loops on AMDGPU target

Alexander via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 23 05:00:59 PDT 2023


alex-t added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/vectorize-unroll-metadata.ll:15
+; CHECK: !2 = distinct !{!2, !3, !1}
+; CHECK: !3 = !{!"llvm.loop.unroll.runtime.disable"}
+
----------------
rampitec wrote:
> I'd expect the test to show no unroll disable metadata?
> I'd expect the test to show no unroll disable metadata?

This checks that the epilogue loop unroll is still disabled as it was before. As I remember you insisted on keeping this behavior.

"Original code had CanonicalIVStartValue check. So to restore it this should look: if (CanonicalIVStartValue || !UP.unrollLoopEpilogues)"

So we check not the absence/presence of metadata but their structure. We also check that "!0" (w/o unroll disable) is set on the middle block (main loop vectorized) but "!2" (with unroll disable) is set on the scalar epilogue loop.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149281



More information about the llvm-commits mailing list