[PATCH] D90529: Allow nonnull attribute to accept poison

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 12:00:55 PST 2020


jdoerfert added a comment.

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.


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