S/390: Reject long disp for vector load/store early

The vector memory instructions only support short displacements.
Reject invalid displacements early to prevent plenty of lay
instructions to be generated later which then cannot be merged
properly.

gcc/ChangeLog:

2019-04-03  Andreas Krebbel  <krebbel@linux.ibm.com>

	* config/s390/s390.c (s390_legitimate_address_p): Reject long
	displacement addresses for vector mode operands.

From-SVN: r270122
This commit is contained in:
Andreas Krebbel 2019-04-03 11:26:09 +00:00 committed by Andreas Krebbel
parent 487efcfdac
commit 615792b72e
2 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2019-04-03 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390.c (s390_legitimate_address_p): Reject long
displacement addresses for vector mode operands.
2019-04-03 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (GMASK_LEN): Define.

View File

@ -4677,6 +4677,17 @@ s390_legitimate_address_p (machine_mode mode, rtx addr, bool strict)
if (!s390_decompose_address (addr, &ad))
return false;
/* The vector memory instructions only support short displacements.
Reject invalid displacements early to prevent plenty of lay
instructions to be generated later which then cannot be merged
properly. */
if (TARGET_VX
&& VECTOR_MODE_P (mode)
&& ad.disp != NULL_RTX
&& CONST_INT_P (ad.disp)
&& !SHORT_DISP_IN_RANGE (INTVAL (ad.disp)))
return false;
if (strict)
{
if (ad.base && !REGNO_OK_FOR_BASE_P (REGNO (ad.base)))