public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ilya Enkovich <enkovich.gnu@gmail.com>
To: Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Cc: Christophe Lyon <christophe.lyon@linaro.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type
Date: Wed, 28 Oct 2015 19:39:00 -0000	[thread overview]
Message-ID: <CAMbmDYa9RBBVqA0oAyPn4g6CU-1ARwpfxK2=LWtS9Lq+feJLgw@mail.gmail.com> (raw)
In-Reply-To: <1446050893.7184.0.camel@oc8801110288.ibm.com>

Seems the problem occurs in this check in expand_vector_operations_1:

  /* A scalar operation pretending to be a vector one.  */
  if (VECTOR_BOOLEAN_TYPE_P (type)
      && !VECTOR_MODE_P (TYPE_MODE (type))
      && TYPE_MODE (type) != BLKmode)
    return;

This is to filter out scalar operations on boolean vectors.
The problem here is that TYPE_MODE (type) doesn't return
V4SImode assigned to the type but calls vector_type_mode
instead which tries to find an integer mode for it and returns
TImode. This causes function exit and we don't expand vector
comparison.

Suppose simple option to fix it is to change default get_mask_mode
hook to return BLKmode in case chosen integer vector mode is not
vector_mode_supported_p.

Thanks,
Ilya

2015-10-28 19:48 GMT+03:00 Bill Schmidt <wschmidt@linux.vnet.ibm.com>:
> On Wed, 2015-10-28 at 14:44 +0100, Christophe Lyon wrote:
>> Hi,
>>
>> Since r229128, I see:
>> FAIL: c-c++-common/torture/vector-compare-1.c   -O0  execution test
>> on arm targets, such as arm-none-eabi.
>
> Likewise for powerpc64le-linux-gnu.  The test produces:
>
> 0 != ((1.000000 > 0.000000 ? -1 : 0) FAIL: c-c++-common/torture/vector-compare-1
> .c   -O0  execution test
>
>>
>> Christophe.
>>
>
>

  reply	other threads:[~2015-10-28 19:37 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-02 13:59 Ilya Enkovich
2015-10-09 20:43 ` Jeff Law
2015-10-13 13:17   ` Ilya Enkovich
2015-10-13 13:17   ` Richard Biener
2015-10-13 13:35     ` Ilya Enkovich
2015-10-22 10:24 ` Andreas Schwab
2015-10-22 10:35   ` Ilya Enkovich
2015-10-22 10:51     ` Andreas Schwab
2015-10-22 16:24       ` Ilya Enkovich
2015-10-22 16:45         ` Jeff Law
2015-10-23  9:43         ` Richard Biener
2015-10-23 11:13           ` Ilya Enkovich
2015-10-23 12:57             ` Richard Biener
2015-10-28 13:55               ` Christophe Lyon
2015-10-28 16:54                 ` Bill Schmidt
2015-10-28 19:39                   ` Ilya Enkovich [this message]
2015-10-29 13:13                     ` Ilya Enkovich
2015-11-02 19:41                       ` Jeff Law
2015-11-03 11:26                         ` Richard Biener
2015-11-03 13:42                           ` Jeff Law
2015-11-03 16:02                       ` Jeff Law
2015-10-28 14:57 ` James Greenhalgh

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='CAMbmDYa9RBBVqA0oAyPn4g6CU-1ARwpfxK2=LWtS9Lq+feJLgw@mail.gmail.com' \
    --to=enkovich.gnu@gmail.com \
    --cc=christophe.lyon@linaro.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=wschmidt@linux.vnet.ibm.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).