[llvm-branch-commits] [llvm] [MSAN] handle AVX vpermi2var (PR #143463)

Thurston Dang via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jun 12 14:37:22 PDT 2025


================
@@ -4187,6 +4187,29 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
     setShadow(&I, IRB.CreateBitCast(CI, getShadowTy(&I)));
     setOriginForNaryOp(I);
   }
+  // Instrument AVX permutation intrinsic.
+  // We apply the same permutation (argument index 1) to the shadows.
+  void handleAVXVpermil2var(IntrinsicInst &I) {
+    assert(I.arg_size() == 3);
+    assert(I.getArgOperand(0)->getType() == I.getArgOperand(2)->getType());
+    assert(I.getType() == I.getArgOperand(0)->getType());
----------------
thurstond wrote:

Please also check that I.getType() is a vector type, and that `I.getArgOperand(0)` has the same number of elements as `I.getArgOperand(1)`

https://github.com/llvm/llvm-project/pull/143463


More information about the llvm-branch-commits mailing list