Jakub Jelinek dd8df074c9 simplify-rtx: Fix up shift/rotate VOIDmode count handling [PR123523]
The following testcase ICEs on i686-linux, because the HW in that
case implements the shift as shifting by 64-bit count (anything larger
or equal to number of bits in the first operand's element results
in 0 or sign copies), so the machine description implements it as
such as well.
Now, because shifts/rotates can have different modes on the first
and second operand, when the second one has VOIDmode (i.e. CONST_INT,
I think CONST_WIDE_INT has non-VOIDmode and CONST_DOUBLE with VOIDmode
is hopefully very rarely used), we need to choose some mode for the
wide_int conversion.  And so far we've been choosing BITS_PER_WORD/word_mode
or the mode of the first operand's element, whichever is wider.
That works fine on 64-bit targets, CONST_INT has always at most 64 bits,
but for 32-bit targets uses SImode.

Because HOST_BITS_PER_WIDE_INT is always 64, the following patch just
uses that plus DImode instead of BITS_PER_WORD and word_mode.

2026-01-12  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/123523
	* simplify-rtx.cc (simplify_const_binary_operation): Use
	DImode for VOIDmode shift and truncation counts if int_mode
	is narrower than HOST_BITS_PER_WIDE_INT rather than
	word_mode if int_mode it is narrower than BITS_PER_WORD.

	* gcc.target/i386/pr123523.c: New test.
2026-01-12 10:06:47 +01:00
2026-01-02 09:56:11 +01:00
2025-12-31 00:16:24 +00:00
2026-01-10 00:16:49 +00:00
2026-01-10 00:16:49 +00:00
2026-01-10 00:16:49 +00:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 10:47:06 +01:00
2026-01-02 09:56:11 +01:00
2026-01-10 00:16:49 +00:00
2026-01-10 00:16:49 +00:00
2025-12-30 00:16:33 +00:00
2026-01-12 00:16:27 +00:00
2026-01-12 00:16:27 +00:00
2025-12-30 00:16:33 +00:00
2026-01-07 00:16:25 +00:00
2026-01-02 09:56:11 +01:00
2026-01-10 00:16:49 +00:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 10:47:06 +01:00
2026-01-02 00:16:23 +00:00
2025-12-30 00:16:33 +00:00
2026-01-02 09:56:11 +01:00
2026-01-11 00:16:24 +00:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2025-12-22 00:16:25 +00:00
2025-12-30 00:16:33 +00:00
2026-01-11 00:16:24 +00:00
2025-11-30 01:52:24 +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%