[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 17 13:57:12 PDT 2024
================
@@ -3865,6 +3866,42 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
setOriginForNaryOp(I);
}
+ /// Handle Arm NEON vector store intrinsics (vst{2,3,4}).
+ ///
+ /// Arm NEON vector store intrinsics have the output address (pointer) as the
+ /// last argument, with the initial arguments being the inputs. They return
+ /// void.
+ void handleNEONVectorStoreIntrinsic(IntrinsicInst &I) {
+ IRBuilder<> IRB(&I);
+
+ // Don't use getNumOperands() because it includes the callee
+ int numArgOperands = I.arg_size();
+ assert(numArgOperands >= 1);
+
+ // The last arg operand is the output
+ Value *Addr = I.getArgOperand(numArgOperands - 1);
+ if (ClCheckAccessAddress)
+ insertShadowCheck(Addr, &I);
+
+ IntrinsicInst *ShadowI = cast<IntrinsicInst>(I.clone());
+ for (int i = 0; i < numArgOperands - 1; i++) {
----------------
vitalybuka wrote:
no {} in one liners
https://github.com/llvm/llvm-project/pull/99360
More information about the llvm-commits
mailing list