From patchwork Wed Nov 15 13:15:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juergen Christ X-Patchwork-Id: 165345 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp2528282vqg; Wed, 15 Nov 2023 05:15:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IEdAdekW43TIg7oRZ/dYELjcUHGXwUkVTzRWdiJ+KJOM7VXAIo6y1cWsqwyWZVOVuoRWfB4 X-Received: by 2002:a05:622a:1a9b:b0:41e:204b:f931 with SMTP id s27-20020a05622a1a9b00b0041e204bf931mr6639820qtc.42.1700054153121; Wed, 15 Nov 2023 05:15:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700054153; cv=pass; d=google.com; s=arc-20160816; b=nz1j3j5ywP4y1jizhh09rGMXaC9znGag9Hu2ozwTFifLPJQm/knBF1EtMBibfI28Cw ynntXtarZEobnsEwFw5H7KMALkCx4uP+C1CjbXQ7wGH7mRcGhaMsmO7uYLh7pbfoXDiY /IOUaFzJGzvX8Rg09GQlMQW2WaVxZMSh+ZbBrxDRDskWhYtKw6OoS4whCKL9PEGCJW1v CMnamHRtPkO5E9Y/mJzEQjJxgR3adTtg5suvHyjNSSAU6vnZhUXGsRdWy/tqelw+eH6Y OdwscBzE2mhcVTeH/Gz6u7rHl6fogeZBam6rQNxXwE+jrqAaSViRlmRI6YoXos4K1p79 vGMA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=bvyVdA7t7zXNf2NOtF6NmxGXB6B1OuDDdzcdGJcP+oo=; fh=9kNvVTSI6DlgdGzGqx0+PqDVRbZ9BRNCe8aNB0KUSCk=; b=BV5QUjBdkNQTflsPaUbFBTkag8vkH93qhe+7CSFRg62J8meF/12RsvvD+6GQCGTMWk ZVPXjXNmh+jj2vxvOKs/i3Kx5wrjbpww+a+KLDz3eAaBOzwSyLYQGHds73bhU3DM7cLs RzAzN7BTQ5Dmk11OJ8Rr0oTsRtcpXJFX5Wi+U5p8uCHxv21/Z1aa/gk7edzs4GIFuXYW B8CqZ5myTzxXpXtOKLJOKyGf76q8EJql0fp4Y2RI1zoJbeB4aN81JOYdnbiWNiofIL4O rOT2oDrrRF9hquB8AcSxzqN4QIOVnu4fx9leVZrw3cs+Gj8IjTV4KrTOpMC2lnslsmoa dgfA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=CA0t7mvc; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id o10-20020a05622a008a00b0041e4be2d3c7si9511921qtw.360.2023.11.15.05.15.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 05:15:53 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=CA0t7mvc; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 98F213858C2B for ; Wed, 15 Nov 2023 13:15:50 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 69CEE3858C98 for ; Wed, 15 Nov 2023 13:15:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 69CEE3858C98 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 69CEE3858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700054127; cv=none; b=TaV4kCrbBK/6h7zoNQApdA1WjDbH2bfVNLREvXeobDYIlq/1OygUZzxLBJw/vVkm/bajgpmT+40QlAnv/IPRnP0+SzY0FyhkUGIrTzvkTxIjsd8foCh6rG2u9Pq/Xt6USTly6PZFqHDVlOz59bOxkGaxKOyeB0IRAofp6T0bhv4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700054127; c=relaxed/simple; bh=L/tlyUvvYTqDqvx9VE/Jb8wBYMIkQaKBnjIKo/ZVhkk=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=K+0cNRNzTV3OgTr5k7rfn/6fSxL2XyQYiugCrQoewjNZokhzbPaXhoMNW+g+NBGvS4NKSLDkW80SkOxS6CRuhGEGfKX5idBxDZKE52eTalWgJZ3frYPD3vphA6Crbkbg8BPqiIYsUFDCG7butsYyZqWh842wmW3MzOBVL+QhedA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AFD5dZU007635 for ; Wed, 15 Nov 2023 13:15:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=bvyVdA7t7zXNf2NOtF6NmxGXB6B1OuDDdzcdGJcP+oo=; b=CA0t7mvcVtK8n35iQAEkNgBawRek9+yBYYpEC48CGCvOletiIEM7W6FTIwsC0Z1lpapC lYmYhCojNrIkuDxH0tl8ES0qbPwlzfoZhYIRGnxWdh3c9i1d2r2pN7FV89VL1GrrY0ga UqhUcHo1KuwEMEqA25F0Z74w4imjiw+Mk4I1IQAEnp6oU6YZUditSCH30e4ycSKkCmkL nADf9JbhgLJNEycDZXGIA2w7v/N59Wm4he83ennlNH45Odi4HQnD+kpr8PsT5kUclJ04 OyPz8yAcjCGTRd3CMgrz06R0+WM3cTdWwLeuuYty1U/iGi6Rd9Hw9sQul5vHXjgnGvQN ng== Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3ucxjmgbne-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 15 Nov 2023 13:15:25 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3AFCYKse001088 for ; Wed, 15 Nov 2023 13:15:25 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3uamxnf9r6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 15 Nov 2023 13:15:25 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3AFDFL4Z24314492 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Nov 2023 13:15:22 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D7DD72004B; Wed, 15 Nov 2023 13:15:21 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BE85720043; Wed, 15 Nov 2023 13:15:21 +0000 (GMT) Received: from li-3a824ecc-34fe-11b2-a85c-eae455c7d911.ibm.com (unknown [9.152.222.38]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 15 Nov 2023 13:15:21 +0000 (GMT) From: Juergen Christ To: krebbel@linux.ibm.com, gcc-patches@gcc.gnu.org Subject: [PATCH] s390: split int128 load Date: Wed, 15 Nov 2023 14:15:19 +0100 Message-Id: <20231115131519.26144-1-jchrist@linux.ibm.com> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: vlXFWgZbTMN1o-PG_ibs6YWIQtqJcFwW X-Proofpoint-ORIG-GUID: vlXFWgZbTMN1o-PG_ibs6YWIQtqJcFwW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-15_11,2023-11-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 priorityscore=1501 mlxscore=0 spamscore=0 malwarescore=0 bulkscore=0 suspectscore=0 adultscore=0 mlxlogscore=910 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311150101 X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782635983414858776 X-GMAIL-MSGID: 1782635983414858776 Issue two loads when using GPRs instead of one load-multiple. Bootstrapped and tested on s390. OK for mainline? gcc/ChangeLog: * config/s390/s390.md: Split TImode loads. gcc/testsuite/ChangeLog: * gcc.target/s390/int128load.c: New test. Signed-off-by: Juergen Christ --- gcc/config/s390/s390.md | 4 ---- gcc/testsuite/gcc.target/s390/int128load.c | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gcc.target/s390/int128load.c diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 3f29ba214427..5bff69aeb350 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -1687,8 +1687,6 @@ [(set (match_operand:TI 0 "nonimmediate_operand" "") (match_operand:TI 1 "general_operand" ""))] "TARGET_ZARCH && reload_completed - && !s_operand (operands[0], TImode) - && !s_operand (operands[1], TImode) && s390_split_ok_p (operands[0], operands[1], TImode, 0)" [(set (match_dup 2) (match_dup 4)) (set (match_dup 3) (match_dup 5))] @@ -1703,8 +1701,6 @@ [(set (match_operand:TI 0 "nonimmediate_operand" "") (match_operand:TI 1 "general_operand" ""))] "TARGET_ZARCH && reload_completed - && !s_operand (operands[0], TImode) - && !s_operand (operands[1], TImode) && s390_split_ok_p (operands[0], operands[1], TImode, 1)" [(set (match_dup 2) (match_dup 4)) (set (match_dup 3) (match_dup 5))] diff --git a/gcc/testsuite/gcc.target/s390/int128load.c b/gcc/testsuite/gcc.target/s390/int128load.c new file mode 100644 index 000000000000..35d5380704b6 --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/int128load.c @@ -0,0 +1,14 @@ +/* Check that int128 loads and stores are split. */ + +/* { dg-do compile } */ +/* { dg-options "-O3 -mzarch -march=zEC12" } */ + +__int128 global; + +void f(__int128 x) +{ + global = x; +} + +/* { dg-final { scan-assembler-times "lg\t" 2 } } */ +/* { dg-final { scan-assembler-times "stg\t" 2 } } */