aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-02-03 09:00:19 +0100
committerJakub Jelinek <jakub@redhat.com>2020-02-03 09:03:12 +0100
commitf626ae5478887b0cec886160dcfc4d59bf6fda07 (patch)
tree766b78d2bb74aa6109d4696637e07943be27c89e /gcc/fortran/resolve.c
parentc3ccce5b47f85d70127f5bb894bc5e83f8d2510e (diff)
downloadgcc-f626ae5478887b0cec886160dcfc4d59bf6fda07.zip
gcc-f626ae5478887b0cec886160dcfc4d59bf6fda07.tar.gz
gcc-f626ae5478887b0cec886160dcfc4d59bf6fda07.tar.bz2
s390x: Fix popcounthi2_z196 expander [PR93533]
The following testcase started to ICE when .POPCOUNT matching has been added to match.pd; we had __builtin_popcount*, but nothing would use the popcounthi2 expander before. The problem is that the popcounthi2_z196 expander doesn't emit valid RTL: error: unrecognizable insn: (insn 138 137 139 27 (set (reg:SI 190) (ashift:SI (reg:HI 95 [ _105 ]) (const_int 8 [0x8]))) -1 (nil)) during RTL pass: vregs The following patch is an attempt to fix that, furthermore I've tried to slightly simplify it as well, it makes no sense to me to perform (x + (x << 8)) >> 8 when we need to either zero extend or mask the result at the end in order to avoid bits from above HImode to affect it, when we can do (x + (x >> 8)) & 0xff (or zero extension). 2020-02-03 Jakub Jelinek <jakub@redhat.com> PR target/93533 * config/s390/s390.md (popcounthi2_z196): Fix up expander to emit valid RTL to sum up the lowest and second lowest bytes of the popcnt result. * gcc.c-torture/compile/pr93533.c: New test. * gcc.target/s390/pr93533.c: New test.
Diffstat (limited to 'gcc/fortran/resolve.c')
0 files changed, 0 insertions, 0 deletions