X86ShuffleDecodeConstantPool.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #ifndef LLVM_LIB_TARGET_X86_X86SHUFFLEDECODECONSTANTPOOL_H
  14. #define LLVM_LIB_TARGET_X86_X86SHUFFLEDECODECONSTANTPOOL_H
  15. //===----------------------------------------------------------------------===//
  16. // Vector Mask Decoding
  17. //===----------------------------------------------------------------------===//
  18. namespace llvm {
  19. class Constant;
  20. template <typename T> class SmallVectorImpl;
  21. /// Decode a PSHUFB mask from an IR-level vector constant.
  22. void DecodePSHUFBMask(const Constant *C, unsigned Width,
  23. SmallVectorImpl<int> &ShuffleMask);
  24. /// Decode a VPERMILP variable mask from an IR-level vector constant.
  25. void DecodeVPERMILPMask(const Constant *C, unsigned ElSize, unsigned Width,
  26. SmallVectorImpl<int> &ShuffleMask);
  27. /// Decode a VPERMILP2 variable mask from an IR-level vector constant.
  28. void DecodeVPERMIL2PMask(const Constant *C, unsigned M2Z, unsigned ElSize,
  29. unsigned Width, SmallVectorImpl<int> &ShuffleMask);
  30. /// Decode a VPPERM variable mask from an IR-level vector constant.
  31. void DecodeVPPERMMask(const Constant *C, unsigned Width,
  32. SmallVectorImpl<int> &ShuffleMask);
  33. } // llvm namespace
  34. #endif