Skip to content

Commit 6c68042

Browse files
committed
[msan] Support NEON vector multiplication instructions
Approximates the shadow propagation via OR'ing. Updates the neon_vmul.ll test introduced in #117935
1 parent 53fd724 commit 6c68042

File tree

2 files changed

+382
-675
lines changed

2 files changed

+382
-675
lines changed

llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4026,6 +4026,9 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
40264026
setOriginForNaryOp(I);
40274027
}
40284028

4029+
// Approximation only
4030+
void handleNEONVectorMultiplyIntrinsic(IntrinsicInst &I) { handleShadowOr(I); }
4031+
40294032
void visitIntrinsicInst(IntrinsicInst &I) {
40304033
switch (I.getIntrinsicID()) {
40314034
case Intrinsic::uadd_with_overflow:
@@ -4429,6 +4432,16 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
44294432
break;
44304433
}
44314434

4435+
case Intrinsic::aarch64_neon_fmulx:
4436+
case Intrinsic::aarch64_neon_pmul:
4437+
case Intrinsic::aarch64_neon_pmull:
4438+
case Intrinsic::aarch64_neon_smull:
4439+
case Intrinsic::aarch64_neon_pmull64:
4440+
case Intrinsic::aarch64_neon_umull: {
4441+
handleNEONVectorMultiplyIntrinsic(I);
4442+
break;
4443+
}
4444+
44324445
default:
44334446
if (!handleUnknownIntrinsic(I))
44344447
visitInstruction(I);

0 commit comments

Comments
 (0)