//===-- AArch64PerfectShuffle.h - AdvSIMD Perfect Shuffle Table -----------===// // // 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 // //===----------------------------------------------------------------------===// // // This file, which was autogenerated by llvm-PerfectShuffle, contains data // for the optimal way to build a perfect shuffle using AdvSIMD instructions. // //===----------------------------------------------------------------------===// #ifndef LLVM_LIB_TARGET_AARCH64_AARCH64PERFECTSHUFFLE_H #define LLVM_LIB_TARGET_AARCH64_AARCH64PERFECTSHUFFLE_H #include "llvm/ADT/ArrayRef.h" namespace llvm { // 31 entries have cost 0 // 756 entries have cost 1 // 3690 entries have cost 2 // 2084 entries have cost 3 // This table is 6561*4 = 26244 bytes in size. static const unsigned PerfectShuffleTable[6561 + 1] = …; inline unsigned getPerfectShuffleCost(llvm::ArrayRef<int> M) { … } /// Return true for zip1 or zip2 masks of the form: /// <0, 8, 1, 9, 2, 10, 3, 11> or /// <4, 12, 5, 13, 6, 14, 7, 15> inline bool isZIPMask(ArrayRef<int> M, unsigned NumElts, unsigned &WhichResultOut) { … } /// Return true for uzp1 or uzp2 masks of the form: /// <0, 2, 4, 6, 8, 10, 12, 14> or /// <1, 3, 5, 7, 9, 11, 13, 15> inline bool isUZPMask(ArrayRef<int> M, unsigned NumElts, unsigned &WhichResultOut) { … } /// Return true for trn1 or trn2 masks of the form: /// <0, 8, 2, 10, 4, 12, 6, 14> or /// <1, 9, 3, 11, 5, 13, 7, 15> inline bool isTRNMask(ArrayRef<int> M, unsigned NumElts, unsigned &WhichResult) { … } /// isREVMask - Check if a vector shuffle corresponds to a REV /// instruction with the specified blocksize. (The order of the elements /// within each block of the vector is reversed.) inline bool isREVMask(ArrayRef<int> M, unsigned EltSize, unsigned NumElts, unsigned BlockSize) { … } } // namespace llvm #endif