public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Ilya Enkovich <enkovich.gnu@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fix ICE for boolean comparison
Date: Fri, 13 Nov 2015 11:28:00 -0000	[thread overview]
Message-ID: <CAFiYyc3sOF-Rtu_4x=AsQz_1uzKLL4i8rajEjCKYNQj_db29-A@mail.gmail.com> (raw)
In-Reply-To: <CAMbmDYb4h_MMvKnioEthkdzVV5nJq9PNG+kSTG=CqOVeOtcTGg@mail.gmail.com>

On Fri, Nov 13, 2015 at 11:52 AM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
> 2015-11-13 13:38 GMT+03:00 Richard Biener <richard.guenther@gmail.com>:
>> On Thu, Nov 12, 2015 at 4:44 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
>>> Hi,
>>>
>>> Currently compiler may ICE when loaded boolean is compared with vector invariant or another boolean value.  This is because we don't detect mix of bool and non-bool vectypes and incorrectly determine vectype for boolean loop invariant for comparison.  This was fixed for COND_EXP before but also needs to be fixed for comparison.  This patch was bootstrapped and tested on x86_64-unknown-linux-gnu.  OK for trunk?
>>
>> Hmm, so this disables vectorization in these cases.  Isn't this a
>> regression?  Shouldn't we simply "materialize"
>> the non-bool vector from the boolean one say, with
>>
>>  vec = boolvec ? {-1, -1 ... } : {0, 0, 0 ...}
>
> We may do this using patterns, but still should catch cases when
> patterns don't catch it. Patterns don't have vectypes computed and
> therefore may miss such cases. Thus stability fix is still valid.
>
> I don't think we have a compiler version which can vectorize
> simd-bool-comparison-2.cc, thus technically it is not a regression.
> There are also other similar cases, e.g. store of comparison result or
> use loaded boolean as a predicate. I was going to support
> vectorization for such cases later (seems I don't hit stage1 for them
> and not sure if it will be OK for stage3).

I still think those checks show that there is an issue we should fix
differently.  We're accumulating more mess into the already messy
vectorizer :(

Ok.

Thanks,
Richard.

> Ilya
>
>>
>> ?
>>
>> Thanks,
>> Richard.
>>
>>> Thanks,
>>> Ilya

  reply	other threads:[~2015-11-13 11:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-12 15:46 Ilya Enkovich
2015-11-13 10:38 ` Richard Biener
2015-11-13 10:52   ` Ilya Enkovich
2015-11-13 11:28     ` Richard Biener [this message]
2015-11-13 11:32       ` Ilya Enkovich

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='CAFiYyc3sOF-Rtu_4x=AsQz_1uzKLL4i8rajEjCKYNQj_db29-A@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=enkovich.gnu@gmail.com \
    --cc=gcc-patches@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).