diff options
author | Amara Emerson <aemerson@apple.com> | 2018-02-01 23:10:57 +0000 |
---|---|---|
committer | Amara Emerson <aemerson@apple.com> | 2018-02-01 23:10:57 +0000 |
commit | 4d19655a56a72ebcf8e99e73cf083484429c8112 (patch) | |
tree | 3898511ac8b296f6edd0c48c5668fe6f5e676f3a /llvm/lib/CodeGen | |
parent | f37c07c31385a6c6831c7fd3c168e28693976a12 (diff) | |
download | bcm5719-llvm-4d19655a56a72ebcf8e99e73cf083484429c8112.tar.gz bcm5719-llvm-4d19655a56a72ebcf8e99e73cf083484429c8112.zip |
[GlobalISel][Legalizer] Relax a legalization loop detecting assert.
Legalizing vectors may keep the element type the same but change the number of
elements, the assert didn't take this into account.
llvm-svn: 324028
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 054acc1d2fe..3b8eb103297 100644 --- a/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp +++ b/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp @@ -58,7 +58,9 @@ LegalizeActionStep LegalizeRuleSet::apply(const LegalityQuery &Query) const { std::pair<unsigned, LLT> Mutation = Rule.determineMutation(Query); DEBUG(dbgs() << ".. .. " << (unsigned)Rule.getAction() << ", " << Mutation.first << ", " << Mutation.second << "\n"); - assert(Query.Types[Mutation.first] != Mutation.second && + assert((Query.Types[Mutation.first] != Mutation.second || + Rule.getAction() == MoreElements || + Rule.getAction() == FewerElements) && "Simple loop detected"); return {Rule.getAction(), Mutation.first, Mutation.second}; } else |