mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
Revert "[DAG] Fix PR45049: LegalizeTypes crash"
This reverts commit 17673ae0b2cbf8d48973b673d413fb8591d8aae7.
This commit is contained in:
parent
4d91cb7030
commit
0840b74ee5
@ -178,7 +178,6 @@ void DAGTypeLegalizer::PerformExpensiveChecks() {
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
// Checked that NewNodes are only used by other NewNodes.
|
||||
for (unsigned i = 0, e = NewNodes.size(); i != e; ++i) {
|
||||
SDNode *N = NewNodes[i];
|
||||
@ -186,11 +185,6 @@ void DAGTypeLegalizer::PerformExpensiveChecks() {
|
||||
UI != UE; ++UI)
|
||||
assert(UI->getNodeId() == NewNode && "NewNode used by non-NewNode!");
|
||||
}
|
||||
|
||||
// Check that all of the replacements still exist.
|
||||
for (auto const &I : ReplacedValues)
|
||||
assert(IdToValueMap.count(I.second) && "remapped value missing");
|
||||
#endif
|
||||
}
|
||||
|
||||
/// This is the main entry point for the type legalizer. This does a top-down
|
||||
|
@ -159,9 +159,7 @@ private:
|
||||
const SDValue &getSDValue(TableId &Id) {
|
||||
RemapId(Id);
|
||||
assert(Id && "TableId should be non-zero");
|
||||
auto I = IdToValueMap.find(Id);
|
||||
assert(I != IdToValueMap.end() && "cannot find Id in map");
|
||||
return I->second;
|
||||
return IdToValueMap[Id];
|
||||
}
|
||||
|
||||
public:
|
||||
@ -178,30 +176,25 @@ public:
|
||||
bool run();
|
||||
|
||||
void NoteDeletion(SDNode *Old, SDNode *New) {
|
||||
assert(Old != New && "node replaced with self");
|
||||
for (unsigned i = 0, e = Old->getNumValues(); i != e; ++i) {
|
||||
TableId NewId = getTableId(SDValue(New, i));
|
||||
TableId OldId = getTableId(SDValue(Old, i));
|
||||
|
||||
if (OldId != NewId) {
|
||||
if (OldId != NewId)
|
||||
ReplacedValues[OldId] = NewId;
|
||||
|
||||
// Delete Node from tables. We cannot do this when OldId == NewId,
|
||||
// because NewId can still have table references to it in
|
||||
// ReplacedValues.
|
||||
IdToValueMap.erase(OldId);
|
||||
PromotedIntegers.erase(OldId);
|
||||
ExpandedIntegers.erase(OldId);
|
||||
SoftenedFloats.erase(OldId);
|
||||
PromotedFloats.erase(OldId);
|
||||
SoftPromotedHalfs.erase(OldId);
|
||||
ExpandedFloats.erase(OldId);
|
||||
ScalarizedVectors.erase(OldId);
|
||||
SplitVectors.erase(OldId);
|
||||
WidenedVectors.erase(OldId);
|
||||
}
|
||||
|
||||
// Delete Node from tables.
|
||||
ValueToIdMap.erase(SDValue(Old, i));
|
||||
IdToValueMap.erase(OldId);
|
||||
PromotedIntegers.erase(OldId);
|
||||
ExpandedIntegers.erase(OldId);
|
||||
SoftenedFloats.erase(OldId);
|
||||
PromotedFloats.erase(OldId);
|
||||
SoftPromotedHalfs.erase(OldId);
|
||||
ExpandedFloats.erase(OldId);
|
||||
ScalarizedVectors.erase(OldId);
|
||||
SplitVectors.erase(OldId);
|
||||
WidenedVectors.erase(OldId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,18 +14,3 @@ bb1:
|
||||
store volatile i32 %t0.i0.cast.i1, i32* @c
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @PR45049() local_unnamed_addr {
|
||||
so_basic:
|
||||
%a0 = load i1, i1* undef, align 1
|
||||
%a1 = select i1 %a0, i542 4374501449566023848745004454235242730706338861786424872851541212819905998398751846447026354046107648, i542 0 ; constant is: i542 1 << 331
|
||||
%a00 = zext i1 %a0 to i542
|
||||
%a11 = shl i542 %a00, 331
|
||||
%a2 = shl i542 %a00, 330
|
||||
%a4 = or i542 %a1, %a2
|
||||
%a05 = zext i1 %a0 to i488
|
||||
%a55 = shl i488 %a05, 111
|
||||
store i542 %a4, i542* undef, align 8
|
||||
store i488 %a55, i488* undef, align 8
|
||||
ret void
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user