[PATCH] D56155: [docs] cttz and ctlz return poison, not undef, when argument is 0

Nuno Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 31 02:03:16 PST 2018


nlopes added a comment.

In D56155#1342651 <https://reviews.llvm.org/D56155#1342651>, @nikic wrote:

> Based on the current documentation <https://llvm.org/docs/LangRef.html#poison-values> of poison values, `select`ing over poison is still poison by the first rule. I'm assuming that this is an inaccuracy in the documentation and `select`s are treated the same ways as phis? Otherwise the cited clang code would be affected.


That's a good point. I agree the current documentation of poison is outdated; it misses a rule for select. "select a, b, c" is only poison if a=1 and b is poison or a=0 and c is poison.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D56155





More information about the llvm-commits mailing list