llvm-project
755ffa3c - [LangRef] Do not make align imply dereferenceability (#158062)

Commit
154 days ago
[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 https://github.com/llvm/llvm-project/issues/90446.
Author
Parents
Loading