2016-01-01 06:40:45 +08:00
|
|
|
//===-- X86ShuffleDecodeConstantPool.h - X86 shuffle decode -----*-C++-*---===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2016-01-01 06:40:45 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// 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
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Vector Mask Decoding
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class Constant;
|
2020-03-02 22:59:06 +08:00
|
|
|
template <typename T> class SmallVectorImpl;
|
2016-01-01 06:40:45 +08:00
|
|
|
|
2016-04-08 22:17:07 +08:00
|
|
|
/// Decode a PSHUFB mask from an IR-level vector constant.
|
2018-10-23 06:14:05 +08:00
|
|
|
void DecodePSHUFBMask(const Constant *C, unsigned Width,
|
|
|
|
SmallVectorImpl<int> &ShuffleMask);
|
2016-01-01 06:40:45 +08:00
|
|
|
|
2016-04-08 22:17:07 +08:00
|
|
|
/// Decode a VPERMILP variable mask from an IR-level vector constant.
|
2018-10-23 06:14:05 +08:00
|
|
|
void DecodeVPERMILPMask(const Constant *C, unsigned ElSize, unsigned Width,
|
2016-01-01 06:40:45 +08:00
|
|
|
SmallVectorImpl<int> &ShuffleMask);
|
|
|
|
|
2016-06-05 05:44:28 +08:00
|
|
|
/// Decode a VPERMILP2 variable mask from an IR-level vector constant.
|
2020-03-02 22:59:06 +08:00
|
|
|
void DecodeVPERMIL2PMask(const Constant *C, unsigned M2Z, unsigned ElSize,
|
|
|
|
unsigned Width, SmallVectorImpl<int> &ShuffleMask);
|
2016-06-05 05:44:28 +08:00
|
|
|
|
2016-04-09 22:51:26 +08:00
|
|
|
/// Decode a VPPERM variable mask from an IR-level vector constant.
|
2018-10-23 06:14:05 +08:00
|
|
|
void DecodeVPPERMMask(const Constant *C, unsigned Width,
|
|
|
|
SmallVectorImpl<int> &ShuffleMask);
|
2016-04-09 22:51:26 +08:00
|
|
|
|
2016-01-01 06:40:45 +08:00
|
|
|
} // llvm namespace
|
|
|
|
|
|
|
|
#endif
|