Skip to content

Commit a333071

Browse files
[X86] Remove DecodeVPERMVMask and DecodeVPERMV3Mask
This patch removes the variants of DecodeVPERMVMask and DecodeVPERMV3Mask that take "const Constant *C" as they are not used anymore. They were introduced on Sep 8, 2015 in commit e88038f. The last use of DecodeVPERMVMask(const Constant *C, ...) was removed on Feb 7, 2016 in commit 73fc26b. The last use of DecodeVPERMV3Mask(const Constant *C, ...) was removed on May 28, 2018 in commit dcfcfdb. Differential Revision: https://reviews.llvm.org/D91926
1 parent c01fb64 commit a333071

File tree

2 files changed

+0
-59
lines changed

2 files changed

+0
-59
lines changed

llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -293,55 +293,4 @@ void DecodeVPPERMMask(const Constant *C, unsigned Width,
293293
}
294294
}
295295

296-
void DecodeVPERMVMask(const Constant *C, unsigned ElSize, unsigned Width,
297-
SmallVectorImpl<int> &ShuffleMask) {
298-
assert((Width == 128 || Width == 256 || Width == 512) &&
299-
C->getType()->getPrimitiveSizeInBits() >= Width &&
300-
"Unexpected vector size.");
301-
assert((ElSize == 8 || ElSize == 16 || ElSize == 32 || ElSize == 64) &&
302-
"Unexpected vector element size.");
303-
304-
// The shuffle mask requires elements the same size as the target.
305-
APInt UndefElts;
306-
SmallVector<uint64_t, 64> RawMask;
307-
if (!extractConstantMask(C, ElSize, UndefElts, RawMask))
308-
return;
309-
310-
unsigned NumElts = Width / ElSize;
311-
312-
for (unsigned i = 0; i != NumElts; ++i) {
313-
if (UndefElts[i]) {
314-
ShuffleMask.push_back(SM_SentinelUndef);
315-
continue;
316-
}
317-
int Index = RawMask[i] & (NumElts - 1);
318-
ShuffleMask.push_back(Index);
319-
}
320-
}
321-
322-
void DecodeVPERMV3Mask(const Constant *C, unsigned ElSize, unsigned Width,
323-
SmallVectorImpl<int> &ShuffleMask) {
324-
assert((Width == 128 || Width == 256 || Width == 512) &&
325-
C->getType()->getPrimitiveSizeInBits() >= Width &&
326-
"Unexpected vector size.");
327-
assert((ElSize == 8 || ElSize == 16 || ElSize == 32 || ElSize == 64) &&
328-
"Unexpected vector element size.");
329-
330-
// The shuffle mask requires elements the same size as the target.
331-
APInt UndefElts;
332-
SmallVector<uint64_t, 64> RawMask;
333-
if (!extractConstantMask(C, ElSize, UndefElts, RawMask))
334-
return;
335-
336-
unsigned NumElts = Width / ElSize;
337-
338-
for (unsigned i = 0; i != NumElts; ++i) {
339-
if (UndefElts[i]) {
340-
ShuffleMask.push_back(SM_SentinelUndef);
341-
continue;
342-
}
343-
int Index = RawMask[i] & (NumElts*2 - 1);
344-
ShuffleMask.push_back(Index);
345-
}
346-
}
347296
} // namespace llvm

llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,6 @@ void DecodeVPERMIL2PMask(const Constant *C, unsigned M2Z, unsigned ElSize,
3838
void DecodeVPPERMMask(const Constant *C, unsigned Width,
3939
SmallVectorImpl<int> &ShuffleMask);
4040

41-
/// Decode a VPERM W/D/Q/PS/PD mask from an IR-level vector constant.
42-
void DecodeVPERMVMask(const Constant *C, unsigned ElSize, unsigned Width,
43-
SmallVectorImpl<int> &ShuffleMask);
44-
45-
/// Decode a VPERMT2 W/D/Q/PS/PD mask from an IR-level vector constant.
46-
void DecodeVPERMV3Mask(const Constant *C, unsigned ElSize, unsigned Width,
47-
SmallVectorImpl<int> &ShuffleMask);
48-
4941
} // llvm namespace
5042

5143
#endif

0 commit comments

Comments
 (0)