[PATCH] D148841: [LV] Use SCEV for uniformity analysis across VF

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 07:48:53 PDT 2023


reames added a comment.

Thinking about this a bit, can't the form check be performed in terms of the original IV?  Instead of computing the adjusted IV with the scaled index and an offset, can't we simply reason in terms of the relevant iterations of the original IV?  I think this simply reduces to asking whether OrigIV mod VF is a loop invariant value and the high bits (OrigIV div VF) are fixed between iterations 0 and VF.

Saying that, I the later clause is slightly trickier than 0 and VF.  It's any OrigIV mod VF == 0, and it's correspond OrigIV + VF -1.  (Which is complicated subtraction expression involving the mod.)  Unless maybe it's solving this part which leads to the current solution?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148841



More information about the llvm-commits mailing list