From: Ilya Enkovich <enkovich.gnu@gmail.com>
To: Andreas Schwab <schwab@suse.de>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>, law@redhat.com
Subject: Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type
Date: Thu, 22 Oct 2015 16:24:00 -0000 [thread overview]
Message-ID: <20151022162105.GB23452@msticlxl57.ims.intel.com> (raw)
In-Reply-To: <mvm7fmfmbnv.fsf@hawking.suse.de>
On 22 Oct 12:37, Andreas Schwab wrote:
> Ilya Enkovich <enkovich.gnu@gmail.com> writes:
>
> > 2015-10-22 13:13 GMT+03:00 Andreas Schwab <schwab@suse.de>:
> >> FAIL: gcc.c-torture/compile/pr54713-1.c -O0 (internal compiler error)
> >
> > Can't reproduce it on i386. What's config used?
>
> http://gcc.gnu.org/ml/gcc-testresults/2015-10/msg02350.html
> http://gcc.gnu.org/ml/gcc-testresults/2015-10/msg02361.html
> http://gcc.gnu.org/ml/gcc-testresults/2015-10/msg02396.html
>
> Andreas.
>
> --
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."
Thanks!
The problem is in wrong mboolean vector size in case target cannot provide a mode for it. I tested it on i386 with vector extension switched off, but with extensions off vector modes still exist, thus I missed this case. Here is a patch to fix it. Bootstrapped and regtested on powerpc64le-unknown-linux-gnu. I see disappeared fails:
gcc.c-torture/compile/pr54713-2.c -O0 (test for excess errors)
gcc.c-torture/compile/pr54713-3.c -O0 (test for excess errors)
I believe other targets should be fixed as well.
Thanks,
Ilya
--
gcc/
2015-10-22 Ilya Enkovich <enkovich.gnu@gmail.com>
* tree.c (build_truth_vector_type): Support BLK mode
returned for boolean vector.
diff --git a/gcc/tree.c b/gcc/tree.c
index 7d10dd6..836b69a 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -10654,8 +10654,12 @@ build_truth_vector_type (unsigned nunits, unsigned vector_size)
gcc_assert (mask_mode != VOIDmode);
- unsigned HOST_WIDE_INT esize = GET_MODE_BITSIZE (mask_mode) / nunits;
- gcc_assert (esize * nunits == GET_MODE_BITSIZE (mask_mode));
+ unsigned HOST_WIDE_INT vsize = GET_MODE_BITSIZE (mask_mode);
+ if (!vsize)
+ vsize = vector_size * BITS_PER_UNIT;
+
+ unsigned HOST_WIDE_INT esize = vsize / nunits;
+ gcc_assert (esize * nunits == vsize);
tree bool_type = build_nonstandard_boolean_type (esize);
next prev parent reply other threads:[~2015-10-22 16:21 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 [this message]
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
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=20151022162105.GB23452@msticlxl57.ims.intel.com \
--to=enkovich.gnu@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=law@redhat.com \
--cc=schwab@suse.de \
/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).