================
@@ -4191,6 +4191,15 @@ struct MemorySanitizerVisitor : public
InstVisitor<MemorySanitizerVisitor> {
// We apply the same permutation (argument index 1) to the shadows.
void handleAVXVpermil2var(IntrinsicInst &I) {
assert(I.arg_size() == 3);
+ assert(isa<FixedVectorType>(I.getArgOperand(0)->getType()));
+ assert(isa<FixedVectorType>(I.getArgOperand(1)->getType()));
+ assert(isa<FixedVectorType>(I.getArgOperand(2)->getType()));
+ [[maybe_unused]] auto ArgVectorSize =
+ cast<FixedVectorType>(I.getArgOperand(0)->getType())->getNumElements();
+ assert(cast<FixedVectorType>(I.getArgOperand(1)->getType())
+ ->getNumElements() == ArgVectorSize);
+ assert(cast<FixedVectorType>(I.getArgOperand(2)->getType())
+ ->getNumElements() == ArgVectorSize);
----------------
thurstond wrote:
Some of the assertions are redundant (e.g., if operand 0 is a vector, and
operand 0's type is the same as operand 2's type, then operand 2 must be a
vector with the same number of elements as operand 0), but that's fine.
https://github.com/llvm/llvm-project/pull/143463
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits