[PATCH] D90529: Allow nonnull attribute to accept poison

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 12:45:14 PST 2020


aqjune added a comment.

In D90529#2449524 <https://reviews.llvm.org/D90529#2449524>, @jdoerfert wrote:

> In D90529#2449341 <https://reviews.llvm.org/D90529#2449341>, @aqjune wrote:
>
>> Should we have clarification about the semantics of align/nonnull bundle for the assume intrinsic?
>
> Probably true, good catch. Why not make it the same as the attribute? So,
>
>   ; A correct transformation
>   call f(nonnull %p, nonnull noundef %q)
>   ->
>   llvm.assume [ "nonnull"(%p), "nonnull"(%q), "noundef"(%q)]
>   ; where a `null` value for %p can be assumed to be a poison value and
>   ; a `null` value for %q can be assumed to cause UB because `noundef` of
>   ; poison is UB.

+1, I'll make a separate patch for this.


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