Skip to content

Commit 5c51547

Browse files
committed
comments explain WhichResultOut and OperandOrderOut
1 parent 54dc233 commit 5c51547

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

llvm/lib/Target/AArch64/AArch64PerfectShuffle.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6622,21 +6622,21 @@ inline unsigned getPerfectShuffleCost(llvm::ArrayRef<int> M) {
66226622
}
66236623

66246624
/// Return true for zip1 or zip2 masks of the form:
6625-
/// <0, 8, 1, 9, 2, 10, 3, 11> or
6626-
/// <4, 12, 5, 13, 6, 14, 7, 15> or
6627-
/// <8, 0, 9, 1, 10, 2, 11, 3> or
6628-
/// <12, 4, 13, 5, 14, 6, 15, 7>
6625+
/// <0, 8, 1, 9, 2, 10, 3, 11> (WhichResultOut = 0, OperandOrderOut = 0) or
6626+
/// <4, 12, 5, 13, 6, 14, 7, 15> (WhichResultOut = 1, OperandOrderOut = 0) or
6627+
/// <8, 0, 9, 1, 10, 2, 11, 3> (WhichResultOut = 0, OperandOrderOut = 1) or
6628+
/// <12, 4, 13, 5, 14, 6, 15, 7> (WhichResultOut = 1, OperandOrderOut = 1)
66296629
inline bool isZIPMask(ArrayRef<int> M, unsigned NumElts,
66306630
unsigned &WhichResultOut, unsigned &OperandOrderOut) {
66316631
if (NumElts % 2 != 0)
66326632
return false;
66336633

66346634
// "Variant" refers to the distinction bwetween zip1 and zip2, while
66356635
// "Order" refers to sequence of input registers (matching vs flipped).
6636-
bool Variant0Order0 = true;
6637-
bool Variant1Order0 = true;
6638-
bool Variant0Order1 = true;
6639-
bool Variant1Order1 = true;
6636+
bool Variant0Order0 = true; // WhichResultOut = 0, OperandOrderOut = 0
6637+
bool Variant1Order0 = true; // WhichResultOut = 1, OperandOrderOut = 0
6638+
bool Variant0Order1 = true; // WhichResultOut = 0, OperandOrderOut = 1
6639+
bool Variant1Order1 = true; // WhichResultOut = 1, OperandOrderOut = 1
66406640
// Check all elements match.
66416641
for (unsigned i = 0; i != NumElts; i += 2) {
66426642
if (M[i] >= 0) {

0 commit comments

Comments
 (0)