mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-18 00:38:31 +00:00
GlobalISel: Fix handling of vectors of pointers in clamp{Min,Max}NumElements
This avoids hitting the assert added in r352636 in a future commit. llvm-svn: 352777
This commit is contained in:
parent
9f4563bbd2
commit
4b94d2597d
@ -712,7 +712,7 @@ public:
|
||||
[=](const LegalityQuery &Query) {
|
||||
LLT VecTy = Query.Types[TypeIdx];
|
||||
return std::make_pair(
|
||||
TypeIdx, LLT::vector(MinElements, VecTy.getScalarSizeInBits()));
|
||||
TypeIdx, LLT::vector(MinElements, VecTy.getElementType()));
|
||||
});
|
||||
}
|
||||
/// Limit the number of elements in EltTy vectors to at most MaxElements.
|
||||
@ -729,10 +729,8 @@ public:
|
||||
},
|
||||
[=](const LegalityQuery &Query) {
|
||||
LLT VecTy = Query.Types[TypeIdx];
|
||||
if (MaxElements == 1)
|
||||
return std::make_pair(TypeIdx, VecTy.getElementType());
|
||||
return std::make_pair(
|
||||
TypeIdx, LLT::vector(MaxElements, VecTy.getScalarSizeInBits()));
|
||||
LLT NewTy = LLT::scalarOrVector(MaxElements, VecTy.getElementType());
|
||||
return std::make_pair(TypeIdx, NewTy);
|
||||
});
|
||||
}
|
||||
/// Limit the number of elements for the given vectors to at least MinTy's
|
||||
|
Loading…
x
Reference in New Issue
Block a user