[PATCH] D70749: [InstCombine] do not insert nonnull assumption for undef

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 27 14:54:58 PST 2019


jdoerfert added subscribers: simoll, nlopes.
jdoerfert added a comment.

A few more thoughts:

1. The poison solution mentioned by @efriedma should "fix" our problem with the `nonnull` annotated memcpy/set implementations. (I don't have the reference handy but there is a long history here)
2. Even if optimizations would clear the attributes when they replace something with undef, I doubt that will solve the problem. The attribute might have been propagated already, causing the mismatch to happen later.
3. When we want to do context and/or flow-sensitive deduction/reasoning (which should happen soon!) the current wording will not work (see https://godbolt.org/z/HBRGhb) while the poison solution would work fine.
4. On the email list someone (maybe @simoll or @nlopes) proposed to introduce a "bottom" symbol to complement undef.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70749/new/

https://reviews.llvm.org/D70749





More information about the llvm-commits mailing list