LLVM  14.0.0git
X86ShuffleDecodeConstantPool.h
Go to the documentation of this file.
1 //===-- X86ShuffleDecodeConstantPool.h - X86 shuffle decode -----*-C++-*---===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Define several functions to decode x86 specific shuffle semantics using
10 // constants from the constant pool.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_X86_X86SHUFFLEDECODECONSTANTPOOL_H
15 #define LLVM_LIB_TARGET_X86_X86SHUFFLEDECODECONSTANTPOOL_H
16 
17 //===----------------------------------------------------------------------===//
18 // Vector Mask Decoding
19 //===----------------------------------------------------------------------===//
20 
21 namespace llvm {
22 class Constant;
23 template <typename T> class SmallVectorImpl;
24 
25 /// Decode a PSHUFB mask from an IR-level vector constant.
26 void DecodePSHUFBMask(const Constant *C, unsigned Width,
27  SmallVectorImpl<int> &ShuffleMask);
28 
29 /// Decode a VPERMILP variable mask from an IR-level vector constant.
30 void DecodeVPERMILPMask(const Constant *C, unsigned ElSize, unsigned Width,
31  SmallVectorImpl<int> &ShuffleMask);
32 
33 /// Decode a VPERMILP2 variable mask from an IR-level vector constant.
34 void DecodeVPERMIL2PMask(const Constant *C, unsigned M2Z, unsigned ElSize,
35  unsigned Width, SmallVectorImpl<int> &ShuffleMask);
36 
37 /// Decode a VPPERM variable mask from an IR-level vector constant.
38 void DecodeVPPERMMask(const Constant *C, unsigned Width,
39  SmallVectorImpl<int> &ShuffleMask);
40 
41 } // llvm namespace
42 
43 #endif
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::ISD::Constant
@ Constant
Definition: ISDOpcodes.h:76
llvm::DecodePSHUFBMask
void DecodePSHUFBMask(ArrayRef< uint64_t > RawMask, const APInt &UndefElts, SmallVectorImpl< int > &ShuffleMask)
Decode a PSHUFB mask from a raw array of constants such as from BUILD_VECTOR.
Definition: X86ShuffleDecode.cpp:292
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::DecodeVPPERMMask
void DecodeVPPERMMask(ArrayRef< uint64_t > RawMask, const APInt &UndefElts, SmallVectorImpl< int > &ShuffleMask)
Decode a VPPERM mask from a raw array of constants such as from BUILD_VECTOR.
Definition: X86ShuffleDecode.cpp:324
llvm::DecodeVPERMILPMask
void DecodeVPERMILPMask(unsigned NumElts, unsigned ScalarBits, ArrayRef< uint64_t > RawMask, const APInt &UndefElts, SmallVectorImpl< int > &ShuffleMask)
Decode a VPERMILPD/VPERMILPS variable mask from a raw array of constants.
Definition: X86ShuffleDecode.cpp:476
llvm::AMDGPU::Hwreg::Width
Width
Definition: SIDefines.h:413
llvm::DecodeVPERMIL2PMask
void DecodeVPERMIL2PMask(unsigned NumElts, unsigned ScalarBits, unsigned M2Z, ArrayRef< uint64_t > RawMask, const APInt &UndefElts, SmallVectorImpl< int > &ShuffleMask)
Decode a VPERMIL2PD/VPERMIL2PS variable mask from a raw array of constants.
Definition: X86ShuffleDecode.cpp:498