Questions about DAG.getMemIntrinsicNode

I encounter a problem with DAG.getMemIntrinsicNode;
when I use DAG.getNode, it would give me the SDNode if there already has identical one instead of create a new one;
but when I use DAG.getMemIntrinsicNode, it alway create a new SDNode no matter if there has a identical one in the DAG tree;
after debug the code, I find the reason is the ID key computation is not the same when insert to map and when query from the map;

SDValue SelectionDAG::getMemIntrinsicNode(unsigned Opcode, const SDLoc &dl,
                                          SDVTList VTList,
                                          ArrayRef<SDValue> Ops, EVT MemVT,
                                          MachineMemOperand *MMO) {
  MemIntrinsicSDNode *N;
  if (VTList.VTs[VTList.NumVTs-1] != MVT::Glue) {
    FoldingSetNodeID ID;
    AddNodeIDNode(ID, Opcode, VTList, Ops);
	  Here is the problem, it added a subclassData into the ID,
	  But when the node insert to the map, it did not add the subclassData into the ID;
        Opcode, dl.getIROrder(), VTList, MemVT, MMO));
    void *IP = nullptr;
    if (SDNode *E = FindNodeOrInsertPos(ID, dl, IP)) {
      return SDValue(E, 0);

    N = newSDNode<MemIntrinsicSDNode>(Opcode, dl.getIROrder(), dl.getDebugLoc(),
                                      VTList, MemVT, MMO);
    createOperands(N, Ops);

  CSEMap.InsertNode(N, IP);
static void AddNodeIDCustom(FoldingSetNodeID &ID, const SDNode *N) {
  switch (N->getOpcode()) {
  case ISD::LOAD: {
    const LoadSDNode *LD = cast<LoadSDNode>(N);
	  For the LOAD, it would be add the SubclassData into the FoldingSetNodeID;
  } // end switch (N->getOpcode())

  // Target specific memory nodes could also have address spaces to check.
  if (N->isTargetMemoryOpcode()) {
    const MemSDNode *MN = cast<MemSDNode>(N);
	  Here is the ID creator when insert the Node into the CSEMap;
	  For the MemSDNode created by getMemIntrinsicNode, it did not add the SubclassData into the ID;
	  If I add the codes below, it would reuse the same MemSDNode

MemIntrinsicNodes are supposed to have potential side effects and thus depend on ordering, so should not auto-CSE

I guess if this happens for load/store, it should also be possible for mem intrinsic nodes