[PATCH] D117912: [IR] document and update ctlz/cttz intrinsics to optionally return poison rather than undef

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 22 13:04:51 PST 2022


craig.topper added a comment.

In D117912#3263773 <https://reviews.llvm.org/D117912#3263773>, @xbolva00 wrote:

>>> __builtin_unpredictable
>
> Backend (SDAG) ignores this hint sadly, it would be really cool to have it.

Does the hint even survive through the middle end? I think the pattern will be turned into llvm.cttz.i64(i64 %x, i1 false). Then, CodeGenPrepare turns it back into the control flow version based on isCheapToSpeculateCTTZ.


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

https://reviews.llvm.org/D117912



More information about the llvm-commits mailing list