On Fri, Jun 27, 2025 at 7:27 AM Andi Kleen <a...@linux.intel.com> wrote:
>
> Uros Bizjak <ubiz...@gmail.com> writes:
>
> > Introduce crc_rev<mode>si4 expanders to generate CRC32 instruction when 
> > using
> > __builtin_rev_crc32_data* builtins with 0x1EDC6F41 poylnomial and -mcrc32.
> >
> >     PR target/120719
> >
> > gcc/ChangeLog:
> >
> >     * config/i386/i386.md (crc_rev<SWI124:mode>si4): New expander.
> >
> > gcc/testsuite/ChangeLog:
> >
> >     * gcc.target/i386/crc-builtin-crc32.c: New test.
> >
> > Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.
>
> This is missing enabling the test cases crc-crc32c* for the CRC pattern
> matching pass, which are currently only on aarch64/loongarch.
>
> So we're not sure if it actually works for that.

Included are target-dependent tests that result in crc32 instructions.
Generic tests are performed elsewhere (please see
gcc.dg/crc-builtin-target{32,64}.c).

> Also of course it would be nice to support PCLMCLDQ too like ARM.

As the saying goes: "Patches welcome!".

Uros.

Reply via email to