add intrinsic for CLZ
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
These were intentionally not added because llvm has generic leading and trailing zero builtins. builtin_clz and builtin_ctz
Comment Actions
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::BIbuiltin_ia32_lzcnt_u32 for example.
Comment Actions
[RISCV]CLZ instruction try use llvm.ctlz with false for the second argument to implement clz
Comment Actions
LGTM though I think the title needs to be updated. Should be something like "[RISCV] Add clang builtins for CLZ instruction."
Add a space before the opening curly brace