2016-01-01 06:40:45 +08:00
|
|
|
//===-- X86ShuffleDecodeConstantPool.h - X86 shuffle decode -----*-C++-*---===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// Define several functions to decode x86 specific shuffle semantics using
|
|
|
|
// constants from the constant pool.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_LIB_TARGET_X86_X86SHUFFLEDECODECONSTANTPOOL_H
|
|
|
|
#define LLVM_LIB_TARGET_X86_X86SHUFFLEDECODECONSTANTPOOL_H
|
|
|
|
|
|
|
|
#include "llvm/ADT/SmallVector.h"
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Vector Mask Decoding
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class Constant;
|
|
|
|
class MVT;
|
|
|
|
|
2016-04-08 22:17:07 +08:00
|
|
|
/// Decode a PSHUFB mask from an IR-level vector constant.
|
2016-01-01 06:40:45 +08:00
|
|
|
void DecodePSHUFBMask(const Constant *C, SmallVectorImpl<int> &ShuffleMask);
|
|
|
|
|
2016-04-08 22:17:07 +08:00
|
|
|
/// Decode a VPERMILP variable mask from an IR-level vector constant.
|
2016-01-01 06:40:45 +08:00
|
|
|
void DecodeVPERMILPMask(const Constant *C, unsigned ElSize,
|
|
|
|
SmallVectorImpl<int> &ShuffleMask);
|
|
|
|
|
2016-06-05 05:44:28 +08:00
|
|
|
/// Decode a VPERMILP2 variable mask from an IR-level vector constant.
|
|
|
|
void DecodeVPERMIL2PMask(const Constant *C, unsigned MatchImm, unsigned ElSize,
|
|
|
|
SmallVectorImpl<int> &ShuffleMask);
|
|
|
|
|
2016-04-09 22:51:26 +08:00
|
|
|
/// Decode a VPPERM variable mask from an IR-level vector constant.
|
|
|
|
void DecodeVPPERMMask(const Constant *C, SmallVectorImpl<int> &ShuffleMask);
|
|
|
|
|
2016-04-08 22:17:07 +08:00
|
|
|
/// Decode a VPERM W/D/Q/PS/PD mask from an IR-level vector constant.
|
2016-01-01 06:40:45 +08:00
|
|
|
void DecodeVPERMVMask(const Constant *C, MVT VT,
|
|
|
|
SmallVectorImpl<int> &ShuffleMask);
|
|
|
|
|
2016-04-08 22:17:07 +08:00
|
|
|
/// Decode a VPERMT2 W/D/Q/PS/PD mask from an IR-level vector constant.
|
2016-10-18 12:00:32 +08:00
|
|
|
void DecodeVPERMV3Mask(const Constant *C, unsigned ElSize,
|
2016-01-01 06:40:45 +08:00
|
|
|
SmallVectorImpl<int> &ShuffleMask);
|
|
|
|
|
|
|
|
} // llvm namespace
|
|
|
|
|
|
|
|
#endif
|