From patchwork Fri Mar 15 10:25:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Belevantsev X-Patchwork-Id: 1056937 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-497950-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ispras.ru Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="sEfr+sYB"; dkim-atps=neutral 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 44LMFk28CRz9s00 for ; Fri, 15 Mar 2019 21:27:01 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=kubq10T2xd+y20oQWGEXFT2TVc6Yt4jNvxdYZMbiYHr50T0YxS vQINyPU6mfrAJ6FgkBvTpdJ7XxxUpKfCMLtEDb42joMdkRXbwaDzZZPtLA3FUsyi thY7bG27lLoXlfLTuACwtEACD4RHIgysb06eVjPcdEt6q9WvxR5Ty5Tso= 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:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=m0gg6TSIpKZ0+cSyb5G6UgmDf5g=; b=sEfr+sYB4v0Oxf6j1+0H FrmbelcL/au232TxPIBgu9lyHkBGqIqFPkzp7qUxOrVWZD51LlBfYikVGH8lGMYF /8QiPreospv2UC2otEIispt1KJlr6p6rnHYdf2rfcg78SBR76sAFpnmXuMWm1OUC pJFm05/Jdv78uVYUhgbtMK0= Received: (qmail 11753 invoked by alias); 15 Mar 2019 10:26:53 -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 11742 invoked by uid 89); 15 Mar 2019 10:26:53 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-13.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=trail, H*M:0a65, H*MI:0a65, H*UA:6.1 X-HELO: mail.ispras.ru Received: from mail.ispras.ru (HELO mail.ispras.ru) (83.149.199.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 15 Mar 2019 10:26:51 +0000 Received: from [10.10.3.52] (pluton2.ispras.ru [83.149.199.44]) by mail.ispras.ru (Postfix) with ESMTPSA id C433A54008C; Fri, 15 Mar 2019 13:26:48 +0300 (MSK) To: GCC Patches Cc: Alexander Monakov From: Andrey Belevantsev Subject: Fix PR 86979 Openpgp: preference=signencrypt Message-ID: Date: Fri, 15 Mar 2019 13:25:57 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 X-IsSubscribed: yes Hello, As explained in the PR trail, we incorrectly update the availability sets in the rare case of several successors and one of them having another fence. Fixed as follows. Ok for trunk? Best, Andrey 2019-03-15 Andrey Belevantsev PR middle-end/89676 * sel-sched.c (compute_av_set_at_bb_end): When we have an ineligible successor, use NULL as its av set. diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c index 315f2c0c0ab..2053694b196 100644 --- a/gcc/sel-sched.c +++ b/gcc/sel-sched.c @@ -2820,10 +2820,12 @@ compute_av_set_at_bb_end (insn_t insn, ilist_t p, int ws) FOR_EACH_VEC_ELT (sinfo->succs_ok, is, succ) { basic_block succ_bb = BLOCK_FOR_INSN (succ); + av_set_t av_succ = (is_ineligible_successor (succ, p) + ? NULL + : BB_AV_SET (succ_bb)); gcc_assert (BB_LV_SET_VALID_P (succ_bb)); - mark_unavailable_targets (av1, BB_AV_SET (succ_bb), - BB_LV_SET (succ_bb)); + mark_unavailable_targets (av1, av_succ, BB_LV_SET (succ_bb)); } /* Finally, check liveness restrictions on paths leaving the region. */