]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Committed] PR target/110843: Check TARGET_AVX512VL for V2DI rotates in STV.
authorRoger Sayle <roger@nextmovesoftware.com>
Mon, 31 Jul 2023 07:08:11 +0000 (08:08 +0100)
committerRoger Sayle <roger@nextmovesoftware.com>
Mon, 31 Jul 2023 07:08:11 +0000 (08:08 +0100)
commit129feec0ba4f8ce74edf1fdf7da37b54968d3d37
treea5fdf14484cfaf7d7ab845e1378ab32dd700cdd9
parent1349f530753be963043d77c1d51da161133d5afe
[Committed] PR target/110843: Check TARGET_AVX512VL for V2DI rotates in STV.

This patch resolves PR target/110843, an ICE caused by my enhancement to
support AVX512 DImode and SImode rotates in the scalar-to-vector (STV) pass.
Although the vprotate instructions are available on all TARGET_AVX512F
microarchitectures, the V2DI and V4SI variants are only available on the
TARGET_AVX512VL subset, leading to problems when command line options
enable AVX512 (i.e. AVX512F) but not the required AVX512VL functionality.
The simple fix is to update/correct the target checks.

2023-07-31  Roger Sayle  <roger@nextmovesoftware.com>

gcc/ChangeLog
PR target/110843
* config/i386/i386-features.cc (compute_convert_gain): Check
TARGET_AVX512VL (not TARGET_AVX512F) when considering V2DImode
and V4SImode rotates in STV.
(general_scalar_chain::convert_rotate): Likewise.

gcc/testsuite/ChangeLog
PR target/110843
* gcc.target/i386/pr110843.c: New test case.
gcc/config/i386/i386-features.cc
gcc/testsuite/gcc.target/i386/pr110843.c [new file with mode: 0644]