public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Robin Dapp <rdapp.gcc@gmail.com>
To: 钟居哲 <juzhe.zhong@rivai.ai>,
	"richard.sandiford" <richard.sandiford@arm.com>
Cc: rdapp.gcc@gmail.com, gcc-patches <gcc-patches@gcc.gnu.org>,
	rguenther <rguenther@suse.de>
Subject: Re: [PATCH] internal-fn: Add VCOND_MASK_LEN.
Date: Thu, 26 Oct 2023 10:41:43 +0200	[thread overview]
Message-ID: <b86ba9b8-0b32-420e-a75d-ea3ff1cbd9eb@gmail.com> (raw)
In-Reply-To: <E049C2D49C4FA5D0+2023102606351803326799@rivai.ai>

> Yeah. I think Robin may need this :
> 
> TREE_CODE (else_val) == SSA_NAAME
>   && SSA_NAME_IS_DEFAULT_DEF (else_val)
>   && VAR_P (SSA_NAME_VAR (else_val))
> 
> to differentiate whether the ELSE VALUE is uninitialized SSA or not.

I think we are talking about a different simplification now.
This one we could still add as a match.pd pattern simplifying every
conditional operation with an undefined else value.

I just re-checked - without my pattern that turns
VCOND_MASK_LEN into VEC_COND there is only one additional fail.
(cond_widen_reduc-2.c where we scan for vfwreduc).
I guess I can just change the combine pattern to combine cond
as well as length masking (merge + if_then_else) when the else
value is similar in both.  Then we would avoid my dubious
simplification and still get rid of the execution failures.

Surely Richard is right in that we cannot "unconditionally" fold
away the length but my naive hunch is that we currently never
create situations where this really leads to errors.

Regards
 Robin


  reply	other threads:[~2023-10-26  8:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-25 22:10 钟居哲
2023-10-25 22:32 ` Richard Sandiford
2023-10-25 22:35   ` 钟居哲
2023-10-26  8:41     ` Robin Dapp [this message]
2023-10-26 14:02       ` Robin Dapp
2023-10-26 14:10         ` 钟居哲
2023-10-26 20:32           ` Robin Dapp
2023-11-02 13:35         ` Richard Biener
2023-11-02 13:48           ` Robin Dapp
2023-11-02 23:49             ` Richard Sandiford
2023-11-03  9:03               ` Robin Dapp
2023-11-03  9:11                 ` Richard Sandiford
2023-11-03 22:02                   ` Robin Dapp
2023-11-05 20:28                     ` Richard Sandiford
2023-11-06  7:22                       ` Richard Biener
  -- strict thread matches above, loose matches on Subject: below --
2023-09-08  9:01 [PATCH] gimple-match: Do not try UNCOND optimization with COND_LEN Robin Dapp
2023-09-11 20:35 ` Robin Dapp
2023-10-12 13:53   ` Richard Sandiford
2023-10-12 14:19     ` Richard Sandiford
2023-10-13 15:50       ` Robin Dapp
2023-10-16 21:59         ` Richard Sandiford
2023-10-17  8:47           ` Richard Biener
2023-10-17 11:39             ` Robin Dapp
2023-10-17 13:35               ` Richard Sandiford
2023-10-17 15:42                 ` Robin Dapp
2023-10-17 16:05                   ` Richard Sandiford
     [not found]                     ` <7e083b67-f283-4e9e-ba76-24e194fa1761@gmail.com>
     [not found]                       ` <mptttqmny4u.fsf@arm.com>
2023-10-23 16:09                         ` [PATCH] internal-fn: Add VCOND_MASK_LEN Robin Dapp
2023-10-24 21:50                           ` Richard Sandiford
2023-10-25 19:59                             ` Robin Dapp
2023-10-25 21:58                               ` Richard Sandiford

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=b86ba9b8-0b32-420e-a75d-ea3ff1cbd9eb@gmail.com \
    --to=rdapp.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=juzhe.zhong@rivai.ai \
    --cc=rguenther@suse.de \
    --cc=richard.sandiford@arm.com \
    /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).