From patchwork Fri Nov 17 16:06:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 119171 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp700017qgn; Fri, 17 Nov 2017 08:07:09 -0800 (PST) X-Google-Smtp-Source: AGs4zMa3Y0Ise1ptNFW7CVCBk2aT7v0xfxawZYVWbH4P+ty3AQc8Vg5lLFJkgBnmqQWNY9Qxap76 X-Received: by 10.98.4.67 with SMTP id 64mr2548196pfe.214.1510934829505; Fri, 17 Nov 2017 08:07:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510934829; cv=none; d=google.com; s=arc-20160816; b=K4ceayBnMugzqG9gP+EGNZLigqHvPpq4NvIwSWotfYBEWGTuO/9yOonrua6SHnhHSm iG/s9S1UaQVdzOCozbdPZVpPwzcirPzogO812XI85aIbxOdkS1fE6N0Q6u0Hv85t+weC 3qM3L6PGl3jWH56cFkIfWP3v49yhUqFpL7FVrU5hlrEsqxYGgYM9ypRx5mz1YkZcmJhP VuvgXoNiCNWvDv60Exge561NEFWMJapWLh68o/kpqD06iJY2lJKSVq75R33OHuyfllG2 p0VMgr/igJUOMbKoO+1p0FscesXTSuCmMY9Nx+CowfXEWxIdZNGLRvGOcujAqTCx1tqE oaDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:message-id:date:subject:mail-followup-to:to :from:delivered-to:sender:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature:arc-authentication-results; bh=JdH754dHTzjeFx7AzXeW8/UvR2+c90wsHkH5MZB9950=; b=cA3notvLCOhUcWIBnldU85UdJ+O9Hx8l/YPjHa/QpoqfU1SBDdqw5Sr8rgNVgr5dIz RXKLs74gxfQ4e2cfPteUrdlTYbQqA87kn4O3AEWKnYeXXNsuXoMIp7jBjG8hqXeQ/Cnt hkf9eedTnWKjiV2pGYZGFt0DizbYHl9YtJWM3QNcYZUlroIJGRzEOz5td/+patd7JFnb 8zU8Po3qtyvR+k64/pNIeFnApkqav3QWDNVco4i+0eVIt3SZ8sghKhJGibxx8ABrjbpw K9qv4VodWpfKNg4mGZI/a5dVDqip0i424YekhgUZyx2C0ZjlHc8sFF4+76bMTEqcaYfZ XVyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=wC6dQ8Vu; spf=pass (google.com: domain of gcc-patches-return-467167-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-467167-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id c2si2979682plb.787.2017.11.17.08.07.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Nov 2017 08:07:09 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-467167-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=wC6dQ8Vu; spf=pass (google.com: domain of gcc-patches-return-467167-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-467167-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=Uvx+7vAAtvN/68xTO21CdRerbJoze4A+ZPJqGlyqcwMDbLL+i8RNu 4i7Q14UWgGAh4YgU8PK515GV9+anobEh35IxKwqZnKXj/GTIwCbH+RelYTL70d7Y H8Nt6vF2P2SHmQYL5nyuCjN9eKN1Sxq3jdtkRc+IQMCNXlleIhdiew= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; s= default; bh=Q6Xc+dnOGNJdzzNArTk75Vza5YI=; b=wC6dQ8VuqBLLJkbIgbDG CJWv7QVz0K4ZZBHzJqhRI8sWfNmNpMWMSQq5deBGOikzcJ6/exgwQRiGC2ZRAejc gVDsaZBfhKiHQeoRYlL15nNEKxWRjmtVoufZx46p9eH8sz224CUB6MexGlDuipgT S1LeIZsvf6uxRFAWbEspxdg= Received: (qmail 25043 invoked by alias); 17 Nov 2017 16:06:42 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 24736 invoked by uid 89); 17 Nov 2017 16:06:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KB_WAM_FROM_NAME_SINGLEWORD, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm0-f67.google.com Received: from mail-wm0-f67.google.com (HELO mail-wm0-f67.google.com) (74.125.82.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Nov 2017 16:06:40 +0000 Received: by mail-wm0-f67.google.com with SMTP id y82so3923638wmg.1 for ; Fri, 17 Nov 2017 08:06:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:mail-followup-to:subject:date:message-id :user-agent:mime-version; bh=JdH754dHTzjeFx7AzXeW8/UvR2+c90wsHkH5MZB9950=; b=BWIEINIZUip9UyXbLjGiHMFMbrz5J74uKlAtgNlYvZNZd7Cm5z7cMdeTBX3JvGXbAb kjwvvJVJ8pQ/GQaUXyQwfqsIWvgfJOYd1B+3FhhAiww3CcJJvFy5aVBY+ABSmJ5AQXGH 7xAPsmsZrRHcg1YwA262uRexi9psv3AwjXbzf9P698roNy4w/IPYiRp2Q59eRK/l5YK5 6c+1L6wiUDiHu+myyvXf+GAHVgLaQf51rfOFe9BEUmcc5FdRgO6AIgeuedTPcWTNvgGm Q7+uA7g3TvnilcxOP2dF8gONJn1jRTuj6ZpA8EICbj8oo4ijfF/JtZY7XLQYBdvFqTAM Jx2A== X-Gm-Message-State: AJaThX5a1qhEBQqzQpyyRv9uJz8SKQdYMU97vbowhJQvitT6FUXA/RV3 dRuWPBKPOuX1FDmw+v5/lGA4rRWswKs= X-Received: by 10.28.58.15 with SMTP id h15mr4376098wma.48.1510934798131; Fri, 17 Nov 2017 08:06:38 -0800 (PST) Received: from localhost ([2.25.234.120]) by smtp.gmail.com with ESMTPSA id o190sm4765431wmd.32.2017.11.17.08.06.36 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Nov 2017 08:06:37 -0800 (PST) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: Remove unnecessary temporary in tree-if-conv.c Date: Fri, 17 Nov 2017 16:06:27 +0000 Message-ID: <874lpsyjng.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 The call to ifc_temp_var in predicate_mem_writes become redundant in r230099. Before that point the mask was calculated using fold_build_*s, but now it's calculated by gimple_build and so is already a valid gimple value. As it stands, the call forces an SSA_NAME-to-SSA_NAME copy to be created, whereas SLP expects that such redundant copies have already been eliminated. This is latent at the moment, but since it's dead code... Tested on aarch64-linux-gnu (with and without SVE), x86_64-linux-gnu and powerpc64le-linux-gnu. OK to install? Richard 2017-11-17 Richard Sandiford gcc/ * tree-if-conv.c (predicate_mem_writes): Remove redundant call to ifc_temp_var. Index: gcc/tree-if-conv.c =================================================================== --- gcc/tree-if-conv.c 2017-11-17 15:07:43.953630256 +0000 +++ gcc/tree-if-conv.c 2017-11-17 16:05:10.483025412 +0000 @@ -2261,7 +2261,6 @@ predicate_mem_writes (loop_p loop) } gsi_insert_seq_before (&gsi, stmts, GSI_SAME_STMT); - mask = ifc_temp_var (TREE_TYPE (mask), mask, &gsi); /* Save mask and its size for further use. */ vect_sizes.safe_push (bitsize); vect_masks.safe_push (mask);