From patchwork Sat Sep 30 23:13:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Patrick O'Neill X-Patchwork-Id: 147002 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp614819vqb; Sat, 30 Sep 2023 16:13:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEYBJNDhDEPmKrQ56XSw8vlj6sjKikXGQI/kTFlvwxjJ0LgWiSxIYkUN8TXSUTFis+71G8y X-Received: by 2002:a17:906:1d:b0:99b:ead0:2733 with SMTP id 29-20020a170906001d00b0099bead02733mr7011640eja.72.1696115621263; Sat, 30 Sep 2023 16:13:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696115621; cv=none; d=google.com; s=arc-20160816; b=hSYhPGmOcdAC/zq7t6d8lK6glSt0lJrn5KioVG6FS1anRSgYHJr/vkOpkbedpaMAS6 /03CUVLpSLX1t0ODrI1Dw65Bd9ssJY3zrnB3JDzF28ckCHbszwJV7VhzcZX+cX4wnBfT ycGsTFQaapXuj3La0NVFeCDodzcgbzP9yvKpR1o8O7/OwEHepua5iuFvxXwL8Yz2mT0o M5iEs79U5VEPSCcAr/dUWOqFAzUhKf9N6G1X72auU6L+zkbqGy8RGqjp+2YVBMBapii3 e0G669WwfK29EYijlywDs7o7VWJkKe9nzudGImV7I8ty1SMmI+hKEpmvzV5swNicnHut pB3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature:dmarc-filter:delivered-to; bh=496vfP2igepq9AKtCWCkJs0mKmHkkrU9EPu/NYzwvnc=; fh=eoYciVF3nGPsUny2lWIRsd4r4i+gOyiIF4lJQzed1GI=; b=sYV7yFfDSfmWv2GUHyg/OwETzQ0UrAFUMEfDp96e0CvvGw1axN9FCgfdrSpfoZAk38 cLCBHonGq/8nt/bzEXFEpPOwTjy3KyY8pdU2HpeV/n4OljSIUwwvJk84snR1Oe7App5d 2tcpz/pbhN5LTXXG4Uu6TK+FF/S5L07Qp0ihfJkjZGEXibXqUgh2g6LPBmEfk99HRAKW MJWqKjssNgGAxeMydfkIktyqGTo3VQ1p06xauLUI/l1+T2ikLUqaYBPhlFXF6OmvCWGL P4GMkFlj4cOu7zZiIYa7G6n3UgUqmfINUg8hdBM44bZSBqhVVYOJHDtWiftn00JnUxhQ 8QOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="1vK4y/H8"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id i13-20020a1709061ccd00b0099d9822f67csi17438915ejh.1047.2023.09.30.16.13.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 16:13:41 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="1vK4y/H8"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1A8BE3831E19 for ; Sat, 30 Sep 2023 23:13:34 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-oo1-xc2b.google.com (mail-oo1-xc2b.google.com [IPv6:2607:f8b0:4864:20::c2b]) by sourceware.org (Postfix) with ESMTPS id 788343858426 for ; Sat, 30 Sep 2023 23:13:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 788343858426 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-oo1-xc2b.google.com with SMTP id 006d021491bc7-57bb0f5d00aso6785236eaf.1 for ; Sat, 30 Sep 2023 16:13:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1696115588; x=1696720388; darn=gcc.gnu.org; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=496vfP2igepq9AKtCWCkJs0mKmHkkrU9EPu/NYzwvnc=; b=1vK4y/H8AnzCGneHyoklKOj+1MZa2QWD9lOt2hdo0EeaS9oLPZaYbVgw7zyfLhwKbt S21w1WtFHNPPRFINao/eCgBUzdF2t5Mx0rhIWV62ynzaDjgrn75xzj7gD8xL6ao+mQF9 EWULscw2ajgL9S91O6fnARmbEG6jbV6LOiw7h/icZ19TsODQNfTJHqpEbN/gba8SN+dt LO485lrSl8t9mY9Tzb+TF9w4Rt1sBTGJo6dfStOv0s/9LzG8hFh4GUjFmQY5hk1EbMFm Iif3VFlhjBy8cDlvc743Ve1owUvgzvEBABvhJveaNygHYhs9EYBRADsqrTccBR2JJuSf SpOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696115588; x=1696720388; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=496vfP2igepq9AKtCWCkJs0mKmHkkrU9EPu/NYzwvnc=; b=C/YKjx9+eKQeE80JS+raeSAMEiBKy10vfX+q1cxTmBUt7pnkj+YOjNnYtk/pc/OUOe OS4osPYC+C+y/78v3ekIx+cZBK67zOfJK66JkQsbldSLbOP3X8j2sPYgHDAvtPFGMT0l rBLOUG1KRnWNLHrrLaDU7v30xMCTsNSG/+zqtIoTwiae0tdTFk7NGmHk4M51Isc3ZrvS u5Ohk54027LMzdd8aH/D4PGvZU98HpM5b4wKSTdsfPSy57lN6NiE2QKVVKKRt075jCaY +OlE2N6QJTh4weShos+hjbQRApkTEmQOnRauvIAFQ4NN9ExupQWmhC80gMOD1sfNqvnN 5vxg== X-Gm-Message-State: AOJu0YygbtC4PY3bUL6uwp558YgLp/sHNKwO/R7jH4wxUM2sfPUcV/Qf F02AFe8YqVZWMVoEaQqRPCevTA== X-Received: by 2002:a05:6358:5284:b0:133:428:35dc with SMTP id g4-20020a056358528400b00133042835dcmr9919606rwa.11.1696115587653; Sat, 30 Sep 2023 16:13:07 -0700 (PDT) Received: from ?IPV6:2601:647:5700:6860:9736:feb8:4ec9:b556? ([2601:647:5700:6860:9736:feb8:4ec9:b556]) by smtp.gmail.com with ESMTPSA id e17-20020a17090ac21100b00267b38f5e13sm3624308pjt.2.2023.09.30.16.13.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 30 Sep 2023 16:13:07 -0700 (PDT) Message-ID: Date: Sat, 30 Sep 2023 16:13:05 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: [Committed] RISC-V: Use safe_grow_cleared for vector info [PR111469] To: =?utf-8?b?6ZKf5bGF5ZOy?= , gcc-patches Cc: jakub , pinskia , Jeff Law , gnu-toolchain References: <20230930230019.865326-1-patrick@rivosinc.com> <20DBB04A235265AE+202310010703506641526@rivai.ai> Content-Language: en-US From: Patrick O'Neill In-Reply-To: <20DBB04A235265AE+202310010703506641526@rivai.ai> X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, HTML_MESSAGE, KAM_SHORT, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778505339957836796 X-GMAIL-MSGID: 1778506133598178034 Committed. Thanks Juzhe! I had to adjust the changelog's PR formatting to get the pre-commit hooks to accept it. Here's the committed patch: From f446cf5d58568e406cc81f434a63b3045942e9a9 Mon Sep 17 00:00:00 2001 From: Patrick O'Neill Date: Sat, 30 Sep 2023 15:50:11 -0700 Subject: [PATCH] RISC-V: Use safe_grow_cleared for vector info [PR111649] Resolves a riscv*-*-* bootstrap failure due to a newly-turned-on assert. 2023-09-30  Jakub Jelinek gcc/ChangeLog:     PR target/111649     * config/riscv/riscv-vsetvl.cc (vector_infos_manager::vector_infos_manager):     Replace safe_grow with safe_grow_cleared. --- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111649 Fix authored by Jakub Jelinek. Tested for regressions using multilib riscv glibc rv32gcv, rv64gcv ---  gcc/config/riscv/riscv-vsetvl.cc | 4 ++--  1 file changed, 2 insertions(+), 2 deletions(-) -- 2.34.1 On 9/30/23 16:03, 钟居哲 wrote: > LGTM. > > ------------------------------------------------------------------------ > juzhe.zhong@rivai.ai > > *From:* Patrick O'Neill > *Date:* 2023-10-01 07:00 > *To:* gcc-patches ; juzhe.zhong > > *CC:* jakub ; pinskia > ; JeffreyALaw > ; gnu-toolchain > ; Patrick O'Neill > > *Subject:* [PATCH] RISC-V: Use safe_grow_cleared for vector info > [PR111469] > Resolves a riscv*-*-* bootstrap failure due to a newly-turned-on > assert. > 2023-09-30  Jakub Jelinek > PR target/111649 > gcc/ChangeLog: > * config/riscv/riscv-vsetvl.cc > (vector_infos_manager::vector_infos_manager): > Replace safe_grow with safe_grow_cleared. > --- > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111649 > Fix authored by Jakub Jelinek. > Tested for regressions using multilib riscv glibc rv32gcv, rv64gcv > --- > gcc/config/riscv/riscv-vsetvl.cc | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > diff --git a/gcc/config/riscv/riscv-vsetvl.cc > b/gcc/config/riscv/riscv-vsetvl.cc > index af8c31d873c..4b06d93e7f9 100644 > --- a/gcc/config/riscv/riscv-vsetvl.cc > +++ b/gcc/config/riscv/riscv-vsetvl.cc > @@ -2417,8 +2417,8 @@ vector_infos_manager::vector_infos_manager () >    vector_antin = nullptr; >    vector_antout = nullptr; >    vector_earliest = nullptr; > -  vector_insn_infos.safe_grow (get_max_uid ()); > -  vector_block_infos.safe_grow (last_basic_block_for_fn (cfun)); > +  vector_insn_infos.safe_grow_cleared (get_max_uid ()); > +  vector_block_infos.safe_grow_cleared (last_basic_block_for_fn > (cfun)); >    if (!optimize) >      { >        basic_block cfg_bb; > -- > 2.34.1 > diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc index af8c31d873c..4b06d93e7f9 100644 --- a/gcc/config/riscv/riscv-vsetvl.cc +++ b/gcc/config/riscv/riscv-vsetvl.cc @@ -2417,8 +2417,8 @@ vector_infos_manager::vector_infos_manager ()    vector_antin = nullptr;    vector_antout = nullptr;    vector_earliest = nullptr; -  vector_insn_infos.safe_grow (get_max_uid ()); -  vector_block_infos.safe_grow (last_basic_block_for_fn (cfun)); +  vector_insn_infos.safe_grow_cleared (get_max_uid ()); +  vector_block_infos.safe_grow_cleared (last_basic_block_for_fn (cfun));    if (!optimize)      {        basic_block cfg_bb;