From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2048.outbound.protection.outlook.com [40.107.104.48]) by sourceware.org (Postfix) with ESMTPS id D22593858C62 for ; Thu, 8 Jun 2023 10:28:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D22593858C62 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=T9SVieHcxuQFmAMJLCCn2cKC26OLWAxTvw8Et5Cb+ps=; b=l+t0B8KwU2Yyf1cv4CtSTgrwEGdnYWP9THWHMePgHy+7WmxLCKNnORhcDwH0BEbKsTAJ3ZfCwYlHRt7zpqu8SQhYI5eUfvkp89O+Uc7Bhcw3RHkQB/w9LOg+A7TqHoZqb9VJnS3ZFOVGbFncA0seuQirSDoEw36deQ2IefxS5oU= Received: from DBBPR09CA0021.eurprd09.prod.outlook.com (2603:10a6:10:c0::33) by DB9PR08MB7470.eurprd08.prod.outlook.com (2603:10a6:10:36e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.31; Thu, 8 Jun 2023 10:28:34 +0000 Received: from DBAEUR03FT019.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:c0:cafe::9) by DBBPR09CA0021.outlook.office365.com (2603:10a6:10:c0::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.19 via Frontend Transport; Thu, 8 Jun 2023 10:28:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT019.mail.protection.outlook.com (100.127.142.129) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.24 via Frontend Transport; Thu, 8 Jun 2023 10:28:52 +0000 Received: ("Tessian outbound e13c2446394c:v136"); Thu, 08 Jun 2023 10:28:52 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a61263ca540dc73a X-CR-MTA-TID: 64aa7808 Received: from fd04fa3b4e54.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 609FE11C-1847-425E-8D02-1BD17BED74D7.1; Thu, 08 Jun 2023 10:28:42 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id fd04fa3b4e54.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 08 Jun 2023 10:28:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SSUSSIf6z4mEoGxHfHW5abCMrzDJ3xDVShhIwvPQxfRkFMHmsdkhTyDcOpPmIxYLOhMx9FJtDiwF8xkv9+YKoD96Y3gJWwDZVZ4PVvTTWwfgKXNMGxkYW/HD16bJWuTg3ocED5CrIC6Ux5WWsmxMLxTIUjh5ItLKQ+wBSWILTi2vLZSJxJX0112Bt7gstUim6j0pfkT2KccjdsOaVSnwcPBWC4TUFMn68HuFFiU7R8ESsRLohB3pi2S9W/8c0gtVvubOsUYADw8HWu48TWttJo6NYnx3gOboz135W5bLM8lMRZ3p34i+VJS8i+XaSxMRUiIdOS+aHbRCojjrT5TQsg== 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=T9SVieHcxuQFmAMJLCCn2cKC26OLWAxTvw8Et5Cb+ps=; b=jWkqY2lXAq7Z0GqONbgIEffd1m12Vc9sqfeB0S7zpvImPRIhU1HkRF0GxsIC80Uawvh0elDRU0LSAt++6hRETf73e1u1upeYjYUDcMroaVL4ymGClEQDYcZ8oVxYoNuI8GemBVnMEfFA3Q7zzFq5Yw1eSrBmOjceH5GKyZ8k7NeRjMgwt9Bg5kRGkpASnZOVhEu70NNtC/wFEixUeUHVaw9a58opGm+DiqtHQqwxifRDGImBUXcCBl/bq+ir0pjxLpKanFf0D0hq2kmf5b/cp9L/qxZzQcP6OyZ49+iKO9CAS1sCG5p/qGbe7ok4bNLN3eWwIoaW1qlAsyAmNhmdeg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=armh.onmicrosoft.com smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=T9SVieHcxuQFmAMJLCCn2cKC26OLWAxTvw8Et5Cb+ps=; b=l+t0B8KwU2Yyf1cv4CtSTgrwEGdnYWP9THWHMePgHy+7WmxLCKNnORhcDwH0BEbKsTAJ3ZfCwYlHRt7zpqu8SQhYI5eUfvkp89O+Uc7Bhcw3RHkQB/w9LOg+A7TqHoZqb9VJnS3ZFOVGbFncA0seuQirSDoEw36deQ2IefxS5oU= Received: from DUZPR01CA0074.eurprd01.prod.exchangelabs.com (2603:10a6:10:3c2::20) by AS2PR08MB8975.eurprd08.prod.outlook.com (2603:10a6:20b:5fb::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.19; Thu, 8 Jun 2023 10:28:36 +0000 Received: from DBAEUR03FT007.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:3c2:cafe::27) by DUZPR01CA0074.outlook.office365.com (2603:10a6:10:3c2::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33 via Frontend Transport; Thu, 8 Jun 2023 10:28:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT007.mail.protection.outlook.com (100.127.142.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6477.25 via Frontend Transport; Thu, 8 Jun 2023 10:28:36 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 8 Jun 2023 10:28:36 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 8 Jun 2023 10:28:35 +0000 Received: from e119885.cambridge.arm.com (10.2.78.52) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Thu, 8 Jun 2023 10:28:35 +0000 From: Oluwatamilore Adebayo To: CC: , , Subject: Re: [PATCH] vect: Missed opportunity to use [SU]ABD Date: Thu, 8 Jun 2023 11:28:30 +0100 Message-ID: <20230608102830.23565-1-oluwatamilore.adebayo@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230606143446.50118-1-oluwatamilore.adebayo@arm.com> References: <20230606143446.50118-1-oluwatamilore.adebayo@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT007:EE_|AS2PR08MB8975:EE_|DBAEUR03FT019:EE_|DB9PR08MB7470:EE_ X-MS-Office365-Filtering-Correlation-Id: c3dd3322-dbab-4fc3-b5ef-08db680b27e6 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: P3OWuRrw7ly80oCG3lxLrH7q5hCVQIshdv+853LeK6holaxngY7HugTKZPmrrRQZ9M6POMnjl/iEORYbXEVNFOdS2YQ6eoPM30KdPXOu9iTw8fbKwyaSPzzJ5QqfDtpW5/7QKnbzBrm8vIXTNvKLxVG+pwrXaAqZPNhs/twCS8AnRgr7u8PXpRYWeYDanfjL5uYR/iU3N8T/LJZ4VVDS6fWCgFTwplwW59VWT766OneL75zCIji/urVwO0Xq/kke/wgCLWP3r56sJp1RMngRvJTfFjKzG1eKDbNBtyx5+0GimzirxQ2Nfoqp1cMFYT9hh8Hl1Eyj+HrZ5/kbW6wtSJJcYEbGRsW1VeqFVjs7GTF7pLDMQlfJyOgMXGKTIfVII+kwoGNXzdIGc9VgeXDGOlUAZIwALHVC0U5mYc0xX9KJ3Oj7TeUOaObyxK75D3/TaBQM7u8bFDew14cLlbUjlEazpSEl+ws7kIs76MzAfDchGuhavV2flGqCYmqde7f72YSgBpMwVt5qiUxftufGwN2xSQAEaEkm86AfNpbn6KW/DSh+VBUkUwWdgawFn7qhyMPVJSo/1FEdshFMcTzAwDM0PI+KYFNEwaGhk39jqE1tW0kwcAAU8+QlFuwSwazquoX6SnmCie1fje5Wnj9PoBa9Nv5+X4HBQqf67qCGKQyKaIYuBKkuYhtV0EZ+3ZQhCUo31BbD9zVR275de+dhATdk2TNaenPfzuB0okkEzoew9X870iz7qVPtRcIWSR2He1Do2Ao091aR087f+pVimA== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(396003)(136003)(376002)(39860400002)(346002)(451199021)(36840700001)(46966006)(40470700004)(26005)(81166007)(44832011)(1076003)(70206006)(70586007)(5660300002)(356005)(86362001)(6666004)(186003)(82310400005)(4326008)(8676002)(82740400003)(8936002)(6862004)(7049001)(2906002)(40460700003)(41300700001)(478600001)(47076005)(2616005)(40480700001)(37006003)(54906003)(426003)(336012)(6200100001)(7696005)(36756003)(36860700001)(316002)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8975 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT019.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 37a54f30-cd0d-4639-6858-08db680b1e5a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: j1Xg8YZL6PuVp8SyFWcdT2yf7YWBYkcVy12wZ9ZPdwtB4wZlNvPst0fiwdn3WhghWBlY3vIlKf9hvX29cKffwssJ84NGiOxhe0iZACA1I/zzQ50kOFt9Jwh3fbnyRmgKAz+Q0aoi3B6aEaS1rr0kcuTvklc468jawfcopAlpAeUW8eNK0jU/66CFSzhKWUeMOca7b6G9/ROe+3PHxDOM4yJPNLQ4hwk0I0oPqFeHI9uFTRtTb/04uzSaCpzpA+AXk4ifKHvg+VoQ+mJ1lxJHhO0SxaM79c2/S1mEdLkm5gwo+ieFQdPEPNA6Bl2NLouRkb8vB3PwdguTox98FmZYD9uHvmnz3DN/DketafgdEfGYFgAev1xKDyKsVRrlp5/v/UfTKRkpeQA+VczIo+EPqksN/8hjB85J+WgRKXtar9E+UMvokqilBwB0mL/Ug9i3+UB9pnck81SPp471hHEiGk//lSI3WUpNy9Sx/V2ZL92q8Qptw2rT7r8P9NTn7SdwJ1W/GWqt6yBhpMDneDOHKTNxWvM2lqAaaHfCF092WCrHuS96jeAvlAsUMtkGxFWC3aad7rwu3cin+p7l8qo05SJo+TdxLAHWOtiEp0Vao+YHldkWDG8kgyi/gfaD4twSvkiTRoKYSD53vSOhqfYbXqZTzF06J6ievNLJXk/+mH4PtZjtH/0/ZqgYb2jdOs+WtOq0Tf4wh1xaBv4fI9VeNPsvS2IQbwP3sPXapu1MRwg= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230028)(4636009)(136003)(346002)(396003)(376002)(39860400002)(451199021)(46966006)(36840700001)(40470700004)(44832011)(6200100001)(1076003)(26005)(82740400003)(37006003)(5660300002)(7049001)(6862004)(36756003)(316002)(186003)(2906002)(81166007)(40480700001)(86362001)(41300700001)(8936002)(2616005)(8676002)(6666004)(70586007)(70206006)(40460700003)(426003)(4326008)(54906003)(336012)(47076005)(82310400005)(36860700001)(478600001)(7696005);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2023 10:28:52.6417 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c3dd3322-dbab-4fc3-b5ef-08db680b27e6 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT019.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB7470 X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,KAM_DMARC_NONE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: New patch to address issue brought up in a different thread: mptjzwgplp2.fsf@arm.com > > + /* Failed to find a widen operation so we check for a regular MINUS_EXPR. */ > > + if (diff > > + && gimple_assign_rhs_code (diff) == MINUS_EXPR > > + && (TYPE_UNSIGNED (abs_type) || TYPE_OVERFLOW_UNDEFINED (abs_type))) > > + { > > + *half_type = NULL_TREE; > > + return true; > > + } > > the condition should instead be: > > if (diff > && gimple_assign_rhs_code (diff) == MINUS_EXPR > && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (abs_oprnd))) > { > *half_type = NULL_TREE; > return true; > } > > That is, we rely on overflow being undefined, so we need to check > TYPE_OVERFLOW_UNDEFINED on the type of the subtraction (rather than > abs_type, which is the type of ABS input, and at this point can be > different from TREE_TYPE (abs_oprnd)). I found that doing this alone would get rid of cases which otherwise should have gone through so I added an extra step such that if this part fails we'll try to find the unpromoted diff operands and then try the type overflow check on the types of the unpromoted operands. Patch is in the next response.