https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118835
Bug ID: 118835
Summary: [12/13/14/15 Regression] ICE in s390_valid_shift_count
since r10-1731-ge2839e47894f0b
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: stefansf at gcc dot gnu.org
Target Milestone: ---
Host: s390*-*-*
long
test (long x, int y)
{
__int128 z = 0xAAAAAAAAAAAAAABF;
z &= y;
return x << z;
}
$ gcc t.c -O2 -S
during RTL pass: combine
t.c: In function 'test':
t.c:7:1: internal compiler error: RTL check: expected code 'const_int', have
'const_wide_int' in s390_valid_shift_count, at config/s390/s390.cc:3526
Fails while extracting the immediate
HOST_WIDE_INT val = INTVAL (imm);
if (implicit_mask > 0
&& (val & implicit_mask) != implicit_mask)
return false;
which is in this case a const_wide_int.
I will come up with a fix.