[llvm] [ASan][RISCV] Support asan check for segment load/store RVV intrinsics. (PR #161317)
    Hank Chang via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Oct  6 17:48:40 PDT 2025
    
    
  
================
@@ -2747,20 +2747,68 @@ bool RISCVTTIImpl::getTgtMemIntrinsic(IntrinsicInst *Inst,
   Intrinsic::ID IID = Inst->getIntrinsicID();
   LLVMContext &C = Inst->getContext();
   bool HasMask = false;
+
+  auto getSegNum = [](const IntrinsicInst *II, unsigned PtrOperandNo,
----------------
HankChang736 wrote:
Making it `static` function would also work, but I’d prefer to keep it as a small lambda since it’s only used once and keeps the logic local to the call site.
https://github.com/llvm/llvm-project/pull/161317
    
    
More information about the llvm-commits
mailing list