llvm.memset.* with undef bytes gets optimised into no-op
Open
llvm:optimizations
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Quote [Discourse](https://discourse.llvm.org/t/forcing-allocation-to-hold-undef-poison-after-non-allocating-operator-new-call/90305/2).
Currently the optimisation removes writes of `undef`, but it would be more semantically correct than writes of `poison` for MSan.
It would be great if we could postpone the optimisation until the codegen, so that instrumentation could pick these writes up for their bookkeeping.
Contributor guide
Assessment
This issue has not been assessed yet.