mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-31 20:44:18 +00:00
[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
This commit is contained in:
parent
f37c07c313
commit
4d19655a56
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user