[PATCH] D145198: [ASAN] Support memory checks on scalable vector typed masked load and store
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 2 15:05:04 PST 2023
reames created this revision.
reames added reviewers: craig.topper, asb, kito-cheng, usama54321, MaskRay.
Herald added subscribers: Enna1, bollu, hiraditya, mcrosier.
Herald added a project: All.
reames requested review of this revision.
Herald added a subscriber: alextsao1999.
Herald added a project: LLVM.
This takes the approach of using the loop based formation for scalable vectors only. We could potentially use the loop form for fixed vectors only, but we'd loose the unroll and specialize on constant vector logic which is already present. I don't have a strong opinion on whether the existing logic is worthwhile, I kept it mostly to minimize test churn.
Worth noting is that there is a better lowering available. The plain vector lowering appears to check only the first and last byte. By analogy, we should be able to check only the first active and last active byte in the masked op. This is a more invasive change to asan, and I decided simply supporting scalable vectors at all was a better starting place.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D145198
Files:
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/test/Instrumentation/AddressSanitizer/asan-masked-load-store.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145198.502004.patch
Type: text/x-patch
Size: 10063 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230302/611632dc/attachment.bin>
More information about the llvm-commits
mailing list