[PATCH] D91926: [X86] Remove DecodeVPERMVMask and DecodeVPERMV3Mask
Kazu Hirata via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 3 09:12:50 PST 2020
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa333071754ba: [X86] Remove DecodeVPERMVMask and DecodeVPERMV3Mask (authored by kazu).
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.309278.patch
Type: text/x-patch
Size: 2903 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201203/7a4503ef/attachment.bin>
More information about the llvm-commits
mailing list