Lines Matching refs:shuffle

21   // Converts a shuffle into canonical form, meaning that the first lane index
23 // swizzle. Returns canonicalized |shuffle|, |needs_swap|, and |is_swizzle|.
26 static void CanonicalizeShuffle(bool inputs_equal, uint8_t* shuffle,
29 // Tries to match an 8x16 byte shuffle to the identity shuffle, which is
30 // [0 1 ... 15]. This should be called after canonicalizing the shuffle, so
31 // the second identity shuffle, [16 17 .. 31] is converted to the first one.
32 static bool TryMatchIdentity(const uint8_t* shuffle);
34 // Tries to match a byte shuffle to a scalar splat operation. Returns the
37 static bool TryMatchSplat(const uint8_t* shuffle, int* index) {
42 lane0[0] = shuffle[0];
45 lane0[i] = shuffle[i];
51 if (lane0[j] != shuffle[i * kBytesPerLane + j]) return false;
59 // (is_swizzle). A rotation is a shuffle like [1, 2, 3, 0]. This will always
61 static bool TryMatch32x4Rotate(const uint8_t* shuffle, uint8_t* shuffle32x4,
64 // Tries to match an 8x16 byte shuffle to an equivalent 32x4 shuffle. If
65 // successful, it writes the 32x4 shuffle word indices. E.g.
67 static bool TryMatch32x4Shuffle(const uint8_t* shuffle, uint8_t* shuffle32x4);
69 // Tries to match an 8x16 byte shuffle to an equivalent 16x8 shuffle. If
70 // successful, it writes the 16x8 shuffle word indices. E.g.
72 static bool TryMatch16x8Shuffle(const uint8_t* shuffle, uint8_t* shuffle16x8);
74 // Tries to match a byte shuffle to a concatenate operation, formed by taking
77 // source vectors with offset 4. The shuffle should be canonicalized.
78 static bool TryMatchConcat(const uint8_t* shuffle, uint8_t* offset);
80 // Tries to match a byte shuffle to a blend operation, which is a shuffle
83 // shuffle should be canonicalized.
84 static bool TryMatchBlend(const uint8_t* shuffle);
86 // Packs a 4 lane shuffle into a single imm8 suitable for use by pshufd,
88 static uint8_t PackShuffle4(uint8_t* shuffle);
93 // Packs 4 bytes of shuffle into a 32 bit immediate.
94 static int32_t Pack4Lanes(const uint8_t* shuffle);
95 // Packs 16 bytes of shuffle into an array of 4 uint32_t.
96 static void Pack16Lanes(uint32_t* dst, const uint8_t* shuffle);
103 static bool AllInRangeOrTopBitSet(std::array<uint8_t, kSimd128Size> shuffle);