brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 77236f6 Raw
44 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8//9// Define several functions to decode x86 specific shuffle semantics using10// constants from the constant pool.11//12//===----------------------------------------------------------------------===//13 14#ifndef LLVM_LIB_TARGET_X86_X86SHUFFLEDECODECONSTANTPOOL_H15#define LLVM_LIB_TARGET_X86_X86SHUFFLEDECODECONSTANTPOOL_H16 17//===----------------------------------------------------------------------===//18//  Vector Mask Decoding19//===----------------------------------------------------------------------===//20 21namespace llvm {22class Constant;23template <typename T> class SmallVectorImpl;24 25/// Decode a PSHUFB mask from an IR-level vector constant.26void DecodePSHUFBMask(const Constant *C, unsigned Width,27                      SmallVectorImpl<int> &ShuffleMask);28 29/// Decode a VPERMILP variable mask from an IR-level vector constant.30void 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.34void 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.38void DecodeVPPERMMask(const Constant *C, unsigned Width,39                      SmallVectorImpl<int> &ShuffleMask);40 41} // llvm namespace42 43#endif44