Skip to content

Commit 3b74abd

Browse files
authored
[msan] Support NEON vector multiplication instructions (#117944)
Approximates the shadow propagation via OR'ing. Updates the neon_vmul.ll test introduced in #117935
1 parent e81130a commit 3b74abd

File tree

2 files changed

+384
-675
lines changed

2 files changed

+384
-675
lines changed

llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

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

4029+
// Approximation only
4030+
void handleNEONVectorMultiplyIntrinsic(IntrinsicInst &I) {
4031+
handleShadowOr(I);
4032+
}
4033+
40294034
void visitIntrinsicInst(IntrinsicInst &I) {
40304035
switch (I.getIntrinsicID()) {
40314036
case Intrinsic::uadd_with_overflow:
@@ -4429,6 +4434,16 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
44294434
break;
44304435
}
44314436

4437+
case Intrinsic::aarch64_neon_fmulx:
4438+
case Intrinsic::aarch64_neon_pmul:
4439+
case Intrinsic::aarch64_neon_pmull:
4440+
case Intrinsic::aarch64_neon_smull:
4441+
case Intrinsic::aarch64_neon_pmull64:
4442+
case Intrinsic::aarch64_neon_umull: {
4443+
handleNEONVectorMultiplyIntrinsic(I);
4444+
break;
4445+
}
4446+
44324447
default:
44334448
if (!handleUnknownIntrinsic(I))
44344449
visitInstruction(I);

0 commit comments

Comments
 (0)