From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Google-Smtp-Source: AGHT+IH1usEEq191vRtzY5yCDAEa6to/ZhyUpSBfkt4+QItmQf0nAGP1j0+vjw302ImR1TabD/g6JQ== 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 Cc: Philipp Tomsich , Robin Dapp , Jakub Jelinek , Richard Sandiford , Manolis Tsamis 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 Content-Transfer-Encoding: 8bit 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 List-Id: 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. */ -- 2.34.1