Go to file
Philipp Tomsich bc6beecb4d RISC-V: Use bseti/bclri/binvi to extend reach of ori/andi/xori
Sequences of the form "a | C" and "a ^ C" with C being the positive
half of a signed immediate's range with one extra bit set in addition
are mapped to ori/xori and one bseti/binvi to avoid using a temporary
(and a multi-insn sequence to load C into that temporary).

Something similar holds for "a & ~C" being representable as either
bclri + bclri or bclri + andi.

gcc/ChangeLog:

	* config/riscv/bitmanip.md (*<or_optab>i<mode>_extrabit):
	New pattern for binvi+binvi/xori and bseti+bseti/ori
	(*andi<mode>_extrabit): New pattern for bclri+bclri/andi
	* config/riscv/iterators.md (any_or): Match or and ior
	* config/riscv/predicates.md (const_twobits_operand):
	New predicate.
	(uimm_extra_bit_operand): New predicate.
	(uimm_extra_bit_or_twobits): New predicate.
	(not_uimm_extra_bit_operand): New predicate.
	(not_uimm_extra_bit_or_nottwobits): New predicate.
	* config/riscv/riscv.h (UIMM_EXTRA_BIT_OPERAND):
	Helper for the uimm_extra_bit_operand and
	not_uimm_extra_bit_operand predicates.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/zbs-bclri.c: Rename
	* gcc.target/riscv/zbs-bclri-01.c: Renamed from above.
	* gcc.target/riscv/zbs-bclri-02.c: New test.
	* gcc.target/riscv/zbs-binvi.c: New test.
	* gcc.target/riscv/zbs-bseti.c: New test.
2022-11-18 21:16:56 +01:00
c++tools
config Daily bump. 2022-11-15 08:32:29 +00:00
contrib Daily bump. 2022-11-18 18:09:19 +00:00
fixincludes
gcc RISC-V: Use bseti/bclri/binvi to extend reach of ori/andi/xori 2022-11-18 21:16:56 +01:00
gnattools
gotools
include Daily bump. 2022-11-16 00:17:09 +00:00
INSTALL
intl
libada
libatomic Daily bump. 2022-11-17 00:16:52 +00:00
libbacktrace
libcc1
libcody
libcpp libcpp: Avoid remapping filenames within directives 2022-11-18 13:13:50 -07:00
libdecnumber
libffi
libgcc
libgfortran
libgo
libgomp Daily bump. 2022-11-17 00:16:52 +00:00
libiberty Daily bump. 2022-11-16 00:17:09 +00:00
libitm Daily bump. 2022-11-15 08:32:29 +00:00
libobjc
libphobos
libquadmath Daily bump. 2022-11-15 08:32:29 +00:00
libsanitizer Daily bump. 2022-11-16 00:17:09 +00:00
libssp
libstdc++-v3 Daily bump. 2022-11-18 18:09:19 +00:00
libvtv
lto-plugin
maintainer-scripts Daily bump. 2022-11-15 08:32:29 +00:00
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2022-11-15 08:32:29 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure Revert "sphinx: support Sphinx in build system" 2022-11-14 09:35:06 +01:00
configure.ac Revert "sphinx: support Sphinx in build system" 2022-11-14 09:35:06 +01:00
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS
Makefile.def
Makefile.in
Makefile.tpl
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.