llvm-project
9334ef98 - [LangRef] Specify that load of alloca outside lifetime is poison (#157852)

Commit
58 days ago
[LangRef] Specify that load of alloca outside lifetime is poison (#157852) We consider (in bounds) loads from allocas to always be speculatable, without taking lifetimes into account. This means that such loads cannot be immediate UB. Specify them as returning poison instead. Due to stack coloring, such a load may end up loading from a different alloca, but that's compatible with poison. Stores are still UB, but that's a much more narrow problem (I think the only transform violating that part is store scalar promotion in LICM). Fixes https://github.com/llvm/llvm-project/issues/141892 (and probably a bunch of others...)
Author
Parents
Loading