Jeff Law 3a7143ed83 [RISC-V][PR target/124048] Fix RTL generated by conditional AND splitter
The recently added patterns for recovering good code generation of conditional
operations on RISC-V with Zicond had a nasty little bug causing this bootstrap
failure.

The main patterns are fine -- in those cases the czero produces a neutral
value.  So for example a conditional IOR can use a czero to select between an
IOR's operand and zero, then we do an unconditional IOR of the common value and
the result of the czero.

For AND the neutral value is -1 rather than 0.  So we need a different
sequence.  We emit the AND into a temporary.  Then select between the common
term and zero.  Then IOR the temporary with the selected value.  That sequence
requires the tense of the selection to be inverted which I failed to do in the
split RTL output of the pattern.

Those had been tested by inspection only and the tense flip was missed.  Doko's
bootstrap test with zicond enabled by default was able to trip this problem.
Thankfully it was easy to reproduce and bisect and was mostly a matter of
waiting for builds to run.

I've bootstrapped this on one of my BPIs with B, V and Zicond enabled by
default.  I'll be pushing it to the trunk momentarily.  I never actually
compared assembly or debugged the resulting code, it was found purely by
inspection once I knew where to look.  ie, I don't have a testcase for the
testsuite, but this is covered by bootstrapping with Zicond enabled.

I'd been somewhat worried about this possibility for a while -- the B, V and
Zicond extensions are not well represented by CI systems for bootstrap testing.
Given the Pioneer here is still limping along, it's a good test of rv64gc and
I've hacked things up so that the BPI will enable B, V and Zicond by default.

The baseline run is still in progress (bootstrapping and regression testing on
the BPI is up to 30 hours now), but we'll have coverage going forward.
Obviously when the K3 systems come out the hope is this cycle time will drop
meaningfully.

	PR target/124048
gcc/
	* config/riscv/zicond.md (conditional AND patterns): Fix missed
	flipping the condition's test in RTL output.
2026-02-17 07:45:57 -07:00
2026-02-05 00:16:28 +00:00
2026-02-06 00:16:39 +00:00
2026-02-16 00:16:25 +00:00
2026-02-06 00:16:39 +00:00
2026-01-31 00:16:35 +00:00
2026-01-31 00:16:35 +00:00
2026-01-31 00:16:35 +00:00
2026-02-07 00:16:36 +00:00
2026-02-15 00:16:25 +00:00
2026-02-13 00:16:32 +00:00
2026-02-13 00:16:32 +00:00
2026-02-13 00:16:32 +00:00
2026-02-06 00:16:39 +00:00
2026-02-06 00:16:39 +00: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.8%
C 30.2%
Ada 14.4%
D 6.1%
Go 5.7%
Other 12.3%