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

            Bug ID: 87815
           Summary: ICE in DSE with -march=armv8-a+sve while trying to
                    replace load with previously stored value
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: renlin at gcc dot gnu.org
  Target Milestone: ---

The following test case ICEs with:
-march=armv8.2-a+sve -O3 and -Ofast 

int a, b, d;
short e;
void f() {
  for (int i = 0; i < 8; i++) {
    e = b >= 2 ?: a >> b;
    d = e && b;
  }
}


test.c: In function 'f':
test.c:8:1: internal compiler error: in smallest_mode_for_size, at
stor-layout.c:355
    8 | }
      | ^
0x1048b4a smallest_mode_for_size(poly_int<2u, unsigned long>, mode_class)
        src/gcc/gcc/stor-layout.c:355
0xa1a14e smallest_int_mode_for_size(poly_int<2u, unsigned long>)
        src/gcc/gcc/machmode.h:838
0x1a93f86 find_shift_sequence
        src/gcc/gcc/dse.c:1704
0x1a9497b get_stored_val
         src/gcc/gcc/dse.c:1850
0x1a94dae replace_read
        src/gcc/gcc/dse.c:1955
0x1a958db check_mem_read_rtx
        src/gcc/gcc/dse.c:2187
0x1a95dfc check_mem_read_use
        src/gcc/gcc/dse.c:2293
0xfd0fd9 note_uses(rtx_def**, void (*)(rtx_def**, void*), void*)
        src/gcc/gcc/rtlanal.c:2005
0x1a9660d scan_insn
        src/gcc/gcc/dse.c:2401
0x1a972f3 dse_step1
        src/gcc/gcc/dse.c:2659
0x1a9968b rest_of_handle_dse
        src/gcc/gcc/dse.c:3576
0x1a9981e execute
        src/gcc/gcc/dse.c:3634
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to