Home | History | Annotate | Download | only in CodeGen

Lines Matching refs:Factor

14 // DE-interleaving the data on a factor. An interleaved store writes several
15 // vectors to memory with RE-interleaving the data on a factor.
22 // E.g. An interleaved load (Factor = 2):
30 // E.g. An interleaved store (Factor = 3):
57 static unsigned MaxFactor; // The maximum supported interleave factor.
101 /// \brief Check if the mask is a DE-interleave mask of the given factor
102 /// \p Factor like:
103 /// <Index, Index+Factor, ..., Index+(NumElts-1)*Factor>
104 static bool isDeInterleaveMaskOfFactor(ArrayRef<int> Mask, unsigned Factor,
106 // Check all potential start indices from 0 to (Factor - 1).
107 for (Index = 0; Index < Factor; Index++) {
110 // Check that elements are in ascending order by Factor. Ignore undef
113 if (Mask[i] >= 0 && static_cast<unsigned>(Mask[i]) != Index + i * Factor)
125 /// E.g. DE-interleave masks (Factor = 2) could be:
128 static bool isDeInterleaveMask(ArrayRef<int> Mask, unsigned &Factor,
134 for (Factor = 2; Factor <= MaxFactor; Factor++)
135 if (isDeInterleaveMaskOfFactor(Mask, Factor, Index))
143 /// I.e. <0, NumSubElts, ... , NumSubElts*(Factor - 1), 1, NumSubElts + 1, ...>
145 /// E.g. The RE-interleave mask (Factor = 2) could be:
147 static bool isReInterleaveMask(ArrayRef<int> Mask, unsigned &Factor) {
153 for (Factor = 2; Factor <= MaxFactor; Factor++) {
154 if (NumElts % Factor)
157 unsigned NumSubElts = NumElts / Factor;
167 (i % Factor) * NumSubElts + i / Factor)
170 // Find a RE-interleaved mask of current factor.
197 unsigned Factor, Index;
200 if (!isDeInterleaveMask(Shuffles[0]->getShuffleMask(), Factor, Index))
210 // and factor as the first shufflevector.
215 if (!isDeInterleaveMaskOfFactor(Shuffles[i]->getShuffleMask(), Factor,
225 if (!TLI->lowerInterleavedLoad(LI, Shuffles, Indices, Factor))
245 unsigned Factor;
246 if (!isReInterleaveMask(SVI->getShuffleMask(), Factor))
252 if (!TLI->lowerInterleavedStore(SI, SVI, Factor))