Skip to content

Commit b30eeaf

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

File tree

2 files changed

+6186
-0
lines changed

2 files changed

+6186
-0
lines changed

llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

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

4015+
// Approximation only
4016+
void handleNEONVectorMultiplyIntrinsic(IntrinsicInst &I) { handleShadowOr(I); }
4017+
40154018
void visitIntrinsicInst(IntrinsicInst &I) {
40164019
switch (I.getIntrinsicID()) {
40174020
case Intrinsic::uadd_with_overflow:
@@ -4409,6 +4412,16 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
44094412
break;
44104413
}
44114414

4415+
case Intrinsic::aarch64_neon_fmulx:
4416+
case Intrinsic::aarch64_neon_pmul:
4417+
case Intrinsic::aarch64_neon_pmull:
4418+
case Intrinsic::aarch64_neon_smull:
4419+
case Intrinsic::aarch64_neon_pmull64:
4420+
case Intrinsic::aarch64_neon_umull: {
4421+
handleNEONVectorMultiplyIntrinsic(I);
4422+
break;
4423+
}
4424+
44124425
default:
44134426
if (!handleUnknownIntrinsic(I))
44144427
visitInstruction(I);

0 commit comments

Comments
 (0)