Skip to content

Commit bc065ba

Browse files
committed
Address Florian feedback
1 parent 54d6ae2 commit bc065ba

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3857,7 +3857,10 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
38573857
// Three operands:
38583858
// <4 x i32> @llvm.x86.avx512.vpdpbusd.128
38593859
// (<4 x i32> %s, <4 x i32> %a, <4 x i32> %b)
3860-
// (the result of multiply-add'ing %a and %b is accumulated with %s)
3860+
// (this is equivalent to multiply-add on %a and %b, followed by
3861+
// adding/"accumulating" %s. "Accumulation" stores the result in one
3862+
// of the source registers, but this accumulate vs. add distinction
3863+
// is lost when dealing with LLVM intrinsics.)
38613864
void handleVectorPmaddIntrinsic(IntrinsicInst &I, unsigned ReductionFactor,
38623865
unsigned EltSizeInBits = 0) {
38633866
IRBuilder<> IRB(&I);
@@ -3872,6 +3875,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
38723875
Value *Sa = nullptr;
38733876
Value *Sb = nullptr;
38743877

3878+
assert(I.arg_size() == 2 || I.arg_size() == 3);
38753879
if (I.arg_size() == 2) {
38763880
Va = I.getOperand(0);
38773881
Vb = I.getOperand(1);
@@ -3885,8 +3889,6 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
38853889

38863890
Sa = getShadow(&I, 1);
38873891
Sb = getShadow(&I, 2);
3888-
} else {
3889-
assert(I.arg_size() == 2 || I.arg_size() == 3);
38903892
}
38913893

38923894
FixedVectorType *ParamType = cast<FixedVectorType>(Va->getType());

0 commit comments

Comments
 (0)