]> git.ipfire.org Git - thirdparty/gcc.git/commit
s390: testsuite: Fix zero_bits_compound-1.c
authorStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Thu, 2 May 2024 06:39:32 +0000 (08:39 +0200)
committerStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Thu, 2 May 2024 06:39:32 +0000 (08:39 +0200)
commit6c4a745c6910659a75d1881cf3c4128f24b5666f
treece1fdc2dc53b4ab5e1add87a5b5aee0fe43daa4e
parentbbe83599320288025a417c54d9afcb3885cb2766
s390: testsuite: Fix zero_bits_compound-1.c

Starting with r12-2731-g96146e61cd7aee we do not generate code like

_5 = (unsigned int) c_2(D);
i_6 = _5 << 8;
_7 = _5 << 20;
i_8 = i_6 | _7;

anymore but instead

_5 = (unsigned int) c_2(D);
_3 = _5 * 1048832;

which leads finally to slightly different assembly code where we
previously ended up for z10 or newer with

lr      %r1,%r2
sll     %r1,8
rosbg   %r1,%r2,32,43,20
llgfr   %r2,%r1
br      %r14

and now

lr      %r1,%r2
sll     %r1,12
ar      %r2,%r1
risbg   %r2,%r2,35,128+55,8
br      %r14

The zero-extend materializes via risbg for which the pattern contains an
"and" which is why the test fails.  Thus, instead of scanning for RTL
expressions rather scan for assembler instructions for s390.

gcc/testsuite/ChangeLog:

* gcc.dg/zero_bits_compound-1.c: Fix for s390.
gcc/testsuite/gcc.dg/zero_bits_compound-1.c