public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/112999] riscv: Infinite loop with mask extraction
Date: Thu, 14 Dec 2023 16:54:07 +0000	[thread overview]
Message-ID: <bug-112999-4-AsYxKnDYzk@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112999-4@http.gcc.gnu.org/bugzilla/>

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

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

https://gcc.gnu.org/g:e5e1999aa664333f766f3e6cc6996f769d50ae7a

commit r14-6556-ge5e1999aa664333f766f3e6cc6996f769d50ae7a
Author: Robin Dapp <rdapp@ventanamicro.com>
Date:   Wed Dec 13 16:42:28 2023 +0100

    expmed: Compare unit_precision for better mode.

    In extract_bit_field_1 we try to get a better vector mode before
    extracting from it.  Better refers to the case when the requested target
    mode does not equal the inner mode of the vector to extract from and we
    have an equivalent tieable vector mode with a fitting inner mode.

    On riscv this triggered an ICE (PR112999) because we would take the
    detour of extracting from a mask-mode vector via a vector integer mode.
    One element of that mode could be subreg-punned with TImode which, in
    turn, would need to be operated on in DImode chunks.

    This patch adds

        && known_eq (bitsize, GET_MODE_UNIT_PRECISION (new_mode))
        && multiple_p (bitnum, GET_MODE_UNIT_PRECISION (new_mode))

    to the list of criteria for a better mode.

    gcc/ChangeLog:

            PR target/112999

            * expmed.cc (extract_bit_field_1):  Ensure better mode
            has fitting unit_precision.

    gcc/testsuite/ChangeLog:

            * gcc.target/riscv/rvv/autovec/pr112999.c: New test.

  parent reply	other threads:[~2023-12-14 16:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-13 12:29 [Bug target/112999] New: " rdapp at gcc dot gnu.org
2023-12-13 12:32 ` [Bug target/112999] " rdapp at gcc dot gnu.org
2023-12-13 13:47 ` juzhe.zhong at rivai dot ai
2023-12-14 16:54 ` cvs-commit at gcc dot gnu.org [this message]
2023-12-15  8:47 ` rdapp at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-112999-4-AsYxKnDYzk@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).