FindModifiedNodeSlot needs to add LoadSDNode ivars to create proper SelectionDAGCSEMa...
authorEvan Cheng <evan.cheng@apple.com>
Wed, 11 Oct 2006 01:47:58 +0000 (01:47 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 11 Oct 2006 01:47:58 +0000 (01:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30866 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index 61f0a49d7a62f77b820471a1a233836ec13d62d1..895ae47f99bc0676a813fa196c54fdc3a49d928f 100644 (file)
@@ -454,6 +454,15 @@ SDNode *SelectionDAG::FindModifiedNodeSlot(SDNode *N,
   SelectionDAGCSEMap::NodeID ID;
   ID.SetOpcode(N->getOpcode());
   ID.SetValueTypes(N->getVTList());
+  if (const LoadSDNode *LD = dyn_cast<LoadSDNode>(N)) {
+    ID.AddInteger(LD->getAddressingMode());
+    ID.AddInteger(LD->getExtensionType());
+    ID.AddInteger(LD->getLoadVT());
+    ID.AddPointer(LD->getSrcValue());
+    ID.AddInteger(LD->getSrcValueOffset());
+    ID.AddInteger(LD->getAlignment());
+    ID.AddInteger(LD->isVolatile());
+  }
   ID.SetOperands(Ops, NumOps);
   return CSEMap.FindNodeOrInsertPos(ID, InsertPos);
 }