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

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 22 13:06:16 PST 2022


xbolva00 added a comment.

In D117912#3263872 <https://reviews.llvm.org/D117912#3263872>, @craig.topper wrote:

> 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.

Ah, indeed, yes.


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

https://reviews.llvm.org/D117912



More information about the llvm-commits mailing list