- MVT::ValueType VT = OrigLoad.getValueType();
- SDVTList VTs = getVTList(VT, Base.getValueType(), MVT::Other);
- SDOperand Ops[] = { LD->getChain(), Base, Offset };
- FoldingSetNodeID ID;
- AddNodeIDNode(ID, ISD::LOAD, VTs, Ops, 3);
- ID.AddInteger(AM);
- ID.AddInteger(LD->getExtensionType());
- ID.AddInteger((unsigned int)(LD->getMemoryVT()));
- ID.AddInteger(LD->getAlignment());
- ID.AddInteger(LD->isVolatile());
- void *IP = 0;
- if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))
- return SDOperand(E, 0);
- SDNode *N = new LoadSDNode(Ops, VTs, AM,
- LD->getExtensionType(), LD->getMemoryVT(),
- LD->getSrcValue(), LD->getSrcValueOffset(),
- LD->getAlignment(), LD->isVolatile());
- CSEMap.InsertNode(N, IP);
- AllNodes.push_back(N);
- return SDOperand(N, 0);
+ return getLoad(AM, LD->getExtensionType(), OrigLoad.getValueType(),
+ LD->getChain(), Base, Offset, LD->getSrcValue(),
+ LD->getSrcValueOffset(), LD->getMemoryVT(),
+ LD->isVolatile(), LD->getAlignment());