S/390: Fix PR94666
authorAndreas Krebbel <krebbel@linux.ibm.com>
Mon, 20 Apr 2020 18:06:53 +0000 (20:06 +0200)
committerAndreas Krebbel <krebbel@linux.ibm.com>
Mon, 20 Apr 2020 18:06:53 +0000 (20:06 +0200)
commit582fe481f4bb800f822035b8a17000d0efaecef4
tree1e3354fa3fb9bc9fd41685b8ec6b252e89c95e50
parent2930bb321794c241d8df5591a5bf447bf89c6e82
S/390: Fix PR94666

The vector popcount expanders use a hardcoded subreg.  This might lead
to double subregs being generated which then fail to match.  With this
patch simplify_gen_subreg is used instead to fold the subregs.

gcc/ChangeLog:

2020-04-20  Andreas Krebbel  <krebbel@linux.ibm.com>

* config/s390/vector.md ("popcountv8hi2_vx", "popcountv4si2_vx")
("popcountv2di2_vx"): Use simplify_gen_subreg.

gcc/testsuite/ChangeLog:

2020-04-20  Andreas Krebbel  <krebbel@linux.ibm.com>

* g++.dg/pr94666.C: New test.
gcc/ChangeLog
gcc/config/s390/vector.md
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/pr94666.C [new file with mode: 0644]