[llvm] [msan][NFCI] Remove element-size override for VNNI intrinsics (PR #172762)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 17 15:56:36 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: Thurston Dang (thurstond)
<details>
<summary>Changes</summary>
MSan's handleVectorPmaddIntrinsic had an EltSizeInBits parameter to override the incorrect element size for VNNI intrinsics. Now that the element size has been corrected
(https://github.com/llvm/llvm-project/issues/97271), it is no longer necessary to override the element size.
This patch also updates the comments.
---
Full diff: https://github.com/llvm/llvm-project/pull/172762.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp (+50-17)
``````````diff
diff --git a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
index 32ee16c89b4fe..53e5091d35f47 100644
--- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
@@ -5807,7 +5807,39 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
// AVX Vector Neural Network Instructions: bytes
//
- // Multiply and Add Packed Signed and Unsigned Bytes
+ // Multiply and Add Signed Bytes
+ // < 4 x i32> @llvm.x86.avx2.vpdpbssd.128
+ // (< 4 x i32>, <16 x i8>, <16 x i8>)
+ // < 8 x i32> @llvm.x86.avx2.vpdpbssd.256
+ // (< 8 x i32>, <32 x i8>, <32 x i8>)
+ // <16 x i32> @llvm.x86.avx10.vpdpbssd.512
+ // (<16 x i32>, <64 x i8>, <64 x i8>)
+ //
+ // Multiply and Add Signed Bytes With Saturation
+ // < 4 x i32> @llvm.x86.avx2.vpdpbssds.128
+ // (< 4 x i32>, <16 x i8>, <16 x i8>)
+ // < 8 x i32> @llvm.x86.avx2.vpdpbssds.256
+ // (< 8 x i32>, <32 x i8>, <32 x i8>)
+ // <16 x i32> @llvm.x86.avx10.vpdpbssds.512
+ // (<16 x i32>, <64 x i8>, <64 x i8>)
+ //
+ // Multiply and Add Signed and Unsigned Bytes
+ // < 4 x i32> @llvm.x86.avx2.vpdpbsud.128
+ // (< 4 x i32>, <16 x i8>, <16 x i8>)
+ // < 8 x i32> @llvm.x86.avx2.vpdpbsud.256
+ // (< 8 x i32>, <32 x i8>, <32 x i8>)
+ // <16 x i32> @llvm.x86.avx10.vpdpbsud.512
+ // (<16 x i32>, <64 x i8>, <64 x i8>)
+ //
+ // Multiply and Add Signed and Unsigned Bytes With Saturation
+ // < 4 x i32> @llvm.x86.avx2.vpdpbsuds.128
+ // (< 4 x i32>, <16 x i8>, <16 x i8>)
+ // < 8 x i32> @llvm.x86.avx2.vpdpbsuds.256
+ // (< 8 x i32>, <32 x i8>, <32 x i8>)
+ // <16 x i32> @llvm.x86.avx512.vpdpbusds.512
+ // (<16 x i32>, <64 x i8>, <64 x i8>)
+ //
+ // Multiply and Add Unsigned and Signed Bytes
// < 4 x i32> @llvm.x86.avx512.vpdpbusd.128
// (< 4 x i32>, <16 x i8>, <16 x i8>)
// < 8 x i32> @llvm.x86.avx512.vpdpbusd.256
@@ -5820,23 +5852,24 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
// (< 4 x i32>, <16 x i8>, <16 x i8>)
// < 8 x i32> @llvm.x86.avx512.vpdpbusds.256
// (< 8 x i32>, <32 x i8>, <32 x i8>)
- // <16 x i32> @llvm.x86.avx512.vpdpbusds.512
+ // <16 x i32> @llvm.x86.avx10.vpdpbsuds.512
// (<16 x i32>, <64 x i8>, <64 x i8>)
//
- // < 4 x i32> @llvm.x86.avx2.vpdpbssd.128
- // (< 4 x i32>, < 4 x i32>, < 4 x i32>)
- // < 8 x i32> @llvm.x86.avx2.vpdpbssd.256
- // (< 8 x i32>, < 8 x i32>, < 8 x i32>)
- //
- // < 4 x i32> @llvm.x86.avx2.vpdpbssds.128
- // (< 4 x i32>, < 4 x i32>, < 4 x i32>)
- // < 8 x i32> @llvm.x86.avx2.vpdpbssds.256
- // (< 8 x i32>, < 8 x i32>, < 8 x i32>)
+ // Multiply and Add Unsigned Bytes
+ // < 4 x i32> @llvm.x86.avx2.vpdpbuud.128
+ // (< 4 x i32>, <16 x i8>, <16 x i8>)
+ // < 8 x i32> @llvm.x86.avx2.vpdpbuud.256
+ // (< 8 x i32>, <32 x i8>, <32 x i8>)
+ // <16 x i32> @llvm.x86.avx10.vpdpbuud.512
+ // (<16 x i32>, <64 x i8>, <64 x i8>)
//
- // <16 x i32> @llvm.x86.avx10.vpdpbssd.512
- // (<16 x i32>, <16 x i32>, <16 x i32>)
- // <16 x i32> @llvm.x86.avx10.vpdpbssds.512
- // (<16 x i32>, <16 x i32>, <16 x i32>)
+ // Multiply and Add Unsigned Bytes With Saturation
+ // < 4 x i32> @llvm.x86.avx2.vpdpbuuds.128
+ // (< 4 x i32>, <16 x i8>, <16 x i8>)
+ // < 8 x i32> @llvm.x86.avx2.vpdpbuuds.256
+ // (< 8 x i32>, <32 x i8>, <32 x i8>)
+ // <16 x i32> @llvm.x86.avx10.vpdpbuuds.512
+ // (<16 x i32>, <64 x i8>, <64 x i8>)
//
// These intrinsics are auto-upgraded into non-masked forms:
// <4 x i32> @llvm.x86.avx512.mask.vpdpbusd.128
@@ -5889,7 +5922,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
case Intrinsic::x86_avx2_vpdpbuuds_256:
case Intrinsic::x86_avx10_vpdpbuuds_512:
handleVectorPmaddIntrinsic(I, /*ReductionFactor=*/4,
- /*ZeroPurifies=*/true, /*EltSizeInBits=*/8);
+ /*ZeroPurifies=*/true);
break;
// AVX Vector Neural Network Instructions: words
@@ -6009,7 +6042,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
case Intrinsic::x86_avx2_vpdpwuuds_256:
case Intrinsic::x86_avx10_vpdpwuuds_512:
handleVectorPmaddIntrinsic(I, /*ReductionFactor=*/2,
- /*ZeroPurifies=*/true, /*EltSizeInBits=*/16);
+ /*ZeroPurifies=*/true);
break;
// Dot Product of BF16 Pairs Accumulated Into Packed Single
``````````
</details>
https://github.com/llvm/llvm-project/pull/172762
More information about the llvm-commits
mailing list