Andrew Pinski 40f6ae0165 ifcvt: Improve noce_can_force_operand in ifcvt [PR122170]
Currently if the rtl is either an arithmetic or an unary
rtl, noce_can_force_operand checks to see if there is an
optab for that rtl code. This works for more things except
on some targets they have a ss_minus instruction but don't
implement the optab for it. In the case of arm you can
generate a ss_minus with a builtin and then when it comes
to trying to do ifcvt, force_operand fails over.
In this case the optab, sssub was only supported for
fixed-point modes before and it was working as code_to_optab
would return there was not optabs. But after r15-1030-gabe6d39365476e,
the optab will be return. What the backend is doing is correct and will
most likely happen with other rtl codes/optabs later on.

To fix this instead of just returning true if the optab exists, we need
to check if the optab entry for the mode exists.

	PR rtl-optimization/122170

gcc/ChangeLog:

	* ifcvt.cc (noce_can_force_operand): Don't only check if
	there is an optab for the code check the entry for the
	mode is non-null. Handle non integral div by checking
	optab like force_operand does.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
2026-01-29 19:52:03 -08:00
2026-01-21 00:16:32 +00:00
2026-01-20 00:16:30 +00:00
2026-01-16 00:16:30 +00:00
2026-01-16 00:16:30 +00:00
2026-01-30 00:16:31 +00:00
2026-01-25 00:16:27 +00:00
2026-01-25 00:16:27 +00:00
2026-01-18 00:16:31 +00:00
2026-01-14 00:16:30 +00:00
2026-01-21 00:16:32 +00:00
2026-01-13 00:16:32 +00:00
2026-01-27 00:16:29 +00:00
2026-01-30 00:16:31 +00:00
2026-01-27 00:16:29 +00:00
2026-01-23 00:16:27 +00:00
2026-01-19 09:56:51 +01:00
2026-01-19 09:56:51 +01: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 2.7 GiB
Languages
C++ 30.7%
C 30.1%
Ada 14.4%
D 6.1%
Go 5.7%
Other 12.5%