Commit 9334ef9
authored
[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 #141892 (and probably a
bunch of others...)1 parent b970108 commit 9334ef9
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