mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Add the actual constant to the hash for ConstantPool nodes. Thanks to
Rafael Espindola for pointing this out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29669 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
29a965d3c4
commit
130fc13506
@ -583,6 +583,7 @@ SDOperand SelectionDAG::getConstantPool(Constant *C, MVT::ValueType VT,
|
||||
SelectionDAGCSEMap::NodeID ID(Opc, getNodeValueTypes(VT));
|
||||
ID.AddInteger(Alignment);
|
||||
ID.AddInteger(Offset);
|
||||
ID.AddPointer(C);
|
||||
void *IP = 0;
|
||||
if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))
|
||||
return SDOperand(E, 0);
|
||||
|
@ -64,6 +64,7 @@ SelectionDAGCSEMap::NodeID::NodeID(SDNode *N) {
|
||||
case ISD::TargetConstantPool:
|
||||
AddInteger(cast<ConstantPoolSDNode>(N)->getAlignment());
|
||||
AddInteger(cast<ConstantPoolSDNode>(N)->getOffset());
|
||||
AddPointer(cast<ConstantPoolSDNode>(N)->get());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user