diff --git a/regcomp.c b/regcomp.c index c5e54cc69a29..2ac7057f0c58 100644 --- a/regcomp.c +++ b/regcomp.c @@ -19398,17 +19398,8 @@ S_optimize_regclass(pTHX_ bool already_inverted; bool are_equivalent; - /* Compute which bit is set, which is the same thing as, e.g., - * ANYOF_CNTRL. From - * https://graphics.stanford.edu/~seander/bithacks.html#IntegerLogDeBruijn - * */ - static const int MultiplyDeBruijnBitPosition2[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 - }; - namedclass = MultiplyDeBruijnBitPosition2[(posixl - * 0x077CB531U) >> 27]; + namedclass = single_1bit_pos(posixl); classnum = namedclass_to_classnum(namedclass); /* The named classes are such that the inverted number is one