Skip to content

Commit

Permalink
[NVPTX] Don't rely on default arguments to SelectionDAG::getMemIntrin…
Browse files Browse the repository at this point in the history
…sicNode. NFC.

NFC followup to D33147, this explicitly sets all the arguments (instead of relying on the defaults) to SelectionDAG::getMemIntrinsicNode to help identify -verify-machineinstrs issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303047 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
RKSimon committed May 15, 2017
1 parent 5188cfa commit a7e79ee
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/Target/NVPTX/NVPTXISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1548,7 +1548,9 @@ SDValue NVPTXTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,

Chain = DAG.getMemIntrinsicNode(
Op, dl, DAG.getVTList(MVT::Other, MVT::Glue), StoreOperands,
TheStoreType, MachinePointerInfo(), EltAlign);
TheStoreType, MachinePointerInfo(), EltAlign,
/* Volatile */ false, /* ReadMem */ true,
/* WriteMem */ true, /* Size */ 0);
InFlag = Chain.getValue(1);

// Cleanup.
Expand Down Expand Up @@ -1608,7 +1610,9 @@ SDValue NVPTXTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
theVal, InFlag };
Chain = DAG.getMemIntrinsicNode(NVPTXISD::StoreParam, dl, CopyParamVTs,
CopyParamOps, elemtype,
MachinePointerInfo());
MachinePointerInfo(), /* Align */ 0,
/* Volatile */ false, /* ReadMem */ true,
/* WriteMem */ true, /* Size */ 0);

InFlag = Chain.getValue(1);
}
Expand Down Expand Up @@ -1794,7 +1798,8 @@ SDValue NVPTXTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
DAG.getConstant(Offsets[VecIdx], dl, MVT::i32), InFlag};
SDValue RetVal = DAG.getMemIntrinsicNode(
Op, dl, DAG.getVTList(LoadVTs), LoadOperands, TheLoadType,
MachinePointerInfo(), EltAlign);
MachinePointerInfo(), EltAlign, /* Volatile */ false,
/* ReadMem */ true, /* WriteMem */ true, /* Size */ 0);

for (unsigned j = 0; j < NumElts; ++j) {
SDValue Ret = RetVal.getValue(j);
Expand Down

0 comments on commit a7e79ee

Please sign in to comment.