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

            Bug ID: 105927
           Summary: ICE: RTL check: expected code 'reg', have 'mem' in
                    rhs_regno, at rtl.h:1932 with -mtune=k6-3 -msse
           Product: gcc
           Version: 13.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: x86_64-pc-linux-gnu

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

Compiler output:
$ 
x86_64-pc-linux-gnu-gcc -O1 -fno-tree-dce -mtune=k6-3 -msse -m32 testcase.c 
during RTL pass: combine
testcase.c: In function 'foo':
testcase.c:14:1: internal compiler error: RTL check: expected code 'reg', have
'mem' in rhs_regno, at rtl.h:1932
   14 | }
      | ^
0x772c50 rtl_check_failed_code1(rtx_def const*, rtx_code, char const*, int,
char const*)
        /repo/gcc-trunk/gcc/rtl.cc:916
0xac528d rhs_regno
        /repo/gcc-trunk/gcc/rtl.h:1932
0xac6013 rhs_regno
        /repo/gcc-trunk/gcc/config/i386/predicates.md:699
0xac6013 register_no_elim_operand_1
        /repo/gcc-trunk/gcc/config/i386/predicates.md:677
0xac6013 register_no_elim_operand(rtx_def*, machine_mode)
        /repo/gcc-trunk/gcc/config/i386/predicates.md:685
0xac6013 nonmemory_no_elim_operand(rtx_def*, machine_mode)
        /repo/gcc-trunk/gcc/config/i386/predicates.md:710
0x2041a01 recog_9
        /repo/gcc-trunk/gcc/config/i386/i386.md:3675
0x225d3ca recog_14
        /repo/gcc-trunk/gcc/config/i386/i386.md:1086
0x22dd73d recog_330
        /repo/gcc-trunk/gcc/config/i386/sse.md:28926
0x2307381 recog_for_combine_1
        /repo/gcc-trunk/gcc/combine.cc:11352
0x230e42e recog_for_combine
        /repo/gcc-trunk/gcc/combine.cc:11622
0x2320776 try_combine
        /repo/gcc-trunk/gcc/combine.cc:3543
0x2328674 combine_instructions
        /repo/gcc-trunk/gcc/combine.cc:1287
0x2328674 rest_of_handle_combine
        /repo/gcc-trunk/gcc/combine.cc:14976
0x2328674 execute
        /repo/gcc-trunk/gcc/combine.cc:15021
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-r13-1049-20220611004016-gfddb7f65129-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/13.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
--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-r13-1049-20220611004016-gfddb7f65129-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.0.0 20220611 (experimental) (GCC)

Reply via email to