public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "juzhe.zhong at rivai dot ai" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/111337] ICE in gimple-isel.cc for RISC-V port
Date: Tue, 12 Sep 2023 11:49:50 +0000	[thread overview]
Message-ID: <bug-111337-4-LaWIV37cH3@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111337-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111337

--- Comment #3 from JuzheZhong <juzhe.zhong at rivai dot ai> ---
(In reply to Richard Biener from comment #2)
>   vect_patt_67.34_168 = VEC_COND_EXPR <mask__5.33_165, { 1, ... }, { 0, ...
> }>;
>   vect_patt_68.35_169 = (vector([4,4]) int) vect_patt_67.34_168;
> 
> ->
> 
>   vect_patt_68.35_169 = VEC_COND_EXPR <mask__5.33_165, { 1, ... }, { 0, ...
> }>;
> 
> this one looks odd - it's probably
> 
> /* Sink unary conversions to branches, but only if we do fold both 
>    and the target's truth type is the same as we already have.  */
> (simplify
>  (convert (vec_cond:s @0 @1 @2))
>  (if (VECTOR_TYPE_P (type) 
>       && types_match (TREE_TYPE (@0), truth_type_for (type)))
>   (vec_cond @0 (convert! @1) (convert! @2)))) 
> 
> the problem is that this happily produces a vec_cond we might not be able
> to expand - having the same truth type for the data type isn't enough
> if there's no optab with a matching data mode.  Same for the view_convert
> case.
> 
> It's a bit convoluted to ask for target support here, can you double-check
> it isn't possible to add native riscv expanders for the missing case?

You mean support(In reply to Richard Biener from comment #2)
>   vect_patt_67.34_168 = VEC_COND_EXPR <mask__5.33_165, { 1, ... }, { 0, ...
> }>;
>   vect_patt_68.35_169 = (vector([4,4]) int) vect_patt_67.34_168;
> 
> ->
> 
>   vect_patt_68.35_169 = VEC_COND_EXPR <mask__5.33_165, { 1, ... }, { 0, ...
> }>;
> 
> this one looks odd - it's probably
> 
> /* Sink unary conversions to branches, but only if we do fold both 
>    and the target's truth type is the same as we already have.  */
> (simplify
>  (convert (vec_cond:s @0 @1 @2))
>  (if (VECTOR_TYPE_P (type) 
>       && types_match (TREE_TYPE (@0), truth_type_for (type)))
>   (vec_cond @0 (convert! @1) (convert! @2)))) 
> 
> the problem is that this happily produces a vec_cond we might not be able
> to expand - having the same truth type for the data type isn't enough
> if there's no optab with a matching data mode.  Same for the view_convert
> case.
> 
> It's a bit convoluted to ask for target support here, can you double-check
> it isn't possible to add native riscv expanders for the missing case?

You mean we should add "vcond" patterns back ?

  parent reply	other threads:[~2023-09-12 11:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-08  8:39 [Bug c/111337] New: " juzhe.zhong at rivai dot ai
2023-09-08 14:55 ` [Bug c/111337] " rdapp at gcc dot gnu.org
2023-09-12 11:37 ` [Bug middle-end/111337] " rguenth at gcc dot gnu.org
2023-09-12 11:49 ` juzhe.zhong at rivai dot ai [this message]
2023-09-12 11:58 ` rguenther at suse dot de
2023-09-12 12:17 ` juzhe.zhong at rivai dot ai
2023-09-12 12:36 ` rguenther at suse dot de
2023-09-12 12:41 ` juzhe.zhong at rivai dot ai
2023-09-12 12:45 ` rdapp at gcc dot gnu.org
2023-09-12 12:50 ` juzhe.zhong at rivai dot ai
2023-09-12 12:53 ` rdapp at gcc dot gnu.org
2023-09-12 12:55 ` juzhe.zhong at rivai dot ai
2023-09-12 13:03 ` rdapp at gcc dot gnu.org
2023-09-12 14:16 ` rsandifo at gcc dot gnu.org
2023-09-12 20:47 ` cvs-commit at gcc dot gnu.org
2023-09-12 22:15 ` 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-111337-4-LaWIV37cH3@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).