Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 4,291 Lines • ▼ Show 20 Lines | void SelectionDAGBuilder::visitMaskedScatter(const CallInst &I) { | ||||
MachineMemOperand *MMO = DAG.getMachineFunction().getMachineMemOperand( | MachineMemOperand *MMO = DAG.getMachineFunction().getMachineMemOperand( | ||||
MachinePointerInfo(AS), MachineMemOperand::MOStore, | MachinePointerInfo(AS), MachineMemOperand::MOStore, | ||||
// TODO: Make MachineMemOperands aware of scalable | // TODO: Make MachineMemOperands aware of scalable | ||||
// vectors. | // vectors. | ||||
MemoryLocation::UnknownSize, Alignment, AAInfo); | MemoryLocation::UnknownSize, Alignment, AAInfo); | ||||
if (!UniformBase) { | if (!UniformBase) { | ||||
Base = DAG.getConstant(0, sdl, TLI.getPointerTy(DAG.getDataLayout())); | Base = DAG.getConstant(0, sdl, TLI.getPointerTy(DAG.getDataLayout())); | ||||
Index = getValue(Ptr); | Index = getValue(Ptr); | ||||
IndexType = ISD::SIGNED_SCALED; | IndexType = ISD::SIGNED_UNSCALED; | ||||
Scale = DAG.getTargetConstant(1, sdl, TLI.getPointerTy(DAG.getDataLayout())); | Scale = DAG.getTargetConstant(1, sdl, TLI.getPointerTy(DAG.getDataLayout())); | ||||
} | } | ||||
SDValue Ops[] = { getMemoryRoot(), Src0, Mask, Base, Index, Scale }; | SDValue Ops[] = { getMemoryRoot(), Src0, Mask, Base, Index, Scale }; | ||||
SDValue Scatter = DAG.getMaskedScatter(DAG.getVTList(MVT::Other), VT, sdl, | SDValue Scatter = DAG.getMaskedScatter(DAG.getVTList(MVT::Other), VT, sdl, | ||||
Ops, MMO, IndexType); | Ops, MMO, IndexType, false); | ||||
DAG.setRoot(Scatter); | DAG.setRoot(Scatter); | ||||
setValue(&I, Scatter); | setValue(&I, Scatter); | ||||
} | } | ||||
void SelectionDAGBuilder::visitMaskedLoad(const CallInst &I, bool IsExpanding) { | void SelectionDAGBuilder::visitMaskedLoad(const CallInst &I, bool IsExpanding) { | ||||
SDLoc sdl = getCurSDLoc(); | SDLoc sdl = getCurSDLoc(); | ||||
auto getMaskedLoadOps = [&](Value *&Ptr, Value *&Mask, Value *&Src0, | auto getMaskedLoadOps = [&](Value *&Ptr, Value *&Mask, Value *&Src0, | ||||
▲ Show 20 Lines • Show All 6,357 Lines • Show Last 20 Lines |