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

--- Comment #6 from Li Pan <pan2.li at intel dot com> ---
526.blender_r is quite long to tell, will leverage below code to investigate
which can reproduce this issue too.

   1   │ int *b;
   2   │ inline void c(char *d, int e) {
   3   │   d[0] = 0;
   4   │   d[1] = e;
   5   │ }
   6   │ void f();
   7   │ void h() {
   8   │   for (;;) {
   9   │     char *a;
  10   │     long g = 8;
  11   │     while (g) {
  12   │       c(a, *b);
  13   │       b++;
  14   │       a += 2;
  15   │       g--;
  16   │     }
  17   │     f();
  18   │   }
  19   │ }

../__RV64/bin/riscv64-unknown-elf-gcc test.c -ftree-vectorize
-march=rv64gcvb_zvl256b -O2 -c -S -o -

        .file   "test.c"
        .option nopic
        .attribute arch,
"rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_b1p0_v1p0_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0_zca1p0_zcd1p0_zba1p0_zbb1p0_zbs1p0_zve32f1p0_zve32x1p0_zve64d1p0_zve64f1p0_zve64x1p0_zvl128b1p0_zvl256b1p0_zvl32b1p0_zvl64b1p0"
        .attribute unaligned_access, 0
        .attribute stack_align, 16
        .text
----------- panli found out of range access rtl => (insn 117 116 121 3 (set
(reg:V8QI 97 v1 [223])
        (lshiftrt:V8QI (reg:V8QI 97 v1 [222])
            (const_int 1 [0x1]))) 24734 {lshrv8qi3}
     (nil))
during RTL pass: vsetvl
test.c: In function ‘h’:
test.c:19:1: internal compiler error: Segmentation fault
   19 | }
      | ^
0x44d0471 internal_error(char const*, ...)
       
/home/pli/gcc/444/riscv-gnu-toolchain/gcc/__RISC-V_BUILD__/../gcc/diagnostic-global-context.cc:517
0x1bc7ba1 crash_signal
       
/home/pli/gcc/444/riscv-gnu-toolchain/gcc/__RISC-V_BUILD__/../gcc/toplev.cc:322
0x774b5c04531f ???
        ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x22e24cb riscv_vector::vlmax_avl_type_p(rtx_insn*)
       
/home/pli/gcc/444/riscv-gnu-toolchain/gcc/__RISC-V_BUILD__/../gcc/config/riscv/riscv-v.cc:5184
0x22e8f6a get_avl
       
/home/pli/gcc/444/riscv-gnu-toolchain/gcc/__RISC-V_BUILD__/../gcc/config/riscv/riscv-vsetvl.cc:398
0x22f150d vsetvl_info::parse_insn(rtl_ssa::insn_info*)
       
/home/pli/gcc/444/riscv-gnu-toolchain/gcc/__RISC-V_BUILD__/../gcc/config/riscv/riscv-vsetvl.cc:1037
0x22f0a3e vsetvl_info::vsetvl_info(rtl_ssa::insn_info*)
       
/home/pli/gcc/444/riscv-gnu-toolchain/gcc/__RISC-V_BUILD__/../gcc/config/riscv/riscv-vsetvl.cc:826
0x22eb8a4 pre_vsetvl::fuse_local_vsetvl_info()
       
/home/pli/gcc/444/riscv-gnu-toolchain/gcc/__RISC-V_BUILD__/../gcc/config/riscv/riscv-vsetvl.cc:2732
0x22ef66c pass_vsetvl::lazy_vsetvl()
       
/home/pli/gcc/444/riscv-gnu-toolchain/gcc/__RISC-V_BUILD__/../gcc/config/riscv/riscv-vsetvl.cc:3549
0x22ef957 pass_vsetvl::execute(function*)
       
/home/pli/gcc/444/riscv-gnu-toolchain/gcc/__RISC-V_BUILD__/../gcc/config/riscv/riscv-vsetvl.cc:3611
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to