Skip to content

Commit 4d0feb2

Browse files
committed
[SelectionDAG] Use the memory VT instead of result VT for FoldingSet profiling in getMaskedLoad/getMaskedStore.
This matches what is done by the Profile function. Otherwise CSE won't work properly. llvm-svn: 364717
1 parent 6293cd0 commit 4d0feb2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6965,7 +6965,7 @@ SDValue SelectionDAG::getMaskedLoad(EVT VT, const SDLoc &dl, SDValue Chain,
69656965
SDValue Ops[] = { Chain, Ptr, Mask, PassThru };
69666966
FoldingSetNodeID ID;
69676967
AddNodeIDNode(ID, ISD::MLOAD, VTs, Ops);
6968-
ID.AddInteger(VT.getRawBits());
6968+
ID.AddInteger(MemVT.getRawBits());
69696969
ID.AddInteger(getSyntheticNodeSubclassData<MaskedLoadSDNode>(
69706970
dl.getIROrder(), VTs, ExtTy, isExpanding, MemVT, MMO));
69716971
ID.AddInteger(MMO->getPointerInfo().getAddrSpace());
@@ -6991,12 +6991,11 @@ SDValue SelectionDAG::getMaskedStore(SDValue Chain, const SDLoc &dl,
69916991
bool IsTruncating, bool IsCompressing) {
69926992
assert(Chain.getValueType() == MVT::Other &&
69936993
"Invalid chain type");
6994-
EVT VT = Val.getValueType();
69956994
SDVTList VTs = getVTList(MVT::Other);
69966995
SDValue Ops[] = { Chain, Val, Ptr, Mask };
69976996
FoldingSetNodeID ID;
69986997
AddNodeIDNode(ID, ISD::MSTORE, VTs, Ops);
6999-
ID.AddInteger(VT.getRawBits());
6998+
ID.AddInteger(MemVT.getRawBits());
70006999
ID.AddInteger(getSyntheticNodeSubclassData<MaskedStoreSDNode>(
70017000
dl.getIROrder(), VTs, IsTruncating, IsCompressing, MemVT, MMO));
70027001
ID.AddInteger(MMO->getPointerInfo().getAddrSpace());

0 commit comments

Comments
 (0)