From patchwork Thu Feb 6 22:16:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 1234648 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-519090-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha1 header.s=default header.b=OKgFYRB8; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=S2FMknTX; 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 48DCSz37Nxz9s3x for ; Fri, 7 Feb 2020 09:16:32 +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 :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=RgqYlfKRvDVbRggqcYZWda8bqAVFbCPNL8+yvDiRryig2pEkHc HczzVkd9FyOiBZIhSRDubbopN1RExvpaPYot2A0loQGIbEJpsIy3zMww20Kx+beS dzGFtYXxeIBphuFi9/LeXgJXThCRiiQPhn7zCMeCWYOgPKbkoc8jSAMAs= 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 :from:subject:message-id:date:mime-version:content-type; s= default; bh=E+aXdZlZsFPM74dKIRNjFHsvqY8=; b=OKgFYRB8adCRDT0wwfZt xym+pP1UQAsVxGQ5tOCetQ2cHt5412psSdNmIrODuyLxEmMVyviKISsOYGUmNeXS jlINMnyOKlwsocRM1O1JrRuTXM9BAdLZZb/ttwCAlKLq2PudIPsZ5jKHNnT9VeAX Wd13VkPmiA93ga1lx4/hi+Y= Received: (qmail 64900 invoked by alias); 6 Feb 2020 22:16:25 -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 64850 invoked by uid 89); 6 Feb 2020 22:16:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-17.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: us-smtp-delivery-1.mimecast.com Received: from us-smtp-1.mimecast.com (HELO us-smtp-delivery-1.mimecast.com) (207.211.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 06 Feb 2020 22:16:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581027382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=UFzh5+6t/aFfxFhcgOwbC7hKh6H9JiBCnPn2XvKP/4Q=; b=S2FMknTXEuFdamg5hq7eyhmjnVB3cWiE4ihIvE/ith5q0kS4abakJrFS81iwzQuD0URT1z of3YoKqAtFZcqDk5sTuSODobScD8NOKWy1q9cBDafRWmmhTbjQxYLbo8qn3nqovJO7zeMz a3XQsEpeQnLfG9P8ufd7G7QWoqtaTT4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-155-njb3G2awMb-lmJrCwFQ9Xg-1; Thu, 06 Feb 2020 17:16:16 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8128D107B7D4 for ; Thu, 6 Feb 2020 22:16:15 +0000 (UTC) Received: from tobol.usersys.redhat.com (unused-10-15-17-174.yyz.redhat.com [10.15.17.174]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4D0C9790EB for ; Thu, 6 Feb 2020 22:16:15 +0000 (UTC) To: gcc-patches From: Vladimir Makarov Subject: Patch to fix PR93561 Message-ID: <782fd9b2-f2f1-e4b4-9161-909a18d84176@redhat.com> Date: Thu, 6 Feb 2020 17:16:14 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-IsSubscribed: yes The following patch fixes   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93561 The patch was successfully bootstrapped on x86-64. commit d26f37a16e3ed3d75a93ffb1da10c44c36a8a36d (HEAD -> master) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1754aa76399..aec58a06529 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2020-02-06 + Vladimir Makarov + + PR rtl-optimization/93561 + * lra-assigns.c (spill_for): Check that tested hard regno is not out of + hard register range. + 2020-02-06 Richard Sandiford * config/aarch64/aarch64.md (aarch64_movk): Add a type diff --git a/gcc/lra-assigns.c b/gcc/lra-assigns.c index 031ce402c32..40e323c2a64 100644 --- a/gcc/lra-assigns.c +++ b/gcc/lra-assigns.c @@ -964,6 +964,8 @@ spill_for (int regno, bitmap spilled_pseudo_bitmap, bool first_p) bitmap_clear (&spill_pseudos_bitmap); for (j = hard_regno_nregs (hard_regno, mode) - 1; j >= 0; j--) { + if (hard_regno + j >= FIRST_PSEUDO_REGISTER) + break; if (try_hard_reg_pseudos_check[hard_regno + j] != curr_pseudo_check) continue; lra_assert (!bitmap_empty_p (&try_hard_reg_pseudos[hard_regno + j]));