https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110181
Bug ID: 110181 Summary: longlong.h for RISCV should define count_leading_zeros and count_trailing_zeros and COUNT_LEADING_ZEROS_0 when ZBB is enabled Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Target: riscv I noticed that divdi3 on riscv32 with ZBB extensions always enabled still emits a lookup table but we really should just use __builtin_clzll/__builtin_clz (for the instruction).