https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127869

            Bug ID: 127869
           Summary: bitreverse detection from array
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64

Created attachment 65824
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65824&action=edit
testcase

ffmpeg has a bitreverse via an array lookup, GCC should be able to detect this
and convert that into a bitreverse builtin.
https://github.com/FFmpeg/FFmpeg/blob/master/libavutil/reverse.c#L23-L40


This is like the CLZ/CTZ lookup array and such.

Reply via email to