[PATCH] D90529: Allow nonnull/align attribute to accept poison
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 12 07:52:25 PST 2021
jdoerfert accepted this revision.
jdoerfert added a comment.
For the attributor, add the tests that don't work with FIXMEs into the attributor test folder please, potentially just into the respective test files, e.g. nonnull.ll
I proposed some wording changes, but no semantic change.
================
Comment at: llvm/docs/LangRef.rst:1162-1168
+ This indicates that the pointer value is :ref:`poison value <poisonvalues>`
+ or has the specified alignment. If the pointer value does not have the
+ specified alignment, :ref:`poison value <poisonvalues>` is returned or
+ passed instead of undefined behavior. If ``noundef`` attribute exists, the
+ value should be a well-defined aligned pointer, otherwise it is undefined
+ behavior. ``align 1`` has no effect on non-byval, non-preallocated
+ arguments.
----------------
`poison` is not aligned, and can well be null. Let's state the intent and not "include" poison as valid input. It is not and that is why it triggers the output to be poison.
================
Comment at: llvm/docs/LangRef.rst:1226-1231
+ This indicates that the parameter or return pointer is poison or not null.
+ This attribute may only be applied to pointer typed parameters. This is not
checked or enforced by LLVM; if the parameter or return pointer is null,
- the behavior is undefined.
+ :ref:`poison value <poisonvalues>` is returned or passed instead of
+ undefined behavior. If ``noundef`` attribute exists, the value should be a
+ well-defined non-null value, otherwise it is undefined behavior.
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90529/new/
https://reviews.llvm.org/D90529
More information about the llvm-commits
mailing list