[PATCH] D141798: Drop the ZeroBehavior parameter from countLeadingZeros and the like (NFC)

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 19:14:09 PST 2023


MaskRay added a comment.

`ZB_Max` is the strange mode that should be dropped, perhaps also `ZB_Undefined`.

In D141798#4064114 <https://reviews.llvm.org/D141798#4064114>, @arsenm wrote:

>> If you care about compilation speed, you should build LLVM with an appropriate -march= to take advantage of lzcnt and tzcnt.
>
> I think this is bad reasoning, nobody really uses -march

I agree. The reason should be clarified that the lzcnt performance here really doesn't matter.
Note: https://stackoverflow.com/questions/21390165/why-does-breaking-the-output-dependency-of-lzcnt-matter lzcnt/tzcnt have false dependencies on older (pre-Skylake) Intel processors. But this doesn't really matter for LLVM, at least the minor issue does not justify keeping the weird mode `ZB_Undefined`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141798



More information about the llvm-commits mailing list