[llvm] [LangRef] Clarify `align` and `nonnull` interaction with `noundef` in parameter attributes section (PR #224236)
Ömer Sinan Ağacan via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 17 02:54:34 PDT 2026
osa1 wrote:
@nikic previous sentence:
> The `align` attribute should be combined with the `noundef` attribute to ensure a pointer is aligned, or otherwise the behavior is undefined
Does not say what exactly is undefined when you don't have `noundef`. It could be:
- passing a less aligned value (at the call site)
- using the less aligned value (in the function)
New one:
> If the `align` attribute is combined with the `noundef` attribute, then calling the function with an unaligned value is immediate undefined behavior at the call site, and in the function the value cannot be poison.
Clarifies that `noundef` turns the call site into UB if passed less aligned, and the value becomes poison-free in the function.
https://github.com/llvm/llvm-project/pull/224236
More information about the llvm-commits
mailing list