[llvm] clarify semantics of masked vector load/store (PR #82469)
Jacob Lifshay via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 21 03:03:37 PST 2024
programmerjake wrote:
> That doesn't quite say everything -- there's the question of whether this [Rust PR](https://github.com/rust-lang/rust/pull/119203) should say `offset` (aka `getelementptr inbounds`)
there is the additional caveat that LLVM is allowed to create a `poison` value without UB (which is what happens with `getelementptr inbounds` with out-of-bounds indexes), but Rust defines out-of-bounds `offset` to be immediate UB, instead of deferred to the load/store.
a major difference between the two choices is that doing a masked load on a pointer before the beginning of it's allocation is disallowed with `inbounds`, but allowed without `inbounds` as long as vector elements are masked-off until the offset is big enough to be in the allocation's bounds.
https://github.com/llvm/llvm-project/pull/82469
More information about the llvm-commits
mailing list