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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:92e9e971ced90af5a825ae4b35ad6c98c9ab86da

commit r15-4063-g92e9e971ced90af5a825ae4b35ad6c98c9ab86da
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Fri Oct 4 13:12:45 2024 +0200

    i386: Fix up ix86_expand_int_compare with TImode comparisons of SUBREGs
from V8{H,B}Fmode against zero [PR116921]

    The following testcase ICEs, because the ix86_expand_int_compare
    optimization to use {,v}ptest assumes there are instructions for all
    16-byte vector modes.  That isn't the case, we only have one for
    V16QI, V8HI, V4SI, V2DI, V1TI, V4SF and V2DF, not for
    V8HF nor V8BF.

    The following patch fixes that by using the V8HI instruction instead
    for those 2 modes.  tmp can't be a SUBREG, because it is SUBREG_REG
    of another SUBREG, so we don't need to worry about gen_lowpart
    failing.

    2024-10-04  Jakub Jelinek  <ja...@redhat.com>

            PR target/116921
            * config/i386/i386-expand.cc (ix86_expand_int_compare): Add a
SUBREG
            to V8HImode from V8HFmode or V8BFmode before generating a ptest.

            * gcc.target/i386/pr116921.c: New test.

Reply via email to