We use this intrinsic in our codes. With this intrinsic, the consecutive store can not be recognized in SLP vectorizer.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Previous attempt: https://reviews.llvm.org/D102344
The semantics of this intrinsics as specified by LangRef really leave something to be desired. In particular it's not clear to me whether it is okay to replace the llvm.annotation result with its argument during middle-end optimization, because that's what this SCEV change will ultimately lead to (at least in some cases).
I would like a LangRef patch to make the wording more explicit. I assume the semantics here are that it's always legal to replace llvm.annotation return value with its argument, but it's preferred not to do the replacement? Otherwise we could just mark the argument as returned.
address @nikic comment:
- explicitly doc the behavior for annotation intrinsics
- handle llvm.ptr.annotation too
llvm/docs/LangRef.rst | ||
---|---|---|
23616–23622 | This sounds like they are removed immediately (even by analyses?), but its just that it is semantically correct to do so while losing some information such as debug info. Could you use wording such as "transformations preserve annotations on a best-effort basis but are allowed to replace them with their first argument without breaking semantics and are completely dropped during instruction selection"? |
"and they are"?