Skip to content

Commit 4ce559d

Browse files
authored
[msan] Support most Arm NEON vector shift instructions (#102507)
This adds support for the Arm NEON vector shift instructions that follow the same pattern as x86 (handleVectorShiftIntrinsic). VSLI is not supported because it does not follow the 2-argument pattern expected by handleVectorShiftIntrinsic. This patch also updates the arm64-vshift.ll MSan test that was introduced in 5d0a12d
1 parent f865947 commit 4ce559d

File tree

2 files changed

+801
-636
lines changed

2 files changed

+801
-636
lines changed

llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4116,6 +4116,23 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
41164116
case Intrinsic::x86_mmx_psrli_q:
41174117
case Intrinsic::x86_mmx_psrai_w:
41184118
case Intrinsic::x86_mmx_psrai_d:
4119+
case Intrinsic::aarch64_neon_rshrn:
4120+
case Intrinsic::aarch64_neon_sqrshl:
4121+
case Intrinsic::aarch64_neon_sqrshrn:
4122+
case Intrinsic::aarch64_neon_sqrshrun:
4123+
case Intrinsic::aarch64_neon_sqshl:
4124+
case Intrinsic::aarch64_neon_sqshlu:
4125+
case Intrinsic::aarch64_neon_sqshrn:
4126+
case Intrinsic::aarch64_neon_sqshrun:
4127+
case Intrinsic::aarch64_neon_srshl:
4128+
case Intrinsic::aarch64_neon_sshl:
4129+
case Intrinsic::aarch64_neon_uqrshl:
4130+
case Intrinsic::aarch64_neon_uqrshrn:
4131+
case Intrinsic::aarch64_neon_uqshl:
4132+
case Intrinsic::aarch64_neon_uqshrn:
4133+
case Intrinsic::aarch64_neon_urshl:
4134+
case Intrinsic::aarch64_neon_ushl:
4135+
// Not handled here: aarch64_neon_vsli (vector shift left and insert)
41194136
handleVectorShiftIntrinsic(I, /* Variable */ false);
41204137
break;
41214138
case Intrinsic::x86_avx2_psllv_d:

0 commit comments

Comments
 (0)