Juzhe-Zhong 8421f279e9 RISC-V: Fix incorrect demand info merge in local vsetvli optimization [PR109748]
This patch is fixing my recent optimization patch:
d51f2456ee

In that patch, the new_info = parse_insn (i) is not correct.
Since consider the following case:

vsetvli a5,a4, e8,m1
..
vsetvli zero,a5, e32, m4
vle8.v
vmacc.vv
...

Since we have backward demand fusion in Phase 1, so the real demand of "vle8.v" is e32, m4.
However, if we use parse_insn (vle8.v) = e8, m1 which is not correct.

So this patch we change new_info = new_info.parse_insn (i)
into:

vector_insn_info new_info = m_vector_manager->vector_insn_infos[i->uid ()];

So that, we can correctly optimize codes into:

vsetvli a5,a4, e32, m4
..
.. (vsetvli zero,a5, e32, m4 is removed)
vle8.v
vmacc.vv

Since m_vector_manager->vector_insn_infos is the member variable of pass_vsetvl class.
We remove static void function "local_eliminate_vsetvl_insn", and make it as the member function
of pass_vsetvl class.

	PR target/109748

gcc/ChangeLog:

	* config/riscv/riscv-vsetvl.cc (local_eliminate_vsetvl_insn): Remove it.
	(pass_vsetvl::local_eliminate_vsetvl_insn): New function.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/rvv/vsetvl/pr109748.c: New test.
2023-05-06 10:22:30 +08:00
2023-04-29 00:16:48 +00:00
2023-04-26 00:17:46 +00:00
2023-04-29 00:16:48 +00:00
2023-05-01 00:16:44 +00:00
2023-05-03 00:17:11 +00:00
2023-05-05 00:16:36 +00:00
2023-05-01 00:16:44 +00:00
2023-05-06 00:16:37 +00:00
2023-04-21 00:17:31 +00:00
2023-04-29 00:16:48 +00:00
2023-04-28 13:15:33 -07:00
2023-04-28 13:15:33 -07: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.
Description
No description provided
Readme 4.2 GiB
Languages
C++ 30.7%
C 30.2%
Ada 14.4%
D 6.1%
Go 5.7%
Other 12.4%