public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/95830] [11 regression][MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12247 start with gcc-11-1445-g502d63b6d61
Date: Fri, 26 Jun 2020 11:22:13 +0000	[thread overview]
Message-ID: <bug-95830-4-CdcGEjGZfp@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95830-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from rguenther at suse dot de <rguenther at suse dot de> ---
On Fri, 26 Jun 2020, marxin at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95830
> 
> --- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
> Thanks for reduction, I can confirm that. What happens:
> 
> mips-ps-5.c.171t.loopdone:
> 
>   _34 = vect__1.7_28 == vect__3.11_33;
>   vect_iftmp.12_35 = VEC_COND_EXPR <_34, vect__1.7_28, vect__2.10_31>;
> 
> which is fine. But then during veclower21 we lower the first comparison to:
> 
>   _24 = (void *) ivtmp.17_4;
>   vect__1.7_28 = MEM[base: _24, offset: 0B];
>   _23 = (void *) ivtmp.20_1;
>   vect__2.10_31 = MEM[base: _23, offset: 0B];
>   vect__3.11_33 = vect__2.10_31 + vect_cst__32;
>   _26 = BIT_FIELD_REF <vect__1.7_28, 32, 0>;
>   _27 = BIT_FIELD_REF <vect__3.11_33, 32, 0>;
>   _29 = _26 == _27 ? -1 : 0;
>   _30 = BIT_FIELD_REF <vect__1.7_28, 32, 32>;
>   _36 = BIT_FIELD_REF <vect__3.11_33, 32, 32>;
>   _37 = _30 == _36 ? -1 : 0;
>   _34 = {_29, _37};
>   vect_iftmp.12_35 = VEC_COND_EXPR <_34, vect__1.7_28, vect__2.10_31>;
> 
> which is undesired. So similarly to isel we need to mark all SSA_NAMEs that are
> first args of a VEC_COND_EXPR and ignore these from vect lowering.
> Richi?

We can't ignore them unless VEC_COND_EXPR lowering will process them.
That is, we have to check whether we can expand all instances of the
compares.  This basically means we need to run "isel" on them but
not actually commit the IL change but instead lower all cases we
could not process.  The question is what to do about for example

    _34 = vect__1.7_28 == vect__3.11_33;
    vect_iftmp.12_35 = VEC_COND_EXPR <_34, vect__1.7_28, vect__2.10_31>;
    foo (_34);  

where we can ISEL the VEC_COND_EXPR together with _34 but _34 is
live anyway.  Do we want to both lower _34 (for the use in foo)
and keep it (for the purpose of VEC_COND_EXPR expansion)?  I guess so.
OTOH if the target an expand VEC_COND_EXPR <_1 == _2, ...>
then it can expand _1 == _2 as VEC_COND_EXPR <_1 == _2, {-1,-1,-1}, 
{0,0,0}> so this is exactly the case why I thought applying ISEL
on both together makes sense.  Looks like it actually happens ...

Which means we don't actually need to lower the compare since
we can expand it as VEC_COND_EXPR?

  parent reply	other threads:[~2020-06-26 11:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23  3:35 [Bug regression/95830] New: [10 " paul.hua.gm at gmail dot com
2020-06-23  3:37 ` [Bug regression/95830] [11 " paul.hua.gm at gmail dot com
2020-06-23  7:00 ` [Bug middle-end/95830] " rguenth at gcc dot gnu.org
2020-06-23 19:26 ` marxin at gcc dot gnu.org
2020-06-25  7:02 ` cvs-commit at gcc dot gnu.org
2020-06-25  7:02 ` marxin at gcc dot gnu.org
2020-06-26  8:54 ` paul.hua.gm at gmail dot com
2020-06-26 11:12 ` marxin at gcc dot gnu.org
2020-06-26 11:22 ` rguenther at suse dot de [this message]
2020-06-26 11:22 ` rguenth at gcc dot gnu.org
2020-06-29 11:41 ` marxin at gcc dot gnu.org
2020-07-02 10:42 ` cvs-commit at gcc dot gnu.org
2020-07-02 10:50 ` marxin 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-95830-4-CdcGEjGZfp@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).