https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120031
Bug ID: 120031 Summary: Fails to pattern match ctz from DeBruijn Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- __attribute__((noinline)) unsigned int ZSTD_countTrailingZeros32_fallback(unsigned int val) { #ifdef USEBMI return _tzcnt_u32(val); #elif USECMPBMI return tzcntl_cmovbl(val); #else { static const unsigned int DeBruijnBytePos[32] = {0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9}; return DeBruijnBytePos[((unsigned int) ((val & -(int) val) * 0x077CB531U)) >> 27]; } #endif }