diff options
| -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 |

