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

            Bug ID: 113048
           Summary: [13/14 Regression] ICE: in lra_split_hard_reg_for, at
                    lra-assigns.cc:1862 (unable to find a register to
                    spill) {*andndi3_doubleword_bmi} with
                    -march=cascadelake
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: i686-pc-linux-gnu

Created attachment 56893
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56893&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O1 -march=cascadelake -m32 -fwrapv testcase.c 
testcase.c: In function 'foo0':
testcase.c:13:49: warning: division by zero [-Wdiv-by-zero]
   13 |     (~s64_0 & (0xfb5856dd8a4d4702 & foo0_s16_0) / 0) * u8_1;
      |                                                 ^
testcase.c:22:1: error: unable to find a register to spill
   22 | }
      | ^
testcase.c:22:1: error: this is the insn:
(insn 34 99 109 2 (parallel [
            (set (reg:DI 209 [159])
                (and:DI (not:DI (reg/v:DI 187 [orig:144 s64_0 ] [144]))
                    (reg:DI 199 [182])))
            (clobber (reg:CC 17 flags))
        ]) "testcase.c":13:13 703 {*andndi3_doubleword_bmi}
     (expr_list:REG_DEAD (reg:DI 199 [182])
        (expr_list:REG_DEAD (reg/v:DI 187 [orig:144 s64_0 ] [144])
            (expr_list:REG_UNUSED (reg:CC 17 flags)
                (nil)))))
during RTL pass: reload
testcase.c:22:1: internal compiler error: in lra_split_hard_reg_for, at
lra-assigns.cc:1862
0x8035ef _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        /repo/gcc-trunk/gcc/rtl-error.cc:108
0x12f42dd lra_split_hard_reg_for()
        /repo/gcc-trunk/gcc/lra-assigns.cc:1862
0x12ed9f8 lra(_IO_FILE*, int)
        /repo/gcc-trunk/gcc/lra.cc:2518
0x129badf do_reload
        /repo/gcc-trunk/gcc/ira.cc:5973
0x129badf execute
        /repo/gcc-trunk/gcc/ira.cc:6161
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.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-6619-20231216150950-g39f9c426f58-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-6619-20231216150950-g39f9c426f58-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231216 (experimental) (GCC)

Reply via email to