From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102355 invoked by alias); 24 Apr 2017 16:04:38 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 100672 invoked by uid 89); 24 Apr 2017 16:04:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=2486, ji, 3*, bla X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 24 Apr 2017 16:04:36 +0000 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v3OG3er7081542 for ; Mon, 24 Apr 2017 12:04:36 -0400 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 2a0mqgs0sb-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 24 Apr 2017 12:04:36 -0400 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 24 Apr 2017 17:04:34 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 24 Apr 2017 17:04:33 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v3OG4Wx135324126 for ; Mon, 24 Apr 2017 16:04:32 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 639BB11C06E for ; Mon, 24 Apr 2017 17:03:37 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 45DDB11C04A for ; Mon, 24 Apr 2017 17:03:37 +0100 (BST) Received: from maggie.boeblingen.de.ibm.com (unknown [9.152.212.134]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS for ; Mon, 24 Apr 2017 17:03:37 +0100 (BST) From: Andreas Krebbel To: gcc-patches@gcc.gnu.org Subject: [PATCH] S/390: PR80464: Split MEM->GPR vector moves Date: Mon, 24 Apr 2017 17:27:00 -0000 In-Reply-To: <20170424160430.1324-1-krebbel@linux.vnet.ibm.com> References: <20170424160430.1324-1-krebbel@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17042416-0040-0000-0000-00000373278D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17042416-0041-0000-0000-00002516FD65 Message-Id: <20170424160430.1324-2-krebbel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-24_12:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1704240275 X-IsSubscribed: yes X-SW-Source: 2017-04/txt/msg01053.txt.bz2 We do this already for TImode values but it was missing for vector modes. Bootstrapped and regression tested on s390x. Bye, -Andreas- gcc/ChangeLog: 2017-04-24 Andreas Krebbel * config/s390/vector.md: Split MEM->GPR vector moves for non-s_operand addresses. gcc/testsuite/ChangeLog: 2017-04-24 Andreas Krebbel * gfortran.fortran-torture/compile/pr80464.f90: New test. --- gcc/config/s390/vector.md | 19 +++++++++++ .../gfortran.fortran-torture/compile/pr80464.f90 | 39 ++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 gcc/testsuite/gfortran.fortran-torture/compile/pr80464.f90 diff --git a/gcc/config/s390/vector.md b/gcc/config/s390/vector.md index 7535b9d..2952893 100644 --- a/gcc/config/s390/vector.md +++ b/gcc/config/s390/vector.md @@ -248,6 +248,25 @@ operands[5] = operand_subword (operands[1], 0, 0, mode); }) +; This is the vector equivalent to the TImode splitter in s390.md. It +; is required if both target GPRs occur in the source address operand. + +; For non-s_operands at least one of the target GPRs does not conflict +; with the address operand and one of the splitters above will take +; over. +(define_split + [(set (match_operand:V_128 0 "register_operand" "") + (match_operand:V_128 1 "memory_operand" ""))] + "TARGET_ZARCH && reload_completed + && !VECTOR_REG_P (operands[0]) + && !s_operand (operands[1], VOIDmode)" + [(set (match_dup 0) (match_dup 1))] +{ + rtx addr = operand_subword (operands[0], 1, 0, mode); + addr = gen_lowpart (Pmode, addr); + s390_load_address (addr, XEXP (operands[1], 0)); + operands[1] = replace_equiv_address (operands[1], addr); +}) ; Moves for smaller vector modes. diff --git a/gcc/testsuite/gfortran.fortran-torture/compile/pr80464.f90 b/gcc/testsuite/gfortran.fortran-torture/compile/pr80464.f90 new file mode 100644 index 0000000..d3a3943 --- /dev/null +++ b/gcc/testsuite/gfortran.fortran-torture/compile/pr80464.f90 @@ -0,0 +1,39 @@ +subroutine bla(a,bar,lb,ne,nt,v,b) + character*8 lb + integer bar(20),foo(8,5) + real*8 a(3,*),x(3,8),v(0:3,*) + if(lb(4:4).eq.'3') then + n=8 + elseif(lb(4:5).eq.'10') then + n=10 + ns=6 + m=4 + endif + call blub(id) + do + if(id.eq.0) exit + if(lb(4:4).eq.'6') then + m=1 + endif + if((n.eq.20).or.(n.eq.8)) then + if(b.eq.0) then + do i=1,ns + do j=1,3 + x(j,i)=a(j,bar(foo(i,ig))) + enddo + enddo + else + do i=1,ns + do j=1,3 + x(j,i)=a(j,bar(foo(i,ig)))+v(j,bar(foo(i,ig))) + enddo + enddo + endif + endif + do i=1,m + if(lb(4:5).eq.'1E') then + call blab(x) + endif + enddo + enddo +end subroutine bla -- 2.9.1