From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2139.outbound.protection.outlook.com [40.107.237.139]) by sourceware.org (Postfix) with ESMTPS id C2CFB3858D37 for ; Wed, 20 Mar 2024 07:55:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C2CFB3858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=os.amperecomputing.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=os.amperecomputing.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C2CFB3858D37 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.237.139 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1710921325; cv=pass; b=j430BCQCbeCbYzqrxqp6kc+O/w9Hk2kiVdWgGrQ+AFyj7KXIi2BhuhuYT05jDH1yYNsnAUsH5xFAOIeud/mx21AtvODpRKfV1bmlgJoo1xJW2RDrvoKCo8R1Pt7Y0Mzz8R1RJwusxU+ZXjrS2T2bZ1DiSaCDWYaMqekYEF7zvMo= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1710921325; c=relaxed/simple; bh=Cndnd1mC5KAFrmOYaY8XoOIqXJL5w3rf61vCuBGMbyQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ls+5hHsXKqbh6mBxYiOdGIgX/hl/3Ms4Yi7d3m0ZxtmmWkatvD/RhgMX3ZeMpn3n3u/SmRubKURUvyuiJCJH4uetcvhRIu3rO3VBBEkdQ6iNckQJYYf7iChtpiHz8ZqGKtutT9AkwVO5q816TVWuCN/83rYLL04nzhIxkkTrivw= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b/3La2v9j80HNofXrsQ+S7NXmyVUwOvJv16sK8NsMmUtpyZQYeLkw6ua0Zz6mzAmSQk7dqOWsx+oHNZZ9jCqZnS2W1MNiz8e7a96LRWFQwj8X9Ku+LyNjRPCPKF7hw50ZlGnfBKk8fWsqvkUWJ1DH6DRfo95wu7U70QkuzUoV3WMdqoK8MqGL/q/itDxMrqVjk241VIFDlRogWzLtkzbsstQqRvo+R4qWYWMOz5aqVUqAWjSVyHqAijWPDUKILRVMp0k65phGAC9zvW6WmaiJ8yEzBE2/YBymQnLgPDzHWCCbML+BMmJVgF6ztuTv+n9qR4+aaqsF149l5NFb5wCqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=05/8hp1iOtztd/MwoGAYn+0EpFKuQ6vtKQimRvHd21w=; b=NjiiCyS6Gwir7fM6rc00wie8QbzD4iwROOeSJycSv7eNzbi04hwbezxSR0nI1JSlosDqdx3wUUw/F+KxFz+h+fs/WNpTtk06QMu90CaTfIA14RfSut2mxtEUMyHgAYtg1QhHEQMI6/IIMZOLpauOAdaILhWO1GlxTePXrvI+DRW2ufxVSN05Def4GFMlwK91ukcDVhngHKJXMnM04rn/lRiRbMqohDAGesaMFWwqJubZE1Mu2OqAZvyTdeDa9n2WPi+z36xQW49ngE8VsnAprZVHWpwibnY8Z3R8mnH51xuJu7Ey5XXZ+EOtfPPFczHDo6sL6j4nTGzPU2I9uH6UBA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=05/8hp1iOtztd/MwoGAYn+0EpFKuQ6vtKQimRvHd21w=; b=YoEMZYClPJzukjqf89hRw3tBZisPrQIeVE2oQK6vJbnFoJ67mpu4Lt/P9/jgqfipmFpuUTS0kq6D2DKusbYIjfpuosLTRTfqC/7GqATm6OD+Fafi3hVQBSpaeahfY5gD1cbA20tcvzTyTe2HeGyXpEbMGhFOBf0JGw/OXu1m6E8= Received: from CYYPR01MB8309.prod.exchangelabs.com (2603:10b6:930:c5::16) by DM8PR01MB7110.prod.exchangelabs.com (2603:10b6:8:4::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.34; Wed, 20 Mar 2024 07:55:20 +0000 Received: from CYYPR01MB8309.prod.exchangelabs.com ([fe80::7fb5:5f27:a47e:d539]) by CYYPR01MB8309.prod.exchangelabs.com ([fe80::7fb5:5f27:a47e:d539%7]) with mapi id 15.20.7386.025; Wed, 20 Mar 2024 07:55:19 +0000 From: Hao Liu OS To: Richard Biener , "GCC-patches@gcc.gnu.org" Subject: [PATCH] testsuite: add the case to cover vectorization of A[(i+x)*stride] [PR114322] Thread-Topic: [PATCH] testsuite: add the case to cover vectorization of A[(i+x)*stride] [PR114322] Thread-Index: AQHaepoxdVAr/GxkXkuMkNGk/9ZdKA== Date: Wed, 20 Mar 2024 07:55:19 +0000 Message-ID: Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_Enabled=True;MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_SiteId=3bc2b170-fd94-476d-b0ce-4229bdc904a7;MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_SetDate=2024-03-20T07:55:19.361Z;MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_Name=Confidential;MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_ContentBits=0;MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_Method=Standard; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CYYPR01MB8309:EE_|DM8PR01MB7110:EE_ x-ms-office365-filtering-correlation-id: 747a64bf-7b20-4781-cf62-08dc48b316c7 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: S/q33l1l038Q5U3+3s2yLOvAOlj8ca3GjOg+nValg1urCisQJj1XBE4Cxb0e2IIaaYFAhqKlh4n+tAZhR4La1K6dvQwo+DXu/+X1hfDQZgpACI9poBUisdh+ozb/KkgdFK4efisWjHeruuHKB0WWlOy0vxvuP/OWExnrt3uzXsmreGq+yT9OV2zZyo4gK/0/O2idmW9mfj+HuQ3K1b5ktzAAS/cVyJGj93NAfG/gJTD6tZxZZTXBdS3p0tix918ITjcVnhyVoZvPwBGoTMJ6kcj35VNzA4XfJbq/mfQs5sGeiexc7qIK+dzmZ1uPIWZSHtREZY9UHylpL5x+I6kHduzYmknCk4w1pQBnS/E7rkpyJUvnT9y4rtP4TdW9zKdnoC4/QpPgtM7ywoQkCb/MhWU9lKA+oj9eDUJ3/f2WynVxz9n7kuqBSYC/M4OLTlaYJ1kLht9/wjONFNEqiDCgleFRsB/AijkRNPoiP8pYx3j2QU53+EQ/Sjvc4piF+pXfDk1W3L0aDmKXJFbBqgpGIUN/JehmyANS1B4VYNzJ0ozSnmRkr0dmR8HqIrFZttum1L8yCizGPoDmIg1ksZwaqNN8lOl8Q5UW9l3WIKsCHgQztxsB7khpTxnYSPVhFkDkfuQYGTx8fV9+JdxUQ5SBd/9kOwLmesAokQlwQca3bwY= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CYYPR01MB8309.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(366007)(376005)(38070700009);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?AvWfa0H1uOw5ZSRIbRWcFFS2VfXJykIROPPvRFAayGqXHq+hCTeviRriVW?= =?iso-8859-1?Q?Id089gcQxT7DGjTLJCtWniB6VOCDSG5tRGoJKurhFcNwYg4ZNnPpf/RKYY?= =?iso-8859-1?Q?mM/BYMWIecc3Tg1vs8g1ygzgq/IsstC7ujuy68u/pFL9h503JpAB2KXcrI?= =?iso-8859-1?Q?C7JBrOvWxFaca5HPQ3nha3v1dfLFgFbVTd2ISDc5KY0PXD+xepPqVW3ZDA?= =?iso-8859-1?Q?5j8xSmn87YVimvFCkO50393bCR8zVmPhX7ACkiBJmc/oEGkRgWg94TI2A5?= =?iso-8859-1?Q?QxLu5yhc0E4FTLlSWXJCsbROO3Yo/15a5OW4/B8p2Vt1vw2rMzhDISkouy?= =?iso-8859-1?Q?m4Le91WY3/CciMUrxH5ejAo3unbgtRXH8sc/xMPvr5Mi7AH+g1I7FKAC6R?= =?iso-8859-1?Q?BBKWEQJsdTNSC0WVYY9YqJwKme2G7iKNgojhXKR3WOmOWUqO2+sBmL+Aai?= =?iso-8859-1?Q?91q9ej+nh0n2RZaG7FYllAwzAxVxyKDMZHgq8pKVvQjfX7YLoWzgWmVmh6?= =?iso-8859-1?Q?rvOzoybSzlM4BgICvnaDyc+mQih+vCDxhXSnmUVdhNjG9tdfuXYu4WSNBW?= =?iso-8859-1?Q?xR89zxBsiyLB3mI3hkQBK2K4KZNmU9d5grGsBbbjttbhIgc+jiOQB3YjKP?= =?iso-8859-1?Q?WCVRqDU6SB7E39o/Af+hU149co/mljQv3GVqEeaXZ6X+XTw7FXe6ClmDkS?= =?iso-8859-1?Q?n40XodE40hhIBXSQnEvY8G6RMNJ0HbYKEDoqCPorGp9L+oJZuOn/YcuLFb?= =?iso-8859-1?Q?niYXnpHH+k4B2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oupNZobnPxQXuLw0B1w?= =?iso-8859-1?Q?=3D=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CYYPR01MB8309.prod.exchangelabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 747a64bf-7b20-4781-cf62-08dc48b316c7 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Mar 2024 07:55:19.8002 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: rRobqVNsAzMums14aNM8abzOR2cQjew7ruUmhxTtNWIypdjtt6E4fEOUhN3pmxHvq+ST/sTfGqk0uMNv5OlJfLh22AuCa8jyuMP4dW9rj5K/D7nTEm8Md+GQDaYh2uxg X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR01MB7110 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 List-Id: Hi Richard,=0A= =0A= As mentioned in the comments of PR114322 (which has been fixed by PR114151= =0A= r14-9540-ge0e9499a), this patch is to cover the case.=0A= =0A= Bootstrapped and regression tested on aarch64-linux-gnu, OK for trunk?=0A= =0A= gcc/testsuite/ChangeLog:=0A= =0A= PR tree-optimization/114322=0A= * gcc.dg/vect/pr114322.c: New testcase.=0A= =0A= diff --git a/gcc/testsuite/gcc.dg/vect/pr114322.c b/gcc/testsuite/gcc.dg/ve= ct/pr114322.c=0A= new file mode 100644=0A= index 00000000000..7c3a4ffe260=0A= --- /dev/null=0A= +++ b/gcc/testsuite/gcc.dg/vect/pr114322.c=0A= @@ -0,0 +1,18 @@=0A= +/* PR tree-optimization/114322 */=0A= +/* { dg-do compile } */=0A= +=0A= +int=0A= +foo (short *A, int x, int stride)=0A= +{=0A= + int sum =3D 0;=0A= +=0A= + if (stride > 1)=0A= + {=0A= + for (int i =3D 0; i < 1024; ++i)=0A= + sum +=3D A[(i + x) * stride];=0A= + }=0A= +=0A= + return sum;=0A= +}=0A= +=0A= +/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target aarch64*-= *-* } } } */=0A= -- =0A= 2.34.1=0A= =0A=