public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/111337] New: ICE in gimple-isel.cc for RISC-V port
@ 2023-09-08  8:39 juzhe.zhong at rivai dot ai
  2023-09-08 14:55 ` [Bug c/111337] " rdapp at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: juzhe.zhong at rivai dot ai @ 2023-09-08  8:39 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111337
           Summary: ICE in gimple-isel.cc for RISC-V port
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: juzhe.zhong at rivai dot ai
  Target Milestone: ---

This following case cause ICE:

extern unsigned char a [150];
extern unsigned char b [150];
extern unsigned char c [150];
extern unsigned char d [150];
extern unsigned char e [150];

void foo () {
  for (int i = 92; i <= 141; i += 2) {
    int tmp = (d [i] && b [i]) <= (a [i] > c [i]);
    e [i] = tmp >> b [i];
  }
}

auto.c:7:6: internal compiler error: in gimple_expand_vec_cond_expr, at
gimple-isel.cc:284
    7 | void foo () {
      |      ^~~
0x1a9e309 gimple_expand_vec_cond_expr
        ../../../../gcc/gcc/gimple-isel.cc:283
0x1a9ea56 execute
        ../../../../gcc/gcc/gimple-isel.cc:390


Bause of this piece of code:
          gcc_assert (GET_MODE_CLASS (TYPE_MODE (TREE_TYPE (op0)))
                      == MODE_VECTOR_INT);

The statement cause such assertion FAIL was produced by "vrp2":

Before auto.c.202t.vrp2:

  mask__5.33_165 = vect__3.26_157 > vect__4.31_163;
  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;
  mask__7.36_170 = vect_patt_68.35_169 >= vect_patt_66.22_152;
  vect_patt_69.37_173 = VEC_COND_EXPR <mask__7.36_170, { 1, ... }, { 0, ... }>;
  vect_patt_70.38_174 = (vector([4,4]) unsigned char) vect_patt_69.37_173;
  vect_patt_71.39_176 = MIN_EXPR <vect_pretmp_43.16_142, { 7, ... }>;
  vect_patt_72.40_177 = vect_patt_70.38_174 >> vect_patt_71.39_176;
  .MASK_LEN_SCATTER_STORE (vectp_e.42_181, { 0, 2, 4, ... }, 1,
vect_patt_72.40_177, { -1, ... }, _186, 0);

auto.c.202t.vrp2:

  mask__5.33_165 = vect__3.26_157 > vect__4.31_163;
  vect_patt_67.34_168 = VEC_COND_EXPR <mask__5.33_165, { 1, ... }, { 0, ... }>;
  vect_patt_68.35_169 = VEC_COND_EXPR <mask__5.33_165, { 1, ... }, { 0, ... }>;
  mask__7.36_170 = VEC_COND_EXPR <mask__47.20_148, mask__5.33_165, { -1, ...
}>;
  vect_patt_69.37_173 = VEC_COND_EXPR <mask__7.36_170, { 1, ... }, { 0, ... }>;
  vect_patt_70.38_174 = VEC_COND_EXPR <mask__7.36_170, { 1, ... }, { 0, ... }>;
  vect_patt_71.39_176 = MIN_EXPR <vect_pretmp_43.16_142, { 7, ... }>;
  vect_patt_72.40_177 = vect_patt_70.38_174 >> vect_patt_71.39_176;
  .MASK_LEN_SCATTER_STORE (vectp_e.42_181, { 0, 2, 4, ... }, 1,
vect_patt_72.40_177, { -1, ... }, _186, 0);

There is a odd STMT here:

mask__7.36_170 = VEC_COND_EXPR <mask__47.20_148, mask__5.33_165, { -1, ... }>;

It seems that it should be logical operations of MASK?

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-09-12 22:15 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-08  8:39 [Bug c/111337] New: ICE in gimple-isel.cc for RISC-V port 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
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

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).