public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kilian Verhetsel <kilian.verhetsel@uclouvain.be>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Richard Biener <richard.guenther@gmail.com>,
	Alan Hayward <Alan.Hayward@arm.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>, nd <nd@arm.com>
Subject: Re: [PATCH] Fix result for conditional reductions matching at index 0
Date: Mon, 11 Dec 2017 17:00:00 -0000	[thread overview]
Message-ID: <87o9n5kxno.fsf@uclouvain.be> (raw)
In-Reply-To: <20171211135150.GM2353@tucnak>


Jakub Jelinek <jakub@redhat.com> writes:
> Of course it can be done efficiently, what we care most is that the body of
> the vectorized loop is efficient.

That's fair, I was looking at the x86 assembly being generated when a single
vectorized iteration was enough (because that is the context in which I
first encountered this bug):

    int f(unsigned int *x, unsigned int k) {
      unsigned int result = 8;
      for (unsigned int i = 0; i < 8; i++) {
        if (x[i] == k) result = i;
      }
      return result;
    }

where the vpand instruction this generates would have to be replaced
with a variable blend if the default value weren't 0 — although I had
not realized even SSE4.1 on x86 includes such an instruction, making
this point less relevant.

> Thanks, it applies cleanly now
> > +  else if ((STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) == COND_REDUCTION
> > +	    || (STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info)
> > +		== INTEGER_INDUC_COND_REDUCTION))
> > +	   && reduc_fn == IFN_LAST)»
>
> contains a character at the end of line that makes it not to compile.

My bad, I must have added this when I opened the patch file itself to
inspect it...

> Another thing is, as your patch is quite large, we need a copyright
> assignment for the changes before we can accept it, see
> https://gcc.gnu.org/contribute.html for details.
>
> If you are already covered by an assignment of some company, please tell
> us which one it is, otherwise contact us and we'll get you the needed
> forms.

I am not covered by any copyright assignment yet. Do I need to send you
any additional information?

  reply	other threads:[~2017-12-11 17:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-21 11:41 Kilian Verhetsel
2017-11-21 14:06 ` Richard Biener
2017-11-21 16:49   ` Kilian Verhetsel
2017-11-21 17:09     ` Alan Hayward
2017-11-22  9:17     ` Richard Biener
2017-11-22 11:15       ` Alan Hayward
2017-11-22 15:07         ` Richard Biener
2017-11-22 17:23           ` Kilian Verhetsel
2017-11-23 10:30             ` Alan Hayward
2017-11-23 12:39               ` Richard Biener
2017-12-08 18:15             ` Jakub Jelinek
2017-12-11 10:57               ` Kilian Verhetsel
2017-12-11 13:11                 ` Jakub Jelinek
2017-12-11 13:51                   ` Jakub Jelinek
2017-12-11 17:00                     ` Kilian Verhetsel [this message]
2017-12-11 17:06                       ` Jakub Jelinek
2017-12-11 21:22                       ` [PATCH] Fix result for conditional reductions matching at index 0 (PR tree-optimization/80631) Jakub Jelinek
2017-12-12  7:57                         ` Richard Biener

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=87o9n5kxno.fsf@uclouvain.be \
    --to=kilian.verhetsel@uclouvain.be \
    --cc=Alan.Hayward@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=nd@arm.com \
    --cc=richard.guenther@gmail.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).