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 tree-optimization/111760] risc-v regression: COND_LEN_* incorrect fold/simplify in middle-end
Date: Mon, 06 Nov 2023 11:27:35 +0000	[thread overview]
Message-ID: <bug-111760-4-ECYgsMTmMt@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111760-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #8 from CVS 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:0c42741ad95af3a1e3ac07350da4c3a94865ed63

commit r14-5151-g0c42741ad95af3a1e3ac07350da4c3a94865ed63
Author: Robin Dapp <rdapp@ventanamicro.com>
Date:   Wed Oct 25 22:19:43 2023 +0200

    internal-fn: Add VCOND_MASK_LEN.

    In order to prevent simplification of a COND_OP with degenerate mask
    (CONSTM1_RTX) into just an OP in the presence of length masking this
    patch introduces a length-masked analog to VEC_COND_EXPR:
    IFN_VCOND_MASK_LEN.

    It also adds new match patterns that allow the combination of
    unconditional unary, binary and ternay operations with the
    VCOND_MASK_LEN into a conditional operation if the target supports it.

    gcc/ChangeLog:

            PR tree-optimization/111760

            * config/riscv/autovec.md (vcond_mask_len_<mode><vm>): Add
            expander.
            * config/riscv/riscv-protos.h (enum insn_type): Add.
            * config/riscv/riscv-v.cc (needs_fp_rounding): Add !pred_mov.
            * doc/md.texi: Add vcond_mask_len.
            * gimple-match-exports.cc (maybe_resimplify_conditional_op):
            Create VCOND_MASK_LEN when length masking.
            * gimple-match.h (gimple_match_op::gimple_match_op): Always
            initialize len and bias.
            * internal-fn.cc (vec_cond_mask_len_direct): Add.
            (direct_vec_cond_mask_len_optab_supported_p): Add.
            (internal_fn_len_index): Add VCOND_MASK_LEN.
            (internal_fn_mask_index): Ditto.
            * internal-fn.def (VCOND_MASK_LEN): New internal function.
            * match.pd: Combine unconditional unary, binary and ternary
            operations into the respective COND_LEN operations.
            * optabs.def (OPTAB_D): Add vcond_mask_len optab.

    gcc/testsuite/ChangeLog:

            * gcc.dg/vect/vect-cond-arith-2.c: No vect cost model for
            riscv_v.

  parent reply	other threads:[~2023-11-06 11:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10 14:29 [Bug c/111760] New: " juzhe.zhong at rivai dot ai
2023-10-10 17:47 ` [Bug c/111760] " pinskia at gcc dot gnu.org
2023-10-10 21:02 ` [Bug tree-optimization/111760] " rdapp at gcc dot gnu.org
2023-10-10 21:58 ` juzhe.zhong at rivai dot ai
2023-10-10 22:04 ` pinskia at gcc dot gnu.org
2023-10-10 22:08 ` juzhe.zhong at rivai dot ai
2023-10-11  6:47 ` rdapp at gcc dot gnu.org
2023-10-11  8:36 ` rguenth at gcc dot gnu.org
2023-11-06 11:27 ` cvs-commit at gcc dot gnu.org [this message]
2023-11-07 23:39 ` juzhe.zhong at rivai dot ai

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-111760-4-ECYgsMTmMt@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).