Skip to content

Commit

Permalink
[msan] Support most Arm NEON vector shift instructions (#102507)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
thurstond authored Aug 9, 2024
1 parent f865947 commit 4ce559d
Show file tree
Hide file tree
Showing 2 changed files with 801 additions and 636 deletions.
17 changes: 17 additions & 0 deletions llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4116,6 +4116,23 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
case Intrinsic::x86_mmx_psrli_q:
case Intrinsic::x86_mmx_psrai_w:
case Intrinsic::x86_mmx_psrai_d:
case Intrinsic::aarch64_neon_rshrn:
case Intrinsic::aarch64_neon_sqrshl:
case Intrinsic::aarch64_neon_sqrshrn:
case Intrinsic::aarch64_neon_sqrshrun:
case Intrinsic::aarch64_neon_sqshl:
case Intrinsic::aarch64_neon_sqshlu:
case Intrinsic::aarch64_neon_sqshrn:
case Intrinsic::aarch64_neon_sqshrun:
case Intrinsic::aarch64_neon_srshl:
case Intrinsic::aarch64_neon_sshl:
case Intrinsic::aarch64_neon_uqrshl:
case Intrinsic::aarch64_neon_uqrshrn:
case Intrinsic::aarch64_neon_uqshl:
case Intrinsic::aarch64_neon_uqshrn:
case Intrinsic::aarch64_neon_urshl:
case Intrinsic::aarch64_neon_ushl:
// Not handled here: aarch64_neon_vsli (vector shift left and insert)
handleVectorShiftIntrinsic(I, /* Variable */ false);
break;
case Intrinsic::x86_avx2_psllv_d:
Expand Down
Loading

0 comments on commit 4ce559d

Please sign in to comment.