From patchwork Thu May 2 18:59:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 1930810 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=UaSw3nDu; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VVjvv0bxDz1ydT for ; Fri, 3 May 2024 05:01:31 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 54BAB384AB58 for ; Thu, 2 May 2024 19:01:29 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 20F1D3849AC9 for ; Thu, 2 May 2024 18:59:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 20F1D3849AC9 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 20F1D3849AC9 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::633 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714676377; cv=none; b=pYu65g4Tz5F7ANuQlJZwuML06u3XaOmQ/jnMEhQ/QRvbBByfKlg8ZvBnAiHHtIHxx/awfUmqR+6l3pZ+VwXTPMjY2U0Pm8u8+Il9xs9aTnUNp00F8C9Khqxl2nYW+uHWTAiQK9bCD8uW80yvYelKbMyyhHVwp4Zp3pYMN9iILkg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714676377; c=relaxed/simple; bh=XsQlgGFuCnR0hJ7Kjo6RX9VCMjdMj7CHzg3QXibwm3Q=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=WcrC3em6QARpgMnE6yBAWtfE+7lKY4AmAp3d/hNMbei/f82Qdto5CF60YgIsdxklk6aV2h0ZKK712EeWr+JVv3bi529cJ5DJirIP9JeHQ4uxuB/qiQR/xzyO1bGCLoKJZjMddPjiZXpejmdfmKKm4YpEtss4oFzhmKXXJ8R6RsM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1e4f341330fso77303525ad.0 for ; Thu, 02 May 2024 11:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1714676370; x=1715281170; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IFQ5aZAnH5/Do5QDdbZ47Uisg9Gu5T8qg6l6YYxZuO0=; b=UaSw3nDuZ2IIo8M4+lkUy1Q5XAlcRL7fLsE4KXTJmVDDRQR6LUFyVkqQdXZ7FiPGnQ tRjg8e/bL9bPieJSaf4MtdDMZUSjVEzqbatAMDtIcYzGqE+GA9GegSw4psOBTSRWVRZb 3a5dJab1loYH2DD4OlqP1Xo8qPnnCXKaIAYRB1AQ5+xfajxLau+fBchEAeHL+N6IWWbN XAbTAdOEiqGeNgl4fZs2iso+oG6Q7I5uvJsTs8dit7JZOpZ2nv+JkyJnUGBnMLdNGgFq dTaeTOETn+YdNdHUasWpYMHaVWHqSeffZGfFquYDqJbC1qouQF3OHL5Dh42JkdSUpoAw fKwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714676370; x=1715281170; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IFQ5aZAnH5/Do5QDdbZ47Uisg9Gu5T8qg6l6YYxZuO0=; b=kic/uejoy7p3rFtLcURfvX10NTC+PRJvKTJkAAYlViAFsK8ckKkmddJxTZkGI722Cw WWwT54UjP3Z2mbr3PJ7ZvSBRvo/2tls1aPYoChI3DF28uKCQRnVHFO9D4Fx2luCGVARk ek7+UQgEjbl3fDTVQlK0c+WVtyiPOnQUj5+3pVWAN1PO2tLZcanA/Ca8oK7t2wxWpLvO can0s0nGRI1iSEHbbooe+GVjOZwQT76qqlf4MxjSh0RMqzie5ptKZQcGitDXfHv32r6R DT4li4z3dkx11n9nwZM2TbMVav0hFm9upit88xaKC8EZavnH7+BAIFMdnJvcp5VJpxQs UVcQ== X-Gm-Message-State: AOJu0YwPdEw2VtlPB/uIziS25F8dip0YLLVTaDX+PnkrfxnYLFRd5L3p 7/keEHEZQOr7OaRKBWr1Aaq/xBoV/tyD8WZAKMKAIUyXtasoW8mbu5h7gq1Bd+aFZJR5mNQo6p5 QSAU= X-Google-Smtp-Source: AGHT+IEolS9zHYAIUTRf6zmjgfnP+pF7ggrb3gy2DCvlan2jOXnGe0dbPQ7B80pyPsi8I9e1jJq3dQ== X-Received: by 2002:a17:902:d503:b0:1e4:8c64:33a2 with SMTP id b3-20020a170902d50300b001e48c6433a2mr685391plg.68.1714676370577; Thu, 02 May 2024 11:59:30 -0700 (PDT) Received: from vineet-framework.ba.rivosinc.com ([50.145.13.30]) by smtp.gmail.com with ESMTPSA id l3-20020a170902d04300b001ec83bdfe78sm1667287pll.63.2024.05.02.11.59.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 11:59:30 -0700 (PDT) From: Vineet Gupta To: gcc-patches@gcc.gnu.org Cc: Jeff Law , kito.cheng@gmail.com, Palmer Dabbelt , Robin Dapp , gnu-toolchain@rivosinc.com, Vineet Gupta Subject: [PATCH 1/3] docs: rtl: document GET_MODE_INNER Date: Thu, 2 May 2024 11:59:22 -0700 Message-Id: <20240502185924.2060196-2-vineetg@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240502185924.2060196-1-vineetg@rivosinc.com> References: <20240502185924.2060196-1-vineetg@rivosinc.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, 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+incoming=patchwork.ozlabs.org@gcc.gnu.org gcc/ChangeLog * doc/rtl.texi: Add entry for GET_MODE_INNER. Signed-off-by: Vineet Gupta --- gcc/doc/rtl.texi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi index 8ea6588cb71f..f1643f41dfc6 100644 --- a/gcc/doc/rtl.texi +++ b/gcc/doc/rtl.texi @@ -1582,6 +1582,10 @@ less than or equal to @code{HOST_BITS_PER_INT}. @item GET_MODE_ALIGNMENT (@var{m}) Return the required alignment, in bits, for an object of mode @var{m}. +@findex GET_MODE_INNER +@item GET_MODE_INNER (@var{m}) +Returns the mode of subunits contained in a complex mode such as Vector. + @findex GET_MODE_UNIT_SIZE @item GET_MODE_UNIT_SIZE (@var{m}) Returns the size in bytes of the subunits of a datum of mode @var{m}. From patchwork Thu May 2 18:59:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 1930808 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=LijFWz9U; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VVjtC70YTz1ymc for ; Fri, 3 May 2024 05:00:03 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 25F853849ADD for ; Thu, 2 May 2024 19:00:02 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id 2014C3849ACA for ; Thu, 2 May 2024 18:59:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2014C3849ACA Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2014C3849ACA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::632 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714676377; cv=none; b=fJpUrQHtJnd1fqOTE/aMESS1O0/9WvOCam/BoJRKRE04jxMJUN+4OHIw5iRK0GqVQOp1Ur3J8nFxkAo4UcVQg25toA+2GsL7ystYpdfcgyHoY0/KYHQ/OlpDm/w51KL4RHVqsUeoZtPVrvzDGe346Hg2W77J9UYtn0kiwr65mW0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714676377; c=relaxed/simple; bh=oSbI/0QPkXC9ZD8cUaIEUuNADjXjW8NID6wbLM1/KMM=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=SjYzAUSr73P1+bKYBYblNYaVg+eVKXL7z+i/jhDJ+nwdhdZdJ8eEZCc3ux0iYGmy/HfGB88gCmuKfOpjoGeeiuYRvH4oQAUYG9zI/5bd283Mvdi1h4ykoHOJ2b0ekfWZBIr5BYOf3GbLt5KKpm28/aI538qSskZAVLCY2Akev/g= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1ecd3867556so13407815ad.0 for ; Thu, 02 May 2024 11:59:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1714676372; x=1715281172; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JKmFPhtiJgFFA3WK4TPTTMWGMm7cdnZacEbCg+71Vow=; b=LijFWz9UAvcB7x/XhSha05nquS+OODvOYrVP/I6o6QPPKhvMDmzBIj8/WlaYnu4oVt MDIYpOKcERvKb9Vw+AGp4vNykOeCK3TRLQeAcEjsgTNb7GiAj6hAYAARYcq/ADq6Bcg4 B0vNP8+jVOq2F3o2Wq4m7XLAkRPznzrtkhmTSIFzFZJokUjcZlatxxGIH8D9M81D3kmM BPauLHETRuATxfPJRwlC7lEEz+34mlXqQ7Qfg3v8Pe29T4kYNn01atutygKqOklyQzUO i7of7bkM+EHC9+q5g+mGLCHRgzsHkc/Y8XLx5foLqyxF9Xf1deeV6zyZUmtZKwsBkNgY /N+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714676372; x=1715281172; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JKmFPhtiJgFFA3WK4TPTTMWGMm7cdnZacEbCg+71Vow=; b=hZXFHfjzeNFN4pXAEZ8W9JcIcPsPI/zRf4br8pwzk1LnH4IrUwG//b2maKFNMj8Izk PGU0BOc8ym3nmMyqz6VS4Jvf6xL4+DZSj8a7ZgrCXBlj6JBWvBETFg/uqyew16Y9GQR1 3P6bLZv7hRQlqr9THe2gyTYLTHP66SJk8JL7Ary3nKK6hW22XJXmyOzLGU7pp+PR9TyZ BE8jc1N2Z4xdmB1pFAFHtuKdHHdB1wQbRUKA/Kh9gtqfkwlBkBbgzttoMJhUF/DAWaro 770WkzRzV8XYtqr/8FjzdLHdEQ9Gk4MoahBw6qDYwLpt9uZkRATURyATJbJsYyg3EqXB QxHw== X-Gm-Message-State: AOJu0Yyxzl3rCcD/FHESD9dzEbMHXDCbk+nXGT+i6j/7h6zLBzhXT5ts hXwPGbUZKmvwOEaX6AYfnBln8r6FyvDbR5aGsYuAncKWbO0fCuDTnQq6+HVp2zDjgODahfddTyr YbKE= X-Google-Smtp-Source: AGHT+IGfwplY1DiWPKl5osqewsuVZA1Ps/CwcVZQVWVOwX/7dMjPgosi9lAtY/EEgBPnMiQDKwJtOw== X-Received: by 2002:a17:902:db0a:b0:1eb:acff:63ba with SMTP id m10-20020a170902db0a00b001ebacff63bamr760375plx.67.1714676372357; Thu, 02 May 2024 11:59:32 -0700 (PDT) Received: from vineet-framework.ba.rivosinc.com ([50.145.13.30]) by smtp.gmail.com with ESMTPSA id l3-20020a170902d04300b001ec83bdfe78sm1667287pll.63.2024.05.02.11.59.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 11:59:31 -0700 (PDT) From: Vineet Gupta To: gcc-patches@gcc.gnu.org Cc: Jeff Law , kito.cheng@gmail.com, Palmer Dabbelt , Robin Dapp , gnu-toolchain@rivosinc.com, Vineet Gupta Subject: [PATCH 2/3] RISC-V: miscll comment fixes [NFC] Date: Thu, 2 May 2024 11:59:23 -0700 Message-Id: <20240502185924.2060196-3-vineetg@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240502185924.2060196-1-vineetg@rivosinc.com> References: <20240502185924.2060196-1-vineetg@rivosinc.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, 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+incoming=patchwork.ozlabs.org@gcc.gnu.org gcc/ChangeLog: * config/riscv/riscv.cc: Comment updates. * config/riscv/riscv.h: Ditto. Signed-off-by: Vineet Gupta --- gcc/config/riscv/riscv.cc | 6 ++++-- gcc/config/riscv/riscv.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 24d1ead3902c..79994a5ddf32 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -1219,7 +1219,9 @@ riscv_legitimate_constant_p (machine_mode mode ATTRIBUTE_UNUSED, rtx x) return riscv_const_insns (x) > 0; } -/* Implement TARGET_CANNOT_FORCE_CONST_MEM. */ +/* Implement TARGET_CANNOT_FORCE_CONST_MEM. + Return true if X cannot (or should not) be spilled to the + constant pool. */ static bool riscv_cannot_force_const_mem (machine_mode mode ATTRIBUTE_UNUSED, rtx x) @@ -8585,7 +8587,7 @@ riscv_modes_tieable_p (machine_mode mode1, machine_mode mode2) && GET_MODE_CLASS (mode2) == MODE_FLOAT)); } -/* Implement CLASS_MAX_NREGS. */ +/* Implement TARGET_CLASS_MAX_NREGS. */ static unsigned char riscv_class_max_nregs (reg_class_t rclass, machine_mode mode) diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h index 7797e67317a6..58d0b09bf7d9 100644 --- a/gcc/config/riscv/riscv.h +++ b/gcc/config/riscv/riscv.h @@ -315,7 +315,7 @@ ASM_MISA_SPEC - FRAME_POINTER_REGNUM - 1 vl register - 1 vtype register - - 30 unused registers for future expansion + - 28 unused registers for future expansion - 32 vector registers */ #define FIRST_PSEUDO_REGISTER 128 From patchwork Thu May 2 18:59:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 1930815 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=tK31lO8m; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VVk0V2KSpz20fb for ; Fri, 3 May 2024 05:05:30 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 821753849ACC for ; Thu, 2 May 2024 19:05:28 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id 05E0E3849AD6 for ; Thu, 2 May 2024 18:59:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 05E0E3849AD6 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 05E0E3849AD6 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::631 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714676377; cv=none; b=op4czjx2DJmBlycRXd5lr7mM6S8ibi1eon/Z24WBqPFTASvxjQQOC69DsAD6IaBkASfV6nXlp3e0miJ+SnUGOz85d1P/uF1xeT5RtHU43H76ysHSj2KC5A65hvfNUj4rbDdB9OALiqS20MscJw2e9pUYGmsiYtu5IZmncwumCHM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714676377; c=relaxed/simple; bh=efhMo9j7i53yumr3+b7JU9cgwvZnFsovzWQCIVgesFM=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=YqNKOSP046q6Felkgw4eMdNw4l0LpBDEt4n5cVe2L2Kzcxsz6ZSCbMt1cu1SGBCS7oS48jSzq2p4aSprSv+TcEv0FEklvW5N9fEwHjlW+Y1g8XH4k+xQnnFP+YMw/2d+XeCd9H6gvkjJgBc1lzJYqAZVjfL6QTVRmLtBGUMNC6A= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1e3ca546d40so71942915ad.3 for ; Thu, 02 May 2024 11:59:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1714676374; x=1715281174; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xUvIyTnVBQN+buGnVUoIPcfOfPMbFOs7JqRhOBFKesk=; b=tK31lO8mx/q0DJNH6tkY26fleCbd5I0lFn7XC2XFq/K8dMKrZHUdR8cV19/B07Ir4g Ise7QEJV66oFmmi+X+YGqhu2CUVO2ckD0OaYWI+3qMf9SUZdWdE931/pWb93xfDHjnFA O2p3UHJAEDI2fzqtj16EGQ/MfWf277a82yNXjg0JwUmA2KsmRr0PUJCZtfj6gZG4/F34 v09uvtDBbZHgKCNWVEWGudXDp4yG+FhyZK7I8EuyBGFbw1AMEms2ctJqniM1oDscz5rx 0dNQXrN9VpnvmckNNRH/xH0h7B0ThPMkToc/25bd8RfMLX5iAlzzF/m/T50uZ2BWnIQ6 uFjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714676374; x=1715281174; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xUvIyTnVBQN+buGnVUoIPcfOfPMbFOs7JqRhOBFKesk=; b=rKc0P4eZesVUyBo8VV/i4/mSuW+ok381GdKjD1B4/YesmBss0/nsicH2ghOFSxINpX 3M4npGfTpz6i8zwPDsQyqsDGDcLa7IELtllqFYA9wRF5EKAYtSewkKv+mBXLfbMMqHje v/8GJRWF+g1Fnb9Q4MYpcpqX5jGkvxHGR5bjNXsL6odlBqBHRWopePOqGwmQJ7PNQnof Jwt9eyTXW0mLKaFvp9SRFxXNNlNP7C5tuaumBoFMmGAZnIFzCVrtwpOg3IAfEe3aKygE tS8Kzz3Yti2k/Z3WVj/2E1gPNiuDp8z1HQHgavT2/v+VpK6ColgJrLLcUJQneJZE2io4 qoew== X-Gm-Message-State: AOJu0YzMUHQdiQ3rHhNUfWn11IUZRejnteac3Gled3FGw5HNkwf6IE41 eF3fEmzCY8Mp1jnV5UsyE4zB73I7XECBCRZOvmCh69OOV1aWwjHI63/gX9jE5i91/aj51LHcJ61 KJk8= X-Google-Smtp-Source: AGHT+IF9yeRGD38JI51J/2+FQUVS6fJJ9xXzxXJkZYtuL0qeOXt28JXto2ctkKmoQKFxsrt8+fimPg== X-Received: by 2002:a17:902:ecd2:b0:1eb:7832:8d93 with SMTP id a18-20020a170902ecd200b001eb78328d93mr616653plh.23.1714676373908; Thu, 02 May 2024 11:59:33 -0700 (PDT) Received: from vineet-framework.ba.rivosinc.com ([50.145.13.30]) by smtp.gmail.com with ESMTPSA id l3-20020a170902d04300b001ec83bdfe78sm1667287pll.63.2024.05.02.11.59.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 11:59:33 -0700 (PDT) From: Vineet Gupta To: gcc-patches@gcc.gnu.org Cc: Jeff Law , kito.cheng@gmail.com, Palmer Dabbelt , Robin Dapp , gnu-toolchain@rivosinc.com, Vineet Gupta , Segher Boessenkool Subject: [PATCH 3/3] combine: initialize a local var Date: Thu, 2 May 2024 11:59:24 -0700 Message-Id: <20240502185924.2060196-4-vineetg@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240502185924.2060196-1-vineetg@rivosinc.com> References: <20240502185924.2060196-1-vineetg@rivosinc.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, 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+incoming=patchwork.ozlabs.org@gcc.gnu.org This is no logic change (but technically still a functional change). Ran into this when stepping thru combine code. @newpat has some random garbage for a bit until it is actually set. With the fix it remains 0 until actually set. gcc/ChangeLog: * combine.cc (try_combine): Initialize newpat. CC: Segher Boessenkool Signed-off-by: Vineet Gupta --- gcc/combine.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/combine.cc b/gcc/combine.cc index 92b8d98e6c15..0b5fe00c8c5b 100644 --- a/gcc/combine.cc +++ b/gcc/combine.cc @@ -2522,7 +2522,7 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0, bool *new_direct_jump_p, rtx_insn *last_combined_insn) { /* New patterns for I3 and I2, respectively. */ - rtx newpat, newi2pat = 0; + rtx newpat = 0, newi2pat = 0; rtvec newpat_vec_with_clobbers = 0; bool substed_i2 = false, substed_i1 = false, substed_i0 = false; /* Indicates need to preserve SET in I0, I1 or I2 in I3 if it is not