41 void AMDGPUTargetLowering::InitAMDILLowering() {
42 static const int types[] = {
61 static const
int IntTypes[] = {
68 static const
int FloatTypes[] = {
73 static const int VectorTypes[] = {
94 for (
unsigned int x = 0; x < NumTypes; ++x) {
115 for (
unsigned int x = 0; x < NumFloatTypes; ++x) {
130 for (
unsigned int x = 0; x < NumIntTypes; ++x) {
148 for (
unsigned int ii = 0; ii < NumVectorTypes; ++ii) {
170 if (STM.hasHWFP64()) {
221 const CallInst &
I,
unsigned Intrinsic)
const {
257 unsigned Depth)
const {
275 assert((KnownZero & KnownOne) == 0
276 &&
"Bits known to be one AND zero?");
277 assert((KnownZero2 & KnownOne2) == 0
278 &&
"Bits known to be one AND zero?");
280 KnownOne &= KnownOne2;
281 KnownZero &= KnownZero2;
295 DST = LowerSDIV64(Op, DAG);
297 DST = LowerSDIV32(Op, DAG);
300 DST = LowerSDIV24(Op, DAG);
312 DST = LowerSREM64(Op, DAG);
314 DST = LowerSREM32(Op, DAG);
316 DST = LowerSREM16(Op, DAG);
318 DST = LowerSREM8(Op, DAG);
334 unsigned shiftBits = srcBits - baseBits;
340 shiftBits = 32 - baseBits;
356 AMDGPUTargetLowering::genIntType(uint32_t size, uint32_t numEle)
const {
357 int iSize = (size * numEle);
358 int vEle = (iSize >> ((size == 64) ? 6 : 5));
SDValue getConstant(uint64_t Val, EVT VT, bool isTarget=false)
AMDGPU specific subclass of TargetSubtarget.
static MVT getVectorVT(MVT VT, unsigned NumElements)
const TargetMachine & getTargetMachine() const
SDValue getSelectCC(SDLoc DL, SDValue LHS, SDValue RHS, SDValue True, SDValue False, ISD::CondCode Cond)
void ComputeMaskedBits(SDValue Op, APInt &KnownZero, APInt &KnownOne, unsigned Depth=0) const
bool isVector() const
isVector - Return true if this is a vector value type.
void setJumpIsExpensive(bool isExpensive=true)
bool ShouldShrinkFPConstant(EVT VT) const
We don't want to shrink f64/f32 constants.
EVT getScalarType() const
void setOperationAction(unsigned Op, MVT VT, LegalizeAction Action)
TargetRegisterInfo interface that is implemented by all hw codegen targets.
void setSelectIsExpensive(bool isExpensive=true)
size_t array_lengthof(T(&)[N])
Find the length of an array.
Simple integer binary arithmetic operators.
SDNode * getNode() const
get the SDNode which holds the desired result
A self-contained host- and target-independent arbitrary-precision floating-point software implementat...
const SDValue & getOperand(unsigned i) const
Simple binary floating point operators.
SDValue getSExtOrTrunc(SDValue Op, SDLoc DL, EVT VT)
virtual void computeMaskedBitsForTargetNode(const SDValue Op, APInt &KnownZero, APInt &KnownOne, const SelectionDAG &DAG, unsigned Depth=0) const
Determine which of the bits specified in Mask are known to be either zero or one and return them in t...
unsigned getBitWidth() const
Return the number of bits in the APInt.
unsigned getOpcode() const
for(unsigned i=0, e=MI->getNumOperands();i!=e;++i)
unsigned MaxStoresPerMemmove
Specify maximum bytes of store instructions per memmove call.
X = FP_EXTEND(Y) - Extend a smaller FP type into a larger FP type.
Interface definition of the TargetLowering class that is common to all AMD GPUs.
Byte Swap and Counting operators.
virtual bool getTgtMemIntrinsic(IntrinsicInfo &Info, const CallInst &I, unsigned Intrinsic) const
Class for arbitrary precision integers.
ZERO_EXTEND - Used for integer types, zeroing the new bits.
SDValue getNode(unsigned Opcode, SDLoc DL, EVT VT)
ANY_EXTEND - Used for integer types. The high bits are undefined.
unsigned getSizeInBits() const
getSizeInBits - Return the size of the specified value type in bits.
unsigned MaxStoresPerMemcpy
Specify maximum bytes of store instructions per memcpy call.
void setSchedulingPreference(Sched::Preference Pref)
Specify the target scheduling preference.
Interface for the AMDGPU Implementation of the Intrinsic Info class.
unsigned MaxStoresPerMemset
Specify maximum number of store instructions per memset call.
bool isFPImmLegal(const APFloat &Imm, EVT VT) const
We want to mark f32/f64 floating point values as legal.
SDValue getSetCC(SDLoc DL, EVT VT, SDValue LHS, SDValue RHS, ISD::CondCode Cond)
void setPow2DivIsCheap(bool isCheap=true)
TRUNCATE - Completely drop the high bits.
unsigned getVectorNumElements() const