GCC modified for the FreeChainXenon project
Find a file
Jakub Jelinek b65945e7fb i386: Fix up RTL checking ICE [PR107185]
On Tue, Oct 11, 2022 at 04:03:16PM +0800, liuhongt via Gcc-patches wrote:
> gcc/ChangeLog:
>
>       * config/i386/i386.md (*notxor<mode>_1): New post_reload
>       define_insn_and_split.
>       (*notxorqi_1): Ditto.

> --- a/gcc/config/i386/i386.md
> +++ b/gcc/config/i386/i386.md
> @@ -10826,6 +10826,39 @@ (define_insn "*<code><mode>_1"
>     (set_attr "type" "alu, alu, msklog")
>     (set_attr "mode" "<MODE>")])
>
> +(define_insn_and_split "*notxor<mode>_1"
> +  [(set (match_operand:SWI248 0 "nonimmediate_operand" "=rm,r,?k")
> +     (not:SWI248
> +       (xor:SWI248
> +         (match_operand:SWI248 1 "nonimmediate_operand" "%0,0,k")
> +         (match_operand:SWI248 2 "<general_operand>" "r<i>,<m>,k"))))
> +   (clobber (reg:CC FLAGS_REG))]
> +  "ix86_binary_operator_ok (XOR, <MODE>mode, operands)"
> +  "#"
> +  "&& reload_completed"
> +  [(parallel
> +    [(set (match_dup 0)
> +       (xor:SWI248 (match_dup 1) (match_dup 2)))
> +     (clobber (reg:CC FLAGS_REG))])
> +   (set (match_dup 0)
> +     (not:SWI248 (match_dup 1)))]
> +{
> +  if (MASK_REGNO_P (REGNO (operands[0])))

This causes --enable-checking=yes,rtl,extra regression on
gcc.dg/store_merging_13.c test on x86_64-linux:
.../gcc/testsuite/gcc.dg/store_merging_13.c: In function 'f13':
.../gcc/testsuite/gcc.dg/store_merging_13.c:189:1: internal compiler error: RTL check: expected code 'reg', have 'mem' in rhs_regno, at rtl.h:1932
0x7b0c8f rtl_check_failed_code1(rtx_def const*, rtx_code, char const*, int, char const*)
        ../../gcc/rtl.cc:916
0x8e74be rhs_regno
        ../../gcc/rtl.h:1932
0x9785fd rhs_regno
        ./genrtl.h:120
0x9785fd gen_split_260(rtx_insn*, rtx_def**)
        ../../gcc/config/i386/i386.md:10846
0x23596dc split_insns(rtx_def*, rtx_insn*)
        ../../gcc/config/i386/i386.md:16392
0xfccd5a try_split(rtx_def*, rtx_insn*, int)
        ../../gcc/emit-rtl.cc:3799
0x132e9d8 split_insn
        ../../gcc/recog.cc:3384
0x13359d5 split_all_insns()
        ../../gcc/recog.cc:3488
0x1335ae8 execute
        ../../gcc/recog.cc:4412
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.

Fixed thusly.

2022-10-11  Jakub Jelinek  <jakub@redhat.com>

	PR target/107185
	* config/i386/i386.md (*notxor<mode>_1): Use MASK_REG_P (x) instead of
	MASK_REGNO_P (REGNO (x)).
2022-10-11 15:57:09 +02:00
c++tools Daily bump. 2022-03-19 00:16:22 +00:00
config Daily bump. 2022-09-01 00:17:39 +00:00
contrib Daily bump. 2022-10-08 00:17:29 +00:00
fixincludes Daily bump. 2022-10-08 00:17:29 +00:00
gcc i386: Fix up RTL checking ICE [PR107185] 2022-10-11 15:57:09 +02:00
gnattools Daily bump. 2022-09-01 00:17:39 +00:00
gotools Daily bump. 2022-08-31 00:16:45 +00:00
include Daily bump. 2022-09-28 00:17:27 +00:00
INSTALL
intl
libada Daily bump. 2022-08-26 00:16:21 +00:00
libatomic Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
libbacktrace Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
libcc1 Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
libcody Daily bump. 2022-06-04 00:16:27 +00:00
libcpp Daily bump. 2022-10-11 00:17:00 +00:00
libdecnumber Daily bump. 2022-10-08 00:17:29 +00:00
libffi Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
libgcc Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
libgfortran Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
libgo runtime: portable access to sigev_notify_thread_id 2022-09-27 09:30:23 -07:00
libgomp Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
libiberty libiberty: Demangling 'M' prefixes 2022-10-11 04:39:50 -07:00
libitm Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
libobjc Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
liboffloadmic Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
libphobos Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
libquadmath Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
libsanitizer Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
libssp Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
libstdc++-v3 Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
libvtv Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
lto-plugin Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
maintainer-scripts Daily bump. 2022-07-29 00:16:21 +00:00
zlib Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
.dir-locals.el
.gitattributes
.gitignore .gitignore: do not ignore config.h 2022-07-19 17:07:04 +03:00
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2022-10-01 00:18:00 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure Arrange to --disable-shared by default for VxWorks 2022-09-30 10:43:13 +00:00
configure.ac Arrange to --disable-shared by default for VxWorks 2022-09-30 10:43:13 +00:00
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
depcomp
install-sh
libtool-ldflags
libtool.m4 Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS Update my address and DCO entry in MAINTAINERS file 2022-09-26 09:14:55 -06:00
Makefile.def Makefile.def: drop remnants of unused libelf 2022-08-18 09:37:09 +01:00
Makefile.in Makefile.def: drop remnants of unused libelf 2022-08-18 09:37:09 +01:00
Makefile.tpl Makefile.def: drop remnants of unused libelf 2022-08-18 09:37:09 +01:00
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.