[PATCH] D121915: [RISCV] CLZ Instruction

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 17 09:47:58 PDT 2022


craig.topper added a comment.

Rethinking that. Since __builtin_clz is undefined for 0, I think we should have clang builtins, but we should use llvm.ctlz with false for the second argument as their implementation. See X86::BI__builtin_ia32_lzcnt_u32 for example.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121915



More information about the cfe-commits mailing list