From patchwork Wed Aug 30 10:14:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manolis Tsamis X-Patchwork-Id: 137165 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a7d1:0:b0:3f2:4152:657d with SMTP id p17csp4441800vqm; Wed, 30 Aug 2023 03:16:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IExzjKznNmesKYSn0Sn9jnqqrrKU+/0e1v7+t2Y3F1JL/wp25dUSuw6PItFiM40jBuI1d77 X-Received: by 2002:a17:907:7da7:b0:9a5:b2d8:e925 with SMTP id oz39-20020a1709077da700b009a5b2d8e925mr5422543ejc.33.1693390601932; Wed, 30 Aug 2023 03:16:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693390601; cv=none; d=google.com; s=arc-20160816; b=cQMtWSSajPeERK30/k5ksDJua0HcW+Oyc+9DNYw4SBWoLJK59/a3Bl0isFyic/dzJS k2HQDvBVy79bVZmTfJ7Ka7+TYSo8tk9++64HQ4ky+cwQDdT6IySV1RbUP25+sSvLBxM6 nKRVxk/Qzlf8TFAmyKkNkwHt7XAIZdDArYkqfiaHIUkvrU2Or/OYPKO2nkxFW5hV4r93 EV5oYcA9d2uQpvKCpsbX0pXxzmVsUAZ7/6JjIlo9BjZagQhpSxx013ePfp0CU0oa1iWv iaur1uhkNe+qGiYY9cVyyM4IdUSuEuNbVusbHdPX1HyMTBsyK+8J1A+Z59X1tCox9c0D RnWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:dmarc-filter:delivered-to; bh=BQGoUBKhvF6DGQ4u91965zkf6FuSZATtu34C137ZOpw=; fh=woiY3K3H7Cf0yJyo65+kvTYqCFQ1uf3TZPnMDzMwLaw=; b=tsL1NTA4kUGCspD5jkilW0ozTNiH3dBvQKQjcEYRLmG7oOT+whVWiNAcMa1Z8Z+IjM FvGO8XQ0vA59GCVa7OV7fuBpqchuxFTqLEoVLiHxcpYZ9fe8Xn0UPd848h6Oqkuw7Z9F jRE6cik3lN94zkQ6JYYe1ZAS2pFLsbcswrd8amC9tN9BIZreSQlJUrw+E/m+gbyuT7Vl yE29cAIJo9wEplhqGWCRJDC0oDZHTElMbCwcKq4atSvJ10qFhOIzL4ct/MYWKdoRB66F N4aBRrm+e7MAsTKjqEwfDfDvC9rI2krXyaXKFMBLp5+Iov9KjRRU1PPa5OTVm063Y0cW 2QJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@vrull.eu header.s=google header.b=qFTq+TjU; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id u23-20020a170906951700b009a189b0bbc9si6063767ejx.568.2023.08.30.03.16.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Aug 2023 03:16:41 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=fail header.i=@vrull.eu header.s=google header.b=qFTq+TjU; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F1143385C6E5 for ; Wed, 30 Aug 2023 10:16:02 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by sourceware.org (Postfix) with ESMTPS id BC8903858402 for ; Wed, 30 Aug 2023 10:14:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BC8903858402 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-500bbe3ef0eso838664e87.1 for ; Wed, 30 Aug 2023 03:14:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1693390469; x=1693995269; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BQGoUBKhvF6DGQ4u91965zkf6FuSZATtu34C137ZOpw=; b=qFTq+TjUDX4Yck8hYXNcxV6vO8SxKdYyIUVUf45bIpbMuPYaxk83bIvWQVQAkghrgS Z1Fe8/VRmNduvIXpRFGtY4Dnev7ALAixl3A+SusRSbcQeQcuPgbpAcxDcRhJSrfMBOfO fR15LcnDU2A/ToJ/RFaQQ+nvEJAXGmIlQbPqJ02FKxt1TwQjwBhMJP5zRvViw2WtOrWI fgP/g8ubvPMNYqCygtHEcKSIVnZX5S8g7TfzS4HTr57CbP/X6TNRrrCe0TEFEaAi8hrV nDPuY626p71BwpTVGI8DXTLeULnqazIpDY/6nKiQDVNJLnCYlMET0da91t2p9Bp1H2QL hFMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693390469; x=1693995269; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BQGoUBKhvF6DGQ4u91965zkf6FuSZATtu34C137ZOpw=; b=bfcIP7NxE87hyUrI29jCoLF14MGnaJwWqPAcvRkZJy+6qDq0L9E4+xvhf+L/KhOHJL /Uc5f7mgE5YF1TvX95t2IsZlBJ7ccHPeIVk6lYKvLn+SLGEfNCYVnGECmiUJWSWax2QA gFHwLGCJkEjKizi5PRUS0yFoq2Su1efuIpaDzg9m9N6KM31W2c/QttgzU6oFOteRKb0B 8onTxb2N0CkUIYr5BpYZnkd0E92FdG6U0AVFYlkTdrAioOBAKEG05lkDnpWGe1g6vyXy DzCo1cwivdKBd7vSg55J8NrIaRnAfCABETgJ0R6g/l+D1kI4GGBr5yWVY6IszRx15MiH r+CA== X-Gm-Message-State: AOJu0YxiWQSvLTDvQhV1wXCWdMLtfMecB15znaug+LTeLV0YNTUPERgJ 5ZijBk9+eF3lZsmM0Y0uHsWbd3LY2hzRFmY787NbAw== X-Received: by 2002:a05:6512:3d94:b0:4ff:9a91:6b73 with SMTP id k20-20020a0565123d9400b004ff9a916b73mr731735lfv.17.1693390469032; Wed, 30 Aug 2023 03:14:29 -0700 (PDT) Received: from helsinki-03.engr ([2a01:4f9:6b:2a47::2]) by smtp.gmail.com with ESMTPSA id w7-20020a19c507000000b004fe36e673b8sm2327579lfe.178.2023.08.30.03.14.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Aug 2023 03:14:28 -0700 (PDT) From: Manolis Tsamis To: gcc-patches@gcc.gnu.org Subject: [PATCH v3 4/4] ifcvt: Remove obsolete code for subreg handling in noce_convert_multiple_sets Date: Wed, 30 Aug 2023 12:14:00 +0200 Message-Id: <20230830101400.1539313-5-manolis.tsamis@vrull.eu> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230830101400.1539313-1-manolis.tsamis@vrull.eu> References: <20230830101400.1539313-1-manolis.tsamis@vrull.eu> MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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 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: , Cc: Jakub Jelinek , Richard Sandiford Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1775648743660865453 X-GMAIL-MSGID: 1775648743660865453 This code used to handle register replacement issues with SUBREG before simplify_replace_rtx was introduced. This should not be needed anymore as new_val has the correct mode and that should be preserved by simplify_replace_rtx. gcc/ChangeLog: * ifcvt.cc (noce_convert_multiple_sets_1): Remove old code. Signed-off-by: Manolis Tsamis --- (no changes since v1) gcc/ifcvt.cc | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/gcc/ifcvt.cc b/gcc/ifcvt.cc index ecc0cbabef9..3b4b873612c 100644 --- a/gcc/ifcvt.cc +++ b/gcc/ifcvt.cc @@ -3449,44 +3449,6 @@ noce_convert_multiple_sets_1 (struct noce_if_info *if_info, if (if_info->then_else_reversed) std::swap (old_val, new_val); - - /* We allow simple lowpart register subreg SET sources in - bb_ok_for_noce_convert_multiple_sets. Be careful when processing - sequences like: - (set (reg:SI r1) (reg:SI r2)) - (set (reg:HI r3) (subreg:HI (r1))) - For the second insn new_val or old_val (r1 in this example) will be - taken from the temporaries and have the wider mode which will not - match with the mode of the other source of the conditional move, so - we'll end up trying to emit r4:HI = cond ? (r1:SI) : (r3:HI). - Wrap the two cmove operands into subregs if appropriate to prevent - that. */ - - if (!CONSTANT_P (new_val) - && GET_MODE (new_val) != GET_MODE (temp)) - { - machine_mode src_mode = GET_MODE (new_val); - machine_mode dst_mode = GET_MODE (temp); - if (!partial_subreg_p (dst_mode, src_mode)) - { - end_sequence (); - return false; - } - new_val = lowpart_subreg (dst_mode, new_val, src_mode); - } - if (!CONSTANT_P (old_val) - && GET_MODE (old_val) != GET_MODE (temp)) - { - machine_mode src_mode = GET_MODE (old_val); - machine_mode dst_mode = GET_MODE (temp); - if (!partial_subreg_p (dst_mode, src_mode)) - { - end_sequence (); - return false; - } - old_val = lowpart_subreg (dst_mode, old_val, src_mode); - } - /* We have identified swap-style idioms before. A normal set will need to be a cmov while the first instruction of a swap-style idiom can be a regular move. This helps with costing. */