mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Fix selecting legal types in TypeInfer::getLegalTypes
Collect all legal types for all modes. llvm-svn: 313380
This commit is contained in:
parent
36d48161a2
commit
c3456b7968
@ -804,20 +804,14 @@ void TypeInfer::expandOverloads(TypeSetByHwMode::SetType &Out,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TypeSetByHwMode TypeInfer::getLegalTypes() {
|
||||
TypeSetByHwMode VTS;
|
||||
TypeSetByHwMode::SetType &DS = VTS.getOrCreate(DefaultMode);
|
||||
const TypeSetByHwMode <S = TP.getDAGPatterns().getLegalTypes();
|
||||
|
||||
if (!CodeGen) {
|
||||
assert(LTS.hasDefault());
|
||||
const TypeSetByHwMode::SetType &S = LTS.get(DefaultMode);
|
||||
DS.insert(S.begin(), S.end());
|
||||
} else {
|
||||
for (const auto &I : LTS)
|
||||
DS.insert(I.second.begin(), I.second.end());
|
||||
}
|
||||
// Stuff all types from all modes into the default mode.
|
||||
for (const auto &I : LTS)
|
||||
DS.insert(I.second.begin(), I.second.end());
|
||||
return VTS;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user