24 unsigned FromTypeIdx) {
26 return std::make_pair(TypeIdx,
Query.Types[FromTypeIdx]);
33 unsigned NewSizeInBits =
35 if (NewSizeInBits < Min)
37 return std::make_pair(TypeIdx,
LLT::scalar(NewSizeInBits));
44 const LLT &VecTy =
Query.Types[TypeIdx];
46 if (NewNumElements < Min)
48 return std::make_pair(
unsigned Log2_32_Ceil(uint32_t Value)
Return the ceil log base 2 of the specified value, 32 if the value is zero.
This class represents lattice values for constants.
unsigned getScalarSizeInBits() const
LegalizeMutation widenScalarToNextPow2(unsigned TypeIdx, unsigned Min=0)
Widen the type for the given type index to the next power of 2.
The LegalityQuery object bundles together all the information that's needed to decide whether a given...
LegalizeMutation changeTo(unsigned TypeIdx, LLT Ty)
Select this specific type for the given type index.
static LLT scalar(unsigned SizeInBits)
Get a low-level scalar or aggregate "bag of bits".
std::function< std::pair< unsigned, LLT >(const LegalityQuery &)> LegalizeMutation
static void Query(const MachineInstr &MI, AliasAnalysis &AA, bool &Read, bool &Write, bool &Effects, bool &StackPointer)
LegalizeMutation moreElementsToNextPow2(unsigned TypeIdx, unsigned Min=0)
Add more elements to the type for the given type index to the next power of.
uint16_t getNumElements() const
Returns the number of elements in a vector LLT.
static LLT vector(uint16_t NumElements, unsigned ScalarSizeInBits)
Get a low-level vector of some number of elements and element width.