const AAMDNodes &AAInfo = AAMDNodes(),
const MDNode *Ranges = nullptr);
/// FIXME: Remove once transition to Align is over.
+ LLVM_DEPRECATED("Use the getLoad function that takes a MaybeAlign instead",
+ "")
inline SDValue
getLoad(EVT VT, const SDLoc &dl, SDValue Chain, SDValue Ptr,
MachinePointerInfo PtrInfo, unsigned Alignment,
const unsigned EnvPtrOffset = Subtarget.descriptorEnvironmentPointerOffset();
const MVT RegVT = Subtarget.isPPC64() ? MVT::i64 : MVT::i32;
- const unsigned Alignment = Subtarget.isPPC64() ? 8 : 4;
+ const Align Alignment = Subtarget.isPPC64() ? Align(8) : Align(4);
// One load for the functions entry point address.
SDValue LoadFuncPtr = DAG.getLoad(RegVT, dl, LDChain, Callee, MPI,
// We can't count on greater alignment than the word size.
return DAG.getLoad(
VT, DL, InChain, VAList, MachinePointerInfo(),
- std::min(PtrVT.getFixedSizeInBits(), VT.getFixedSizeInBits()) / 8);
+ Align(std::min(PtrVT.getFixedSizeInBits(), VT.getFixedSizeInBits()) / 8));
}
static SDValue LowerDYNAMIC_STACKALLOC(SDValue Op, SelectionDAG &DAG,
SDLoc DL(Op);
LoadSDNode *LdNode = dyn_cast<LoadSDNode>(Op.getNode());
assert(LdNode && LdNode->getOffset().isUndef() && "Unexpected node type");
- unsigned Alignment = LdNode->getAlign().value();
+ Align Alignment = LdNode->getAlign();
if (Alignment > 8)
- Alignment = 8;
+ Alignment = Align(8);
SDValue Lo64 =
DAG.getLoad(MVT::f64, DL, LdNode->getChain(), LdNode->getBasePtr(),
assert(LdNode && LdNode->getOffset().isUndef() && "Unexpected node type");
SDValue BasePtr = LdNode->getBasePtr();
- unsigned Alignment = LdNode->getAlign().value();
+ Align Alignment = LdNode->getAlign();
if (Alignment > 8)
- Alignment = 8;
+ Alignment = Align(8);
EVT AddrVT = BasePtr.getValueType();
EVT MemVT = LdNode->getMemoryVT();
// Load the actual argument out of the pointer VAList.
// We can't count on greater alignment than the word size.
- return DAG.getLoad(VT, DL, InChain, VAList, MachinePointerInfo(),
- std::min(PtrVT.getSizeInBits(), VT.getSizeInBits()) / 8);
+ return DAG.getLoad(
+ VT, DL, InChain, VAList, MachinePointerInfo(),
+ Align(std::min(PtrVT.getSizeInBits(), VT.getSizeInBits()) / 8));
}
SDValue VETargetLowering::lowerDYNAMIC_STACKALLOC(SDValue Op,