diff options
| author | Tim Northover <tnorthover@apple.com> | 2016-12-06 19:02:15 +0000 |
|---|---|---|
| committer | Tim Northover <tnorthover@apple.com> | 2016-12-06 19:02:15 +0000 |
| commit | 0a683e7bfd45d97a44c31c0a82fe80672136e1e5 (patch) | |
| tree | 31b25e2f7e92a0fc782e462f798795eb94d55e31 /llvm/lib/CodeGen | |
| parent | 1577b39f5169caeba91e19064fa88a724aed46a2 (diff) | |
| download | bcm5719-llvm-0a683e7bfd45d97a44c31c0a82fe80672136e1e5.tar.gz bcm5719-llvm-0a683e7bfd45d97a44c31c0a82fe80672136e1e5.zip | |
GlobalISel: fall back gracefully when we hit unhandled legalizer default.
llvm-svn: 288840
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp index 2b99a555858..e49662075ed 100644 --- a/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp +++ b/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp @@ -93,7 +93,9 @@ LegalizerInfo::getAction(const InstrAspect &Aspect) const { if (DefaultAction != DefaultActions.end() && DefaultAction->second == Legal) return std::make_pair(Legal, Ty); - assert(DefaultAction->second == NarrowScalar && "unexpected default"); + if (DefaultAction == DefaultActions.end() || + DefaultAction->second != NarrowScalar) + return std::make_pair(Unsupported, LLT()); return findLegalAction(Aspect, NarrowScalar); } |

