aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Mayer <fmayer@google.com>2025-06-13 15:11:49 -0700
committerFlorian Mayer <fmayer@google.com>2025-06-13 15:11:49 -0700
commitb8071ac3c43a0a0e93cb85c800037181399d2a86 (patch)
tree82bba57f0e66937f4df7fbab3e0b5873cbb50d47
parent89d9434a0ececb9e8bef173ccece9ab7cf525c4c (diff)
downloadllvm-users/fmayer/spr/main.msan-handle-assorted-avx-permutations.zip
llvm-users/fmayer/spr/main.msan-handle-assorted-avx-permutations.tar.gz
llvm-users/fmayer/spr/main.msan-handle-assorted-avx-permutations.tar.bz2
[𝘀𝗽𝗿] changes introduced through rebaseusers/fmayer/spr/main.msan-handle-assorted-avx-permutations
Created using spr 1.3.4 [skip ci]
-rw-r--r--llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
index e2dfcaa..320ccaa 100644
--- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
@@ -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);
assert(I.getArgOperand(0)->getType() == I.getArgOperand(2)->getType());
assert(I.getType() == I.getArgOperand(0)->getType());
assert(I.getArgOperand(1)->getType()->isIntOrIntVectorTy());