[PATCH] D136470: Allow scalable vectors in computeKnownBits

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 29 04:10:26 PDT 2022


paulwalker-arm accepted this revision.
paulwalker-arm added a subscriber: dmgreen.
paulwalker-arm added a comment.

Thanks for waiting @reames, I cannot say I'm truly in love with the approach but it is the best proposal so far and least likely to bit us later.  One of my unfounded reservations of previous proposals was when transition between fixed length and scalable vectors. With this approach ensuring there's only ever one representation for all scalable vectors it should at least be easier to spot invalid code paths.

One day I see value in having a more powerful representation.  My current thinking is to have an extra bit whereby:

  0 -> duplicates the state of the final known lane across all unknown lanes [ACBDDDDDDDDDDDDD]
  1 -> duplicates all known lanes across across all unknown lanes in "known lanes" sized blocks. [ABCDABCDABCDABCD]

Having such a representation we can model scalar and subvector inserts/extracts as well as help with cases where the even an odd lanes are constructed via predicated logic.

I've not bug down on this so much though and as you say the important thing is getting some level of support and splat handling is likely to give us some nice early wins. It'll also make @dmgreen's day, which is a bonus.

Again, thanks for allowing me pondering time :)


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

https://reviews.llvm.org/D136470



More information about the llvm-commits mailing list