Remap values in PromotedFloats

Summary: When a node is about to be erased from ReplacedValues, we should also remap its corresponding values in PromotedFloats.

Patch by Yan Luo (Yan.Luo2@synopsys.com)

Reviewers: pirama

Reviewed By: pirama

Subscribers: lebedev.ri, llvm-commits

Differential Revision: https://reviews.llvm.org/D44872

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328644 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Pirama Arumuga Nainar 2018-03-27 17:42:36 +00:00
parent 22c5f7cb54
commit 104b129474

View File

@ -598,6 +598,12 @@ void DAGTypeLegalizer::ExpungeNode(SDNode *N) {
RemapValue(I->second);
}
for (DenseMap<SDValue, SDValue>::iterator I = PromotedFloats.begin(),
E = PromotedFloats.end(); I != E; ++I) {
assert(I->first.getNode() != N);
RemapValue(I->second);
}
for (DenseMap<SDValue, SDValue>::iterator I = SoftenedFloats.begin(),
E = SoftenedFloats.end(); I != E; ++I) {
assert(I->first.getNode() != N);