14#ifndef LLVM_LIB_TARGET_AARCH64_AARCH64PERFECTSHUFFLE_H
15#define LLVM_LIB_TARGET_AARCH64_AARCH64PERFECTSHUFFLE_H
6592 assert(M.size() == 4 &&
"Expected a 4 entry perfect shuffle");
6596 return E.value() < 0 ||
E.value() == (
int)
E.index();
6600 return E.value() < 0 ||
E.value() == (
int)
E.index() + 4;
6606 unsigned PFIndexes[4];
6607 for (
unsigned i = 0; i != 4; ++i) {
6608 assert(M[i] < 8 &&
"Expected a maximum entry of 8 for shuffle mask");
6612 PFIndexes[i] = M[i];
6616 unsigned PFTableIndex = PFIndexes[0] * 9 * 9 * 9 + PFIndexes[1] * 9 * 9 +
6617 PFIndexes[2] * 9 + PFIndexes[3];
6620 return (PFEntry >> 30) + 1;
6625 if (NumElts % 2 != 0)
6627 WhichResult = (M[0] == 0 ? 0 : 1);
6628 unsigned Idx = WhichResult * NumElts / 2;
6629 for (
unsigned i = 0; i != NumElts; i += 2) {
6630 if ((M[i] >= 0 && (
unsigned)M[i] !=
Idx) ||
6631 (M[i + 1] >= 0 && (
unsigned)M[i + 1] !=
Idx + NumElts))
6641 WhichResult = (M[0] == 0 ? 0 : 1);
6642 for (
unsigned i = 0; i != NumElts; ++i) {
6645 if ((
unsigned)M[i] != 2 * i + WhichResult)
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
This is an optimization pass for GlobalISel generic memory operations.
bool all_of(R &&range, UnaryPredicate P)
Provide wrappers to std::all_of which take ranges instead of having to pass begin/end explicitly.
bool isUZPMask(ArrayRef< int > M, EVT VT, unsigned &WhichResult)
auto enumerate(FirstRange &&First, RestRanges &&...Rest)
Given two or more input ranges, returns a new range whose values are are tuples (A,...
static unsigned getPerfectShuffleCost(llvm::ArrayRef< int > M)
bool isZIPMask(ArrayRef< int > M, EVT VT, unsigned &WhichResult)
static const unsigned PerfectShuffleTable[6561+1]
unsigned getVectorNumElements() const
Given a vector type, return the number of elements it contains.