[llvm-branch-commits] [msan] Implement shadow propagation for _mm_dp_pd, _mm_dp_ps, _mm256_dp_ps (PR #94875)
Florian Mayer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Jun 10 12:00:02 PDT 2024
================
@@ -3287,6 +3287,76 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
setOriginForNaryOp(I);
}
+ // Convert `Mask` into `<n x i1>`.
+ Constant *createDppMask(unsigned Width, unsigned Mask) {
+ SmallVector<Constant *, 4> R;
+ R.assign(Width, ConstantInt::getFalse(F.getContext()));
+ for (auto &M : R) {
+ if (Mask & 1)
+ M = ConstantInt::getTrue(F.getContext());
+ Mask >>= 1;
+ }
+ return ConstantVector::get(R);
+ }
+
+ // Calculate output shadow as array of booleans `<n x i1>`, assuming if any
+ // arg is poisoned, entire dot product is poisoned.
+ Value *makeDppShadowI1(IRBuilder<> &IRB, Value *S, unsigned SrcMask,
----------------
fmayer wrote:
What does `I1` stand for?
https://github.com/llvm/llvm-project/pull/94875
More information about the llvm-branch-commits
mailing list