[PATCH] D91926: [X86] Remove DecodeVPPERMMask and DecodeVPERMV3Mask
Kazu Hirata via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 22 08:29:10 PST 2020
kazu updated this revision to Diff 306922.
kazu added a comment.
Fixed another typo in the commit message.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91926/new/
https://reviews.llvm.org/D91926
Files:
llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp
llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.h
Index: llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.h
===================================================================
--- llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.h
+++ llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.h
@@ -38,14 +38,6 @@
void DecodeVPPERMMask(const Constant *C, unsigned Width,
SmallVectorImpl<int> &ShuffleMask);
-/// Decode a VPERM W/D/Q/PS/PD mask from an IR-level vector constant.
-void DecodeVPERMVMask(const Constant *C, unsigned ElSize, unsigned Width,
- SmallVectorImpl<int> &ShuffleMask);
-
-/// Decode a VPERMT2 W/D/Q/PS/PD mask from an IR-level vector constant.
-void DecodeVPERMV3Mask(const Constant *C, unsigned ElSize, unsigned Width,
- SmallVectorImpl<int> &ShuffleMask);
-
} // llvm namespace
#endif
Index: llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp
===================================================================
--- llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp
+++ llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp
@@ -293,55 +293,4 @@
}
}
-void DecodeVPERMVMask(const Constant *C, unsigned ElSize, unsigned Width,
- SmallVectorImpl<int> &ShuffleMask) {
- assert((Width == 128 || Width == 256 || Width == 512) &&
- C->getType()->getPrimitiveSizeInBits() >= Width &&
- "Unexpected vector size.");
- assert((ElSize == 8 || ElSize == 16 || ElSize == 32 || ElSize == 64) &&
- "Unexpected vector element size.");
-
- // The shuffle mask requires elements the same size as the target.
- APInt UndefElts;
- SmallVector<uint64_t, 64> RawMask;
- if (!extractConstantMask(C, ElSize, UndefElts, RawMask))
- return;
-
- unsigned NumElts = Width / ElSize;
-
- for (unsigned i = 0; i != NumElts; ++i) {
- if (UndefElts[i]) {
- ShuffleMask.push_back(SM_SentinelUndef);
- continue;
- }
- int Index = RawMask[i] & (NumElts - 1);
- ShuffleMask.push_back(Index);
- }
-}
-
-void DecodeVPERMV3Mask(const Constant *C, unsigned ElSize, unsigned Width,
- SmallVectorImpl<int> &ShuffleMask) {
- assert((Width == 128 || Width == 256 || Width == 512) &&
- C->getType()->getPrimitiveSizeInBits() >= Width &&
- "Unexpected vector size.");
- assert((ElSize == 8 || ElSize == 16 || ElSize == 32 || ElSize == 64) &&
- "Unexpected vector element size.");
-
- // The shuffle mask requires elements the same size as the target.
- APInt UndefElts;
- SmallVector<uint64_t, 64> RawMask;
- if (!extractConstantMask(C, ElSize, UndefElts, RawMask))
- return;
-
- unsigned NumElts = Width / ElSize;
-
- for (unsigned i = 0; i != NumElts; ++i) {
- if (UndefElts[i]) {
- ShuffleMask.push_back(SM_SentinelUndef);
- continue;
- }
- int Index = RawMask[i] & (NumElts*2 - 1);
- ShuffleMask.push_back(Index);
- }
-}
} // namespace llvm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91926.306922.patch
Type: text/x-patch
Size: 2903 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201122/45aef994/attachment.bin>
More information about the llvm-commits
mailing list