@@ -5373,7 +5373,7 @@ SmallVector<SDValue, 8> SelectionDAGBuilder::getTargetIntrinsicOperands(
53735373    Value *Token = Bundle->Inputs[0].get();
53745374    SDValue ConvControlToken = getValue(Token);
53755375    assert(Ops.back().getValueType() != MVT::Glue &&
5376-            "Did not expected  another glue node here.");
5376+            "Did not expect  another glue node here.");
53775377    ConvControlToken =
53785378        DAG.getNode(ISD::CONVERGENCECTRL_GLUE, {}, MVT::Glue, ConvControlToken);
53795379    Ops.push_back(ConvControlToken);
@@ -5395,20 +5395,18 @@ SDVTList SelectionDAGBuilder::getTargetIntrinsicVTList(const CallBase &I,
53955395  return DAG.getVTList(ValueVTs);
53965396}
53975397
5398- /// Get an INTRINSIC node for a target intrinsic which does not touch touch
5399- /// memory.
5400- SDValue SelectionDAGBuilder::getTargetNonMemIntrinsicNode(const CallBase &I,
5401-                                                           bool HasChain,
5402-                                                           ArrayRef<SDValue> Ops,
5403-                                                           SDVTList &VTs) {
5398+ /// Get an INTRINSIC node for a target intrinsic which does not touch memory.
5399+ SDValue SelectionDAGBuilder::getTargetNonMemIntrinsicNode(
5400+     const Type &IntrinsicVT, bool HasChain, ArrayRef<SDValue> Ops,
5401+     const SDVTList &VTs) {
54045402  if (!HasChain)
54055403    return DAG.getNode(ISD::INTRINSIC_WO_CHAIN, getCurSDLoc(), VTs, Ops);
5406-   if (!I.getType()-> isVoidTy())
5404+   if (!IntrinsicVT. isVoidTy())
54075405    return DAG.getNode(ISD::INTRINSIC_W_CHAIN, getCurSDLoc(), VTs, Ops);
54085406  return DAG.getNode(ISD::INTRINSIC_VOID, getCurSDLoc(), VTs, Ops);
54095407}
54105408
5411- /// Set root, convert return type if necessaey  and check alignment.
5409+ /// Set root, convert return type if necessary  and check alignment.
54125410SDValue SelectionDAGBuilder::handleTargetIntrinsicRet(const CallBase &I,
54135411                                                      bool HasChain,
54145412                                                      bool OnlyLoad,
@@ -5485,7 +5483,7 @@ void SelectionDAGBuilder::visitTargetIntrinsic(const CallInst &I,
54855483    Result =
54865484        DAG.getMemIntrinsicNode(Info.opc, getCurSDLoc(), VTs, Ops, MemVT, MMO);
54875485  } else {
5488-     Result = getTargetNonMemIntrinsicNode(I , HasChain, Ops, VTs);
5486+     Result = getTargetNonMemIntrinsicNode(*I.getType() , HasChain, Ops, VTs);
54895487  }
54905488
54915489  Result = handleTargetIntrinsicRet(I, HasChain, OnlyLoad, Result);
0 commit comments