From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by sourceware.org (Postfix) with ESMTPS id 185CF3858C62 for ; Wed, 22 May 2024 08:42:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 185CF3858C62 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 185CF3858C62 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=192.198.163.10 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1716367323; cv=pass; b=jRoRdhnMOaZij1P1y/7wIJ5l/oMXHsvRB05ZqPhEW6ouI3dHSjxE3UNkuDi8Z/0Ot4NkzAvKVk4GSZM5PPpluwStaC/YPUdViDHYMfvB6937f74NJBKRkJMcpji66RhNwgDBvPhgVeEFaVTHIvqiH9ATSXCaT5mMgxEpcLU7Ht8= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1716367323; c=relaxed/simple; bh=d8pysnGBDgCMwCe6eQ7F6vaQquxc/I6bo0hgTfy8VeA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ArGEo8P673dZFpOt9zNGppUG7JNiwmNkOfOL9XmzQbRZ1UfdCaKgq6ouIDLWcr+1/o0+AhvOeSkyAcBxLA9Erb/uRl5TFi8HF6293Ah/OSKE7v+TIUW+bMK5m4rJGqNKGJnuJFmPbRKCGMnL+PAVefyAjvWhNwZ3Z4TmIU39ZPU= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716367321; x=1747903321; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=d8pysnGBDgCMwCe6eQ7F6vaQquxc/I6bo0hgTfy8VeA=; b=LWkmW45m5xiqR1x5oOybyNmPBpMqWU6EcxVzz0xP5SBE8/uwOX1xxQvQ pBB3eveE2pKRNcN1xxrvqKEhI9pwDcRIQsBlAq28tX3e5ZgJfqJthM2RY urkToYuacL4hWPsu4SMgyS/cmbc4O13p6cbzK912Yo0M/f0SIoMU1Pknw lRlq3vPVU+W/7lUo9dIFGzOdZh3Fj/ap/5TWioGJuReIPJkknCYakvVyf eVEx01F1mpBFjLL9PLFtVP+CLhoiUNU71++uttHeUVGCHKOuXlFH1/2E0 X6lZqxh4qyv/KJV+99Oic2TBK3ZuJTGeefr1eRiyQHV1ZvgGTr4XCSM9u g==; X-CSE-ConnectionGUID: FXDUopdrRBe6X2qpaNLoiQ== X-CSE-MsgGUID: h5COfZuCQpKw9NjSEHOiMQ== X-IronPort-AV: E=McAfee;i="6600,9927,11079"; a="24016603" X-IronPort-AV: E=Sophos;i="6.08,179,1712646000"; d="scan'208";a="24016603" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2024 01:42:00 -0700 X-CSE-ConnectionGUID: /vi2dkmlQW+LLuja0AmZPQ== X-CSE-MsgGUID: CQOywNSuTJGpjl7MZqPTAg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,179,1712646000"; d="scan'208";a="33807536" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa007.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 22 May 2024 01:42:00 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 22 May 2024 01:41:59 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 22 May 2024 01:41:59 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Wed, 22 May 2024 01:41:59 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 22 May 2024 01:41:59 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GfMDDFVkMEI9iDK2qyidr/VyjuAamMY7Ylkz4tV6Mzx+YvRaP93imDhVNPhWUo4RxQTpnPNJAPPHO/AggNL1wdZFaFvyLCHZeqUWcktCb2wfb204KOknr5xTAVLYmCcdewQVSNU7MvFVDYPMQ6AQHVjgICMIp7eyoNDVoJ8FnpsQwAmEvfqf/rgd38sqFSBEm1eFqjToQjKbUHOR8vR+tgVsXnyUPHzn7wqEUdz9o5BJxfpF2TSOK+QEBovhcqPSSLcxfgWPieCdV5SFceoGMg6gCD7AM1w1zJHQjEc13tbK8ioCzjPhFkuACnuLTnxjtLJmfsV2TDONi9Qo0dZp6g== 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=c80yd2aVjKOOJhVs05HUUIXggFCDbem2TdIsFzI1n70=; b=oFWDG6Jaf3/qg/7j9gMSHqkDDj8tmIt7wkCYr779bpMbaINuJjigumnnfSZydURP+UXLAezPyYKormGUxgSty5m8fhvs8m6ZNHqCJmkfGqUxWB5S7lMENGNdRdUjhJrFbtCQAcXJLGl9hC7NJ02jQNZkAl8rgUh+24wRRde5/L/MIkRKPiQLlU6qOY1K46qDVgRdxKyi0L0j0WFEC98QY42t6Ii8QurnpPmjD2MofoVa3wH+vvduHohn0ujC2N0GMoJOOAjYRVg3+ZALEshlIGoHsrlVyRNlO+2b3opRJ1z7uLik4vrsplNGblkw+Cm96kC18s6ar7zm7rWpvn739g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BN9PR11MB5483.namprd11.prod.outlook.com (2603:10b6:408:104::10) by PH0PR11MB5144.namprd11.prod.outlook.com (2603:10b6:510:3e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.36; Wed, 22 May 2024 08:41:56 +0000 Received: from BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::3baa:3852:4315:38f7]) by BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::3baa:3852:4315:38f7%7]) with mapi id 15.20.7611.016; Wed, 22 May 2024 08:41:56 +0000 From: "Kong, Lingling" To: "gcc-patches@gcc.gnu.org" CC: "Liu, Hongtao" , Uros Bizjak , "Kong, Lingling" Subject: [PATCH v2 4/8] [APX NF] Support APX NF for right shift insns Thread-Topic: [PATCH v2 4/8] [APX NF] Support APX NF for right shift insns Thread-Index: AQHarBsrRWI4LayjA0mjMvMv65NkOLGi75YA Date: Wed, 22 May 2024 08:41:56 +0000 Message-ID: References: <20240522073710.2039035-1-lingling.kong@intel.com> <20240522073710.2039035-4-lingling.kong@intel.com> In-Reply-To: <20240522073710.2039035-4-lingling.kong@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BN9PR11MB5483:EE_|PH0PR11MB5144:EE_ x-ms-office365-filtering-correlation-id: 795c6784-fc1f-489c-d9ff-08dc7a3b09fc x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230031|376005|1800799015|366007|38070700009; x-microsoft-antispam-message-info: =?us-ascii?Q?f2HjQcNP6sTq104/MF1CfQ7wWJBB+91HnRvafRniNgWupoSaGryBOjMcncCK?= =?us-ascii?Q?xyB6AIweNCCkrFHh/jc9R6/2WVXomK2waYQxFZVcBKiY7zqh1hQvWH6+mOld?= =?us-ascii?Q?i3iYatXvpuw9p2tBWNZM/On3gEcmXm8chQFRP4ERFQk2VsRGk2cretwgdEjw?= =?us-ascii?Q?NAnzEa5SX/+I8hDM0ytGfQIYxlGzPnLIXtmdc68WaH1n+JnbUlfiYhMJWktj?= =?us-ascii?Q?lNNBWODraDrH1CptJsjKaW4wjV5N3fWDC8XCRELYXJ26hyt2H6MsvlPn1Qag?= =?us-ascii?Q?gMlwOvDMOMzYHiHMdyeYNLayLveXfFcbRQdSni2XnXQEZRsbEqfVJXoF82SF?= =?us-ascii?Q?jUXTURPnkwOm6367Sgmu6uOCcJL8sNyca+eTjecwr0G+JPVRocBfWwRI7Qp+?= =?us-ascii?Q?cFYcPzZg7dYHDHsr4peIPOSlZ2fxwED/Pq91nQAxpdcwnt+VBbq3dUGbwpIL?= =?us-ascii?Q?BqffjlBq4tQn0eYIXgdulJR2ZHwgGpjXxOVRzbJBAa0Uk4g0fGJR/5GtarXv?= =?us-ascii?Q?VV4myRsNGDxMMQohv9EPoKyK2pZ6Ecr+v3D4A/XcXk9/VlWYnLtxxpFsjSEC?= =?us-ascii?Q?24/2D+a8+QEMC2Ys3HLj8dYxWkI6+L7TmhueOR95MCwt0IPwBJ49hYsK4lQl?= =?us-ascii?Q?PofO1QgErUocAO+3la+b+5mXBeFudpdwbzHiICmnYw1L3vJudvyQZz57+dMZ?= =?us-ascii?Q?zvLmwG59ejk9KIIqZ1VA5mtLwm7et3c9CQPnYQg0i/4E7bPnybZaecDFLfUy?= =?us-ascii?Q?m1WDQ0622k3BK8WKUqm/yVFjsDZGatljqowjMjrITzIjm3b3Ecnh/nYKj5xI?= =?us-ascii?Q?7KH5gsuoldWSpKSC+L0x3DnVsGbuHcqDiKqP+MI25MxUdQ1YddjF/mYyV7Bc?= =?us-ascii?Q?m4FL5jee/4bhTMrdFMmhNLl+mZ0jT1bCBk27OcngRva2jviiOOhzEopntXxA?= =?us-ascii?Q?D5qHjaAVjQuOw1TwH2gBAow1Bate93xqEEdL3qylQu2cy2/j3oR7QtC1Y+H7?= =?us-ascii?Q?CN44vCOwpsvdotlnhEOo+fUXonqziFYS4l3X9ciKw1pTC0uZ1UGtPtG8FXna?= =?us-ascii?Q?81ecc0YonT+zFcLxOdLhuI/ihG8uYvT7/PVScp+etBydAdk+AKbpEnf+1pgl?= =?us-ascii?Q?C75SYAA1pr9T6JDJfTZwE17Z1Ki0v/fC8hOFwph7fLoamOrNlr6hSQ7+jNyG?= =?us-ascii?Q?tWDK7ukH+5LCu6uQqKT+b6vtrbFMtTlAY5b+onWiOkgMDPfz0aYIQfW3HjbM?= =?us-ascii?Q?VUlScoLECAdjLHiZfI5hy8dPCJYLkSzi9VOSepLw/oL43Dp30NNUUo1todsd?= =?us-ascii?Q?Oh8X9Klsm/6XpICUAihbWqXD1V25EwrXBE2zjhca30Chjg=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN9PR11MB5483.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(1800799015)(366007)(38070700009);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?93Nf57fwHzBbqXWzxxa2C99ufkc72mhQ52k9OiHCSD+egN9syaSXL+9szgNH?= =?us-ascii?Q?K73LW/WO85fpm3jsSF73kogWkgGtez2bCOsqgvUaZQFk3V8lvSWxuwfyve1D?= =?us-ascii?Q?cuKGSeFz28t4lZL10CR8+5luKlCYWsqtCYERI4Q43fMPUtGUtSqsWb+AqDpl?= =?us-ascii?Q?7q+rYz0rx2xWyH571kRUWLz3/d7rauEgU/ai7wxkJU1onim8EPGHKzPgdZhA?= =?us-ascii?Q?PAvuet/dax4BNqIQkrBWJcZ8WzbLNRitw0l8qJjBm8lqZLEYsekIc85CJrk7?= =?us-ascii?Q?uSsfHe1z23brSkNc94ZFl2Ns803paw3J8AGUMQrI82d0uy/y/tR9pOwtX7rZ?= =?us-ascii?Q?gSz6AXZFj6rsNQpbYPyo9523VK3/Pnm/YrOSUzgudHXvavaTzSvGqShOTvjt?= =?us-ascii?Q?1kcQWPLXPOkNyOELH7tioc7FD9pwq9d/ET9tAdBq5eVheCus/U8p7FGu1gKI?= =?us-ascii?Q?K6HWHbEG5y76P74+MV9ybrjzewRR3keVu43Uar6rayoRZaH+tl8KjN13wdK+?= =?us-ascii?Q?fPoAyn39R6mrMWSQie8HqER4L1rwi3viahEA9CvMKHT7wK6/2kraad9zzffk?= =?us-ascii?Q?rxf8983TBfDXkTJHPjhp2Cr7RXcPv6Npe28gtCVF4dAhfT7sIPyPEWHJXs2+?= =?us-ascii?Q?au42wJYKab0F5yKTifA9uRL/iTsXykHlayoKHyBQPvhzWtfsswbVZVPgB2Pg?= =?us-ascii?Q?ohYo5pfI4jpJln+vsZeC8Td7dGdQY1/9XaYIh5SWKxwHyW785GJDPGByCAi0?= =?us-ascii?Q?dADQYY1sxBi8Vye3GNkeDFBQ8Zk3UMD3XC9D475IygD/HSA8jPwe9KcgmmY4?= =?us-ascii?Q?iVkGCcDcX99XZq/sOpkNfccX+FEi/0flH7jw796zgYyVafHcFwbAa6dcmnOr?= =?us-ascii?Q?IWYHqriPNq0WhjeeCk9rycGsqh9vHLLnR6TKB3kveU1PZ4RYdBRfJWfLLAEI?= =?us-ascii?Q?uai+as6D39+G8XemsG7Yvtw2Bs/Tbp65Pg2Sx9FeDtOLtbH9pkyKuwtQF3RG?= =?us-ascii?Q?ZTCkLjdlEurpx2UbVYtdXtkAzEsbU9XkMgRE3HorKuwNW8bNW2l4rWtszuHJ?= =?us-ascii?Q?ZEHi/CgNy2OQuhIu8oDdT8nhC4GVLzHK8auDS3lHV7NmqT/cq6KWxz9f0Smz?= =?us-ascii?Q?8WyLHNNIoe3ZbJ9THZ9FGVIaKrhzsbErp2yoOIlvsVzNzORq9QD6URNPHWbP?= =?us-ascii?Q?NpSULGQmQJBWN9KHJYX28UZRlRbr6XGMkRreIrWQtiJnUU9Df3GwLmajt555?= =?us-ascii?Q?eY/qnC4stqgza5diMcZzwudMgoc3c0u16b8Zsffzo8KtNcTKFu9xE4gRyrz7?= =?us-ascii?Q?KJP3V9rvg+jcn94UmUDkea/+5lseTjtpuG3IgSEkh902wAZSQ664mFRVHw40?= =?us-ascii?Q?sMfqxzJEeeIoiTzcH4lzlJWEwGzvOO1EccXEazbf9DbFlF2g1I+wX1KdIpzD?= =?us-ascii?Q?UFywvtfJoGkhHlCZYZBTdSVr0Nb/EJ1UoAGuABEySk4CAuxGWuA6aek98z5H?= =?us-ascii?Q?HRCxiU9twHa8rEf/iobiLqR/bKHj45VgSdgiPtwg7zaIanOsWe5f7JE82uy8?= =?us-ascii?Q?AsDFn8NRoNYwesJhsqUDg+XwuXkmXJQrmjvJagJE?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR11MB5483.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 795c6784-fc1f-489c-d9ff-08dc7a3b09fc X-MS-Exchange-CrossTenant-originalarrivaltime: 22 May 2024 08:41:56.8906 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: AOF45Wy1sFhjYE3UU8I173FmaoSVwzYTma4flobjMED4mpDmi9wtwdd/WUzzyea9Ynkv09XXtzQSrEnY5mb2qw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5144 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_NONE,TXREP 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: gcc/ChangeLog: * config/i386/i386.md (*ashr3_1_nf): New. (*lshr3_1_nf): Ditto. (*lshrqi3_1_nf): Ditto. (*lshrhi3_1_nf): Ditto. --- gcc/config/i386/i386.md | 82 +++++++++++++++++++++++------------------ 1 file changed, 46 insertions(+), 36 deletions(-) diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 271d44= 9d7c4..7f191749342 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -16308,13 +16308,13 @@ [(set_attr "type" "ishiftx") (set_attr "mode" "")]) =20 -(define_insn "*ashr3_1" +(define_insn "*ashr3_1" [(set (match_operand:SWI48 0 "nonimmediate_operand" "=3Drm,r,r") (ashiftrt:SWI48 (match_operand:SWI48 1 "nonimmediate_operand" "0,rm,rm") - (match_operand:QI 2 "nonmemory_operand" "c,r,c"))) - (clobber (reg:CC FLAGS_REG))] - "ix86_binary_operator_ok (ASHIFTRT, mode, operands, TARGET_APX_NDD= )" + (match_operand:QI 2 "nonmemory_operand" "c,r,c")))] + "ix86_binary_operator_ok (ASHIFTRT, mode, operands, TARGET_APX_NDD= ) + && " { bool use_ndd =3D get_attr_isa (insn) =3D=3D ISA_APX_NDD; switch (get_attr_type (insn)) @@ -16325,11 +16325,11 @@ default: if (operands[2] =3D=3D const1_rtx && (TARGET_SHIFT1 || optimize_function_for_size_p (cfun)) - && !use_ndd) + && !use_ndd && !) return "sar{}\t%0"; else - return use_ndd ? "sar{}\t{%2, %1, %0|%0, %1, %2}" - : "sar{}\t{%2, %0|%0, %2}"; + return use_ndd ? "sar{}\t{%2, %1, %0|%0, %1, %2}" + : "sar{}\t{%2, %0|%0, %2}"; } } [(set_attr "isa" "*,bmi2,apx_ndd") @@ -16369,14 +16369,13 @@ } [(set_attr "isa" "*,*,*,apx_ndd")]) =20 - -(define_insn "*lshr3_1" +(define_insn "*lshr3_1" [(set (match_operand:SWI48 0 "nonimmediate_operand" "=3Drm,r,?k,r") (lshiftrt:SWI48 (match_operand:SWI48 1 "nonimmediate_operand" "0,rm,k,rm") - (match_operand:QI 2 "nonmemory_operand" "c,r,,c"))) - (clobber (reg:CC FLAGS_REG))] - "ix86_binary_operator_ok (LSHIFTRT, mode, operands, TARGET_APX_NDD= )" + (match_operand:QI 2 "nonmemory_operand" "c,r,,c")))] + "ix86_binary_operator_ok (LSHIFTRT, mode, operands, TARGET_APX_NDD= ) + && " { bool use_ndd =3D get_attr_isa (insn) =3D=3D ISA_APX_NDD; switch (get_attr_type (insn)) @@ -16388,11 +16387,11 @@ default: if (operands[2] =3D=3D const1_rtx && (TARGET_SHIFT1 || optimize_function_for_size_p (cfun)) - && !use_ndd) + && !use_ndd && !) return "shr{}\t%0"; else - return use_ndd ? "shr{}\t{%2, %1, %0|%0, %1, %2}" - : "shr{}\t{%2, %0|%0, %2}"; + return use_ndd ? "shr{}\t{%2, %1, %0|%0, %1, %2}" + : "shr{}\t{%2, %0|%0, %2}"; } } [(set_attr "isa" "*,bmi2,avx512bw,apx_ndd") @@ -16408,6 +16407,17 @@ (set_attr "mode" "")]) =20 ;; Convert shift to the shiftx pattern to avoid flags dependency. +;; For NF/NDD doesn't support shift count as r, it just support c,=20 +;; but it has no flag. +(define_split + [(set (match_operand:SWI48 0 "register_operand") + (any_shiftrt:SWI48 (match_operand:SWI48 1 "nonimmediate_operand") + (match_operand:QI 2 "register_operand")))] + "TARGET_BMI2 && reload_completed" + [(set (match_dup 0) + (any_shiftrt:SWI48 (match_dup 1) (match_dup 2)))] + "operands[2] =3D gen_lowpart (mode, operands[2]);") + (define_split [(set (match_operand:SWI48 0 "register_operand") (any_shiftrt:SWI48 (match_operand:SWI48 1 "nonimmediate_operand") @@ -164= 76,22 +16486,22 @@ (zero_extend:DI (any_shiftrt:SI (match_dup 1) (match_dup 2))))] "operands[2] =3D gen_lowpart (SImode, operands[2]);") =20 -(define_insn "*ashr3_1" +(define_insn "*ashr3_1" [(set (match_operand:SWI12 0 "nonimmediate_operand" "=3Dm, r") (ashiftrt:SWI12 (match_operand:SWI12 1 "nonimmediate_operand" "0, rm") - (match_operand:QI 2 "nonmemory_operand" "c, c"))) - (clobber (reg:CC FLAGS_REG))] - "ix86_binary_operator_ok (ASHIFTRT, mode, operands, TARGET_APX_NDD= )" + (match_operand:QI 2 "nonmemory_operand" "c, c")))] + "ix86_binary_operator_ok (ASHIFTRT, mode, operands, TARGET_APX_NDD= ) + && " { bool use_ndd =3D get_attr_isa (insn) =3D=3D ISA_APX_NDD; if (operands[2] =3D=3D const1_rtx && (TARGET_SHIFT1 || optimize_function_for_size_p (cfun)) - && !use_ndd) + && !use_ndd && !) return "sar{}\t%0"; else - return use_ndd ? "sar{}\t{%2, %1, %0|%0, %1, %2}" - : "sar{}\t{%2, %0|%0, %2}"; + return use_ndd ? "sar{}\t{%2, %1, %0|%0, %1, %= 2}" + : "sar{}\t{%2, %0|%0, %2}"; } [(set_attr "isa" "*, apx_ndd") (set_attr "type" "ishift") @@ -16504,13 +16514,13 @@ (const_string "*"))) (set_attr "mode" "")]) =20 -(define_insn "*lshrqi3_1" +(define_insn "*lshrqi3_1" [(set (match_operand:QI 0 "nonimmediate_operand" "=3Dqm,?k,r") (lshiftrt:QI (match_operand:QI 1 "nonimmediate_operand" "0, k, rm") - (match_operand:QI 2 "nonmemory_operand" "cI,Wb,cI"))) - (clobber (reg:CC FLAGS_REG))] - "ix86_binary_operator_ok (LSHIFTRT, QImode, operands, TARGET_APX_NDD)" + (match_operand:QI 2 "nonmemory_operand" "cI,Wb,cI")))] + "ix86_binary_operator_ok (LSHIFTRT, QImode, operands, TARGET_APX_NDD) + && " { bool use_ndd =3D get_attr_isa (insn) =3D=3D ISA_APX_NDD; switch (get_attr_type (insn)) @@ -16518,11 +16528,11 @@ case TYPE_ISHIFT: if (operands[2] =3D=3D const1_rtx && (TARGET_SHIFT1 || optimize_function_for_size_p (cfun)) - && !use_ndd) + && !use_ndd && !) return "shr{b}\t%0"; else - return use_ndd ? "shr{b}\t{%2, %1, %0|%0, %1, %2}" - : "shr{b}\t{%2, %0|%0, %2}"; + return use_ndd ? "shr{b}\t{%2, %1, %0|%0, %1, %2}" + : "shr{b}\t{%2, %0|%0, %2}"; case TYPE_MSKLOG: return "#"; default: @@ -16541,13 +16551,13 @@ (const_string "*"))) (set_attr "mode" "QI")]) =20 -(define_insn "*lshrhi3_1" +(define_insn "*lshrhi3_1" [(set (match_operand:HI 0 "nonimmediate_operand" "=3Drm, ?k, r") (lshiftrt:HI (match_operand:HI 1 "nonimmediate_operand" "0, k, rm") - (match_operand:QI 2 "nonmemory_operand" "cI, Ww, cI"))) - (clobber (reg:CC FLAGS_REG))] - "ix86_binary_operator_ok (LSHIFTRT, HImode, operands, TARGET_APX_NDD)" + (match_operand:QI 2 "nonmemory_operand" "cI, Ww, cI")))] + "ix86_binary_operator_ok (LSHIFTRT, HImode, operands, TARGET_APX_NDD) + && " { bool use_ndd =3D get_attr_isa (insn) =3D=3D ISA_APX_NDD; switch (get_attr_type (insn)) @@ -16555,11 +16565,11 @@ case TYPE_ISHIFT: if (operands[2] =3D=3D const1_rtx && (TARGET_SHIFT1 || optimize_function_for_size_p (cfun)) - && !use_ndd) + && !use_ndd && !) return "shr{w}\t%0"; else - return use_ndd ? "shr{w}\t{%2, %1, %0|%0, %1, %2}" - : "shr{w}\t{%2, %0|%0, %2}"; + return use_ndd ? "shr{w}\t{%2, %1, %0|%0, %1, %2}" + : "shr{w}\t{%2, %0|%0, %2}"; case TYPE_MSKLOG: return "#"; default: -- 2.31.1