Commit 80f3415
committed
[LangRef] Specify that load of alloca outside lifetime is poison
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).1 parent d685508 commit 80f3415
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3388 | 3388 | | |
3389 | 3389 | | |
3390 | 3390 | | |
| 3391 | + | |
| 3392 | + | |
| 3393 | + | |
| 3394 | + | |
3391 | 3395 | | |
3392 | 3396 | | |
3393 | 3397 | | |
| |||
0 commit comments