[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
Sun Dec 30 06:44:32 PST 2018


nlopes added a comment.

As a justification why it doesn't matter whether it's undef or poison, clang emits__builtin_ffs as:
ffs(x) -> x ? cttz(x) + 1 : 0

https://clang.llvm.org/doxygen/CGBuiltin_8cpp_source.html#l01814

So I support this change to poison, since it makes things easier than undef.


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