[PATCH] D141798: Remove ZeroBehavior of countLeadingZeros and the like (NFC)

2023-01-18 Thread Kazu Hirata via Phabricator via cfe-commits
kazu marked an inline comment as done. kazu added a comment. In D141798#4055050 , @barannikov88 wrote: > It would be nice to have comments reflecting the new behavior in the case of > 0 / max value. I've added comments to all four functions -- count{L

[PATCH] D141798: Remove ZeroBehavior of countLeadingZeros and the like (NFC)

2023-01-18 Thread Kazu Hirata via Phabricator via cfe-commits
kazu updated this revision to Diff 490348. kazu added a comment. Updated the patch to leave findFirstSet and findLastSet untouched. Added a comment about the behavior on 0/max input. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141798/new/ https:

[PATCH] D141798: Remove ZeroBehavior of countLeadingZeros and the like (NFC)

2023-01-17 Thread Jay Foad via Phabricator via cfe-commits
foad added a comment. Herald added a subscriber: luke. In D141798#4055050 , @barannikov88 wrote: > It would be nice to have comments reflecting the new behavior in the case of > 0 / max value. +1 Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D141798: Remove ZeroBehavior of countLeadingZeros and the like (NFC)

2023-01-15 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. It would be nice to have comments reflecting the new behavior in the case of 0 / max value. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141798/new/ https://reviews.llvm.org/D141798 _

[PATCH] D141798: Remove ZeroBehavior of countLeadingZeros and the like (NFC)

2023-01-15 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/include/llvm/Support/MathExtras.h:212 /// Only unsigned integral types are allowed. -/// -/// \param ZB the behavior on an input of 0. Only ZB_Max and ZB_Undefined are -/// valid arguments. -template T findFirstSet(T Val, Z

[PATCH] D141798: Remove ZeroBehavior of countLeadingZeros and the like (NFC)

2023-01-15 Thread Kazu Hirata via Phabricator via cfe-commits
kazu created this revision. Herald added subscribers: Moerafaat, zero9178, bzcheeseman, kosarev, sdasgup3, wenzhicui, wrengr, ormris, foad, cota, teijeong, frasercrmck, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, kerbowa, liufengdb, aartbik, mgester, arpith-jacob, csig