Commit 755ffa3
authored
[LangRef] Do not make align imply dereferenceability (#158062)
We currently specify that something like `load i8, align 16384` implies
that the object is actually dereferenceable up to 16384 bytes, rather
than only the one byte implied by the load type.
We should stop doing that, because it makes it invalid to infer
alignments larger than the load/store type, which is something we do
(and want to do).
There is some SDAG code that does make use of this property by
widening accesses and extracting part of them. However, I believe we
should be justifying that based on target-specific guarantees, rather
than a generic IR property. (The reasoning goes something like this:
Typically, memory protection has page granularity, so widening a load to
the alignment will not trap, as long as the alignment is not larger than
the page size, which is true for any practically interesting access
size.)
Fixes #90446.1 parent e86209c commit 755ffa3
1 file changed
+7
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11397 | 11397 | | |
11398 | 11398 | | |
11399 | 11399 | | |
11400 | | - | |
11401 | | - | |
11402 | | - | |
11403 | | - | |
11404 | | - | |
| 11400 | + | |
| 11401 | + | |
| 11402 | + | |
11405 | 11403 | | |
11406 | 11404 | | |
11407 | 11405 | | |
| |||
11537 | 11535 | | |
11538 | 11536 | | |
11539 | 11537 | | |
11540 | | - | |
11541 | | - | |
11542 | | - | |
11543 | | - | |
11544 | | - | |
11545 | | - | |
| 11538 | + | |
| 11539 | + | |
| 11540 | + | |
| 11541 | + | |
11546 | 11542 | | |
11547 | 11543 | | |
11548 | 11544 | | |
| |||
0 commit comments