From patchwork Tue Aug 14 16:49:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Oliva X-Patchwork-Id: 957582 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-483648-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gnu.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41qdr53nslz9sC7 for ; Wed, 15 Aug 2018 02:50:09 +1000 (AEST) 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=JEtOf8iXRQghqjb0m1H4WpWpnNs8d9MKTk9geyEvMEll9e62F5arH J2BIc1mb9BpHV9EJZJgETL4s9xufeqXpJ4lIpdh39yCFB5nMzdsU9/FgEXeo7eKG ZziinQXgLx2derozsWMZT4kSuwRI/kizXAqel7VUPm+65KS/qoi+xA= 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=6UirlJghxqwi9aWEhpqT0+iDZKM=; b=Lz9M2t0ChdFH9eLnkee2 BwpWv+t17cqTtubtG23GSsnEOpOr2c6EhAai1Kfdoo4NDvg7hZg6klmpWRCSPnPZ lJI+uMlOWiJ5St1+DRdeLd5WCiYDEWdvjCl1vVDZBaWUhuYoVKSiOkRfS9F6DA69 Dp6wm1IJq7DPGmM/ua+2LmU= Received: (qmail 97717 invoked by alias); 14 Aug 2018 16:50:02 -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 97686 invoked by uid 89); 14 Aug 2018 16:50:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Evangelist, freedom, evangelist, Hx-languages-length:1363 X-HELO: linux-libre.fsfla.org Received: from Unknown (HELO linux-libre.fsfla.org) (208.118.235.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 14 Aug 2018 16:49:59 +0000 Received: from free.home (home.lxoliva.fsfla.org [172.31.160.164]) by linux-libre.fsfla.org (8.15.2/8.15.2/Debian-3) with ESMTP id w7EGnZVp021664 for ; Tue, 14 Aug 2018 16:49:46 GMT Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTP id w7EGnPI1014431; Tue, 14 Aug 2018 13:49:25 -0300 From: Alexandre Oliva To: gcc-patches@gcc.gnu.org Subject: fix reassoc cut&pasto Date: Tue, 14 Aug 2018 13:49:25 -0300 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes I guess this was a cut&pasto. I caught it during code review. It doesn't seem to matter much: I haven't been able to get any codegen difference from this change, not in a bootstrap, not in test runs. I even put a gcc_unreachable() in case the test on rhs2 were to return false (which would never happen after the test on rhs1 passed, when rhs1 and rhs2 were the same), and still no hits in stage3. Anyway... Regstrapped on x86_64-linux-gnu. Ok to install? From: Alexandre Oliva for gcc/ChangeLog * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto. --- gcc/tree-ssa-reassoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index 41a37ab29899..6b0bf5c03548 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -618,7 +618,7 @@ is_reassociable_op (gimple *stmt, enum tree_code code, struct loop *loop) && has_single_use (gimple_assign_lhs (stmt))) { tree rhs1 = gimple_assign_rhs1 (stmt); - tree rhs2 = gimple_assign_rhs1 (stmt); + tree rhs2 = gimple_assign_rhs2 (stmt); if (TREE_CODE (rhs1) == SSA_NAME && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rhs1)) return false;