1 //===-- X86ShuffleDecodeConstantPool.h - X86 shuffle decode -----*-C++-*---===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // Define several functions to decode x86 specific shuffle semantics using
11 // constants from the constant pool.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_LIB_TARGET_X86_X86SHUFFLEDECODECONSTANTPOOL_H
16 #define LLVM_LIB_TARGET_X86_X86SHUFFLEDECODECONSTANTPOOL_H
18 #include "llvm/ADT/SmallVector.h"
20 //===----------------------------------------------------------------------===//
21 // Vector Mask Decoding
22 //===----------------------------------------------------------------------===//
28 /// \brief Decode a PSHUFB mask from an IR-level vector constant.
29 void DecodePSHUFBMask(const Constant *C, SmallVectorImpl<int> &ShuffleMask);
31 /// \brief Decode a VPERMILP variable mask from an IR-level vector constant.
32 void DecodeVPERMILPMask(const Constant *C, unsigned ElSize,
33 SmallVectorImpl<int> &ShuffleMask);
35 /// \brief Decode a VPERM W/D/Q/PS/PD mask from an IR-level vector constant.
36 void DecodeVPERMVMask(const Constant *C, MVT VT,
37 SmallVectorImpl<int> &ShuffleMask);
39 /// \brief Decode a VPERMT2 W/D/Q/PS/PD mask from an IR-level vector constant.
40 void DecodeVPERMV3Mask(const Constant *C, MVT VT,
41 SmallVectorImpl<int> &ShuffleMask);