summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/utils/TableGen/CodeGenDAGPatterns.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
index 4de4bca75c3..8c460d84204 100644
--- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
+++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
@@ -804,20 +804,14 @@ void TypeInfer::expandOverloads(TypeSetByHwMode::SetType &Out,
}
}
-
TypeSetByHwMode TypeInfer::getLegalTypes() {
TypeSetByHwMode VTS;
TypeSetByHwMode::SetType &DS = VTS.getOrCreate(DefaultMode);
const TypeSetByHwMode &LTS = 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;
}
OpenPOWER on IntegriCloud