[PATCH] D123386: [AArch64] Add lane moves to PerfectShuffle tables
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 13 08:52:54 PDT 2022
dmgreen added a comment.
Cheers
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:9755
+ while (Elt > 0) {
+ ID /= 9;
+ Elt--;
----------------
SjoerdMeijer wrote:
> Don't know what magic number 9 is, or generally what this is doing. But yeah, looking something up in a table, so am guessing something related to the number of items per table entry. There seems to be enough prior art of magic constants, so looks fine.
Yeah - 9 is `2 * 4 + 1`. i.e each lane of a 2 input v4 shuffle, plus one for undef. It's just how the tables are encoded.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123386/new/
https://reviews.llvm.org/D123386
More information about the llvm-commits
mailing list