Takayuki 'January June' Suwa d6d8e6a7e1 xtensa: Optimize "bitwise AND with imm1" followed by "branch if (not) equal to imm2"
This patch enhances the effectiveness of the previously posted one:
"xtensa: Optimize bitwise AND operation with some specific forms of constants".

    /* example */
    extern void foo(int);
    void test(int a) {
      if ((a & (-1U << 8)) == (128 << 8))  /* 0 or one of "b4const" */
        foo(a);
    }

    ;; before
	.global	test
    test:
	movi	a3, -0x100
	movi.n	a4, 1
	and	a3, a2, a3
	slli	a4, a4, 15
	bne	a3, a4, .L3
	j.l	foo, a9
    .L1:
	ret.n

    ;; after
	.global test
    test:
	srli	a3, a2, 8
	bnei	a3, 128, .L1
	j.l	foo, a9
    .L1:
	ret.n

gcc/ChangeLog:

	* config/xtensa/xtensa.md
	(*masktrue_const_pow2_minus_one, *masktrue_const_negative_pow2,
	*masktrue_const_shifted_mask): If the immediate for bitwise AND is
	represented as '-(1 << N)', decrease the lower bound of N from 12
	to 1.  And the other immediate for conditional branch is now no
	longer limited to zero, but also one of some positive integers.
	Finally, remove the checks of some conditions, because the comparison
	expressions that don't satisfy such checks are determined as
	compile-time constants and thus will be optimized away before
	RTL expansion.
2022-07-16 00:27:42 -07:00
2022-03-19 00:16:22 +00:00
2022-06-02 00:16:32 +00:00
2022-07-05 00:16:36 +00:00
2022-02-28 00:16:17 +00:00
2022-02-14 00:16:23 +00:00
2022-07-13 00:16:33 +00:00
2022-06-03 00:16:40 +00:00
2022-07-09 00:16:54 +00:00
2022-06-28 00:16:58 +00:00
2022-06-04 00:16:27 +00:00
2022-07-16 00:16:30 +00:00
2022-05-21 00:16:32 +00:00
2022-06-26 00:16:33 +00:00
2022-06-30 00:16:46 +00:00
2022-07-13 00:16:33 +00:00
2022-07-15 00:16:22 +00:00
2022-06-03 00:16:40 +00:00
2022-07-05 00:16:36 +00:00
2022-07-07 00:16:46 +00:00
2022-01-12 00:16:39 +00:00
2022-07-16 00:16:30 +00:00
2022-07-15 00:16:22 +00:00
2022-05-21 00:16:32 +00:00
2022-05-28 09:38:29 -06:00
2022-07-16 00:16:30 +00:00
2022-06-28 09:41:07 -03:00

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.
S
Description
Yggdrasil port of the GNU Compiler Collection
Readme 978 MiB
Languages
C++ 33%
C 27.4%
Ada 13%
Go 7.1%
D 7%
Other 12.1%