Jakub Jelinek 2e4688a720 expand: Use less costly from sign and zero extensions for values where value range says they don't have MSB set [PR120434]
On top of the just posted patch, the following patch attempts to
use value range to see if MSB is known to be false and for scalar integral
extension in that case tries to expand both sign and zero extension and
chooses based on RTX costs the cheaper one (if the costs are the same
uses what it used before, TYPE_UNSIGNED (TREE_TYPE (treeop0)) based.

The patch regresses the gcc.target/i386/pr78103-3.c test, will post
a separate patch for that momentarily (with the intent that if all 3
patches are approved, I'll commit the PR78103 related one before this one).

2025-06-10  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/120434
	* expr.cc (expand_expr_real_2) <CASE_CONVERT>: If get_range_pos_neg
	at -O2 for scalar integer extension suggests the most significant
	bit of op0 is not set, try both unsigned and signed conversion and
	choose the cheaper one.  If both are the same cost, choose one
	based on TYPE_UNSIGNED (TREE_TYPE (treeop0)).

	* gcc.target/i386/pr120434-2.c: New test.
2025-06-10 20:07:39 +02:00
2025-06-03 00:18:06 +00:00
2025-05-24 00:17:55 +00:00
2025-05-28 00:18:43 +00:00
2025-04-02 00:18:25 +00:00
2025-06-03 00:18:06 +00:00
2025-01-02 11:59:57 +01:00
2025-05-23 00:17:35 +00:00
2025-04-11 00:17:32 +00:00
2025-01-02 11:59:57 +01:00
2025-05-17 00:17:29 +00:00
2025-01-02 11:59:57 +01:00
2024-10-26 00:19:39 +00:00
2025-05-28 00:18:43 +00:00
2025-06-07 00:19:12 +00:00
2025-06-08 00:16:33 +00:00
2025-04-01 00:19:09 +00:00
2025-05-14 00:18:21 +00:00
2025-05-10 00:17:59 +00:00
2025-01-02 11:59:57 +01:00
2025-05-10 00:17:59 +00:00
2025-04-10 00:18:06 +00:00
2025-05-03 00:18:18 +00:00
2025-01-02 11:59:57 +01:00
2025-05-10 00:17:59 +00:00
2025-03-07 00:17:19 +00:00
2025-05-24 00:17:55 +00:00
2025-06-10 00:18:54 +00:00
2024-11-19 12:27:33 +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 1.5 GiB
Languages
C++ 30.7%
C 30%
Ada 14.5%
D 6.1%
Go 5.7%
Other 12.5%