public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/115214] New: tree-ssa-pre.c(ICE in find_or_generate_expression, at tree-ssa-pre.c:2780)
@ 2024-05-24 13:14 jiawei at iscas dot ac.cn
  2024-05-27  6:53 ` [Bug tree-optimization/115214] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: jiawei at iscas dot ac.cn @ 2024-05-24 13:14 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115214
           Summary: tree-ssa-pre.c(ICE in find_or_generate_expression, at
                    tree-ssa-pre.c:2780)
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jiawei at iscas dot ac.cn
  Target Milestone: ---

We got an ICE when compile this C code use gcc-14 on RISC-V target,see
https://godbolt.org/z/WE9aGYvoo


```
#include <riscv_vector.h>

static inline __attribute__(()) int vaddq_f32();
static inline __attribute__(()) int vload_tillz_f32(int nlane) {
  vint32m1_t __trans_tmp_9;
  {
    int __trans_tmp_0 = nlane;
    {
      vint64m1_t __trans_tmp_1;
      vint64m1_t __trans_tmp_2;
      vint64m1_t __trans_tmp_3;
      vint64m1_t __trans_tmp_4;
      if (__trans_tmp_0 == 1) {
        {
          __trans_tmp_3 =
              __riscv_vslideup_vx_i64m1(__trans_tmp_1, __trans_tmp_2, 1, 2);
        }
        __trans_tmp_4 = __trans_tmp_2;
      }
      __trans_tmp_4 = __trans_tmp_3;
      __trans_tmp_9 = __riscv_vreinterpret_v_i64m1_i32m1(__trans_tmp_3);
    }
  }
  return vaddq_f32(__trans_tmp_9);
}

char CFLOAT_add_args[3];
const int *CFLOAT_add_steps;
const int CFLOAT_steps;

__attribute__(()) void CFLOAT_add() {
  char *b_src0 = &CFLOAT_add_args[0], *b_src1 = &CFLOAT_add_args[1],
       *b_dst = &CFLOAT_add_args[2];
  const float *src1 = (float *)b_src1;
  float *dst = (float *)b_dst;
  const int ssrc1 = CFLOAT_add_steps[1] / sizeof(float);
  const int sdst = CFLOAT_add_steps[2] / sizeof(float);
  const int hstep = 4 / 2;
  vfloat32m1x2_t a;
  int len = 255;
  for (; len > 0; len -= hstep, src1 += 4, dst += 4) {
    int b = vload_tillz_f32(len);
    int r = vaddq_f32(a.__val[0], b);
  }
  for (; len > 0; --len, b_src0 += CFLOAT_steps,
                  b_src1 += CFLOAT_add_steps[1], b_dst += CFLOAT_add_steps[2])
    ;
}
```

Reports as a bug following Richard Biener's suggestion
https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652641.html

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

* [Bug tree-optimization/115214] tree-ssa-pre.c(ICE in find_or_generate_expression, at tree-ssa-pre.c:2780)
  2024-05-24 13:14 [Bug c/115214] New: tree-ssa-pre.c(ICE in find_or_generate_expression, at tree-ssa-pre.c:2780) jiawei at iscas dot ac.cn
@ 2024-05-27  6:53 ` rguenth at gcc dot gnu.org
  2024-05-28  7:23 ` jiawei at iscas dot ac.cn
  2024-05-29 17:22 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-05-27  6:53 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
                 CC|                            |rguenth at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-05-27

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.

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

* [Bug tree-optimization/115214] tree-ssa-pre.c(ICE in find_or_generate_expression, at tree-ssa-pre.c:2780)
  2024-05-24 13:14 [Bug c/115214] New: tree-ssa-pre.c(ICE in find_or_generate_expression, at tree-ssa-pre.c:2780) jiawei at iscas dot ac.cn
  2024-05-27  6:53 ` [Bug tree-optimization/115214] " rguenth at gcc dot gnu.org
@ 2024-05-28  7:23 ` jiawei at iscas dot ac.cn
  2024-05-29 17:22 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jiawei at iscas dot ac.cn @ 2024-05-28  7:23 UTC (permalink / raw)
  To: gcc-bugs

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

jiawei <jiawei at iscas dot ac.cn> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #2 from jiawei <jiawei at iscas dot ac.cn> ---
Fixed on upstream. 

https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652806.html

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

* [Bug tree-optimization/115214] tree-ssa-pre.c(ICE in find_or_generate_expression, at tree-ssa-pre.c:2780)
  2024-05-24 13:14 [Bug c/115214] New: tree-ssa-pre.c(ICE in find_or_generate_expression, at tree-ssa-pre.c:2780) jiawei at iscas dot ac.cn
  2024-05-27  6:53 ` [Bug tree-optimization/115214] " rguenth at gcc dot gnu.org
  2024-05-28  7:23 ` jiawei at iscas dot ac.cn
@ 2024-05-29 17:22 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-05-29 17:22 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |15.0

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

end of thread, other threads:[~2024-05-29 17:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-24 13:14 [Bug c/115214] New: tree-ssa-pre.c(ICE in find_or_generate_expression, at tree-ssa-pre.c:2780) jiawei at iscas dot ac.cn
2024-05-27  6:53 ` [Bug tree-optimization/115214] " rguenth at gcc dot gnu.org
2024-05-28  7:23 ` jiawei at iscas dot ac.cn
2024-05-29 17:22 ` pinskia at gcc dot gnu.org

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