public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/111751] RISC-V: RVV unexpected vectorization
Date: Tue, 10 Oct 2023 11:49:39 +0000 [thread overview]
Message-ID: <bug-111751-4-b1Rv1tGOYS@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111751-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111751
--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to JuzheZhong from comment #14)
> Also this case ICE:
>
> typedef unsigned char __attribute__((vector_size(4))) uvec;
>
> int main (int argc, char *argv[]) {
> int i;
> int x = 0;
> uvec uc0 = (uvec) {argc, 1, 2, 10};
> unsigned char uc1[4] = {0, 3, 2, 200};
> signed char ucg[4] = {1, 0, 0, 0 };
> signed char ucl[4] = {0, 1, 0, 1 };
>
> #define uc0_ ((unsigned char *)&uc0)
>
> for (i = 0; i < 4; i ++) {
> x |= ucg[i] != (uc0_[i] > uc1[i]);
> x |= ucl[i] != (uc0_[i] < uc1[i]);
> }
> return x;
> }
>
> during GIMPLE pass: isel
> dump file: auto.c.256t.isel
> auto.c: In function 'main':
> auto.c:3:5: internal compiler error: in gimple_expand_vec_cond_expr, at
> gimple-isel.cc:328
> 3 | int main (int argc, char *argv[]) {
> | ^~~~
> 0x1bb55bd gimple_expand_vec_cond_expr
> ../../../../gcc/gcc/gimple-isel.cc:325
> 0x1bb57c6 execute
> ../../../../gcc/gcc/gimple-isel.cc:390
>
>
> Looks odd, it ICE at gimple-isel.cc:
>
> gcc_assert (VECTOR_BOOLEAN_TYPE_P (TREE_TYPE (op0))
I have a fix for the first issue. For this one the issue seems to be that
we do have vec_cmp for _2 > { 0, 3, 2, 200 } when doing instruction
selection for
mask__11.18_97 = VEC_COND_EXPR <mask__9.15_92, { 0, -1, -1, -1 }, { -1, 0, 0, 0
}>;
note the value is of vector boolean type. But we fail to have
vcond_maskV4BIV4BI.
ISTR we have fixed sth similar
by adding missing patterns with VnBImode result? But maybe forgot about
VLS modes here?
next prev parent reply other threads:[~2023-10-10 11:49 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-10 3:19 [Bug c/111751] New: " juzhe.zhong at rivai dot ai
2023-10-10 3:35 ` [Bug tree-optimization/111751] " pinskia at gcc dot gnu.org
2023-10-10 3:35 ` pinskia at gcc dot gnu.org
2023-10-10 3:36 ` pinskia at gcc dot gnu.org
2023-10-10 3:41 ` pinskia at gcc dot gnu.org
2023-10-10 3:51 ` juzhe.zhong at rivai dot ai
2023-10-10 3:55 ` pinskia at gcc dot gnu.org
2023-10-10 4:00 ` juzhe.zhong at rivai dot ai
2023-10-10 9:09 ` rguenth at gcc dot gnu.org
2023-10-10 9:24 ` juzhe.zhong at rivai dot ai
2023-10-10 9:32 ` rguenther at suse dot de
2023-10-10 10:38 ` cvs-commit at gcc dot gnu.org
2023-10-10 10:50 ` rguenth at gcc dot gnu.org
2023-10-10 11:17 ` juzhe.zhong at rivai dot ai
2023-10-10 11:23 ` juzhe.zhong at rivai dot ai
2023-10-10 11:40 ` juzhe.zhong at rivai dot ai
2023-10-10 11:49 ` rguenth at gcc dot gnu.org [this message]
2023-10-10 11:50 ` cvs-commit at gcc dot gnu.org
2023-10-10 11:56 ` juzhe.zhong at rivai dot ai
2023-10-10 12:20 ` cvs-commit at gcc dot gnu.org
2023-10-10 12:22 ` cvs-commit at gcc dot gnu.org
2023-10-10 12:47 ` juzhe.zhong at rivai dot ai
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-111751-4-b1Rv1tGOYS@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).