From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 560C6385E836 for ; Fri, 3 May 2024 08:27:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 560C6385E836 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 560C6385E836 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=63.228.1.57 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714724881; cv=none; b=AKAKL5tsdhZ17FmM64+udHruKRkfCF+4kgkuNEIrAMnV6GmUbEC0+Op6jYDZ3kbsn3UHx6k2oo+shFS2FiEzrjT9U8zD/zR0Vea3TWZ3t2uZ+fTRWugfnNvXq+HuzPGtKxlazfq+BTg9R3P+nMDAvL3nI/jT8bRBbRyhd2FNAGg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714724881; c=relaxed/simple; bh=NGrIm4C02EB/RXHlzxclptyOiBDdZzN9wiA2e1VmlME=; h=Date:From:To:Subject:Message-ID:Mime-Version; b=ImWw1FNC8saiArE06fuVvUiPsZYoQqrs/ZPKv658tZd0JfDMasGsTaOccOnKUfAiE2oiTV599tglzvORqqxkOXgFBkFdhIy39mfeEiXB0yOyAr5b5YVN8FfJD7BrT8bSdD4Rd4IqmL+pcN3fK0IsNLFJ3AQHGYBAWr196yZdz9E= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 4438QwJa026311; Fri, 3 May 2024 03:26:58 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 4438Qwxg026310; Fri, 3 May 2024 03:26:58 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Fri, 3 May 2024 03:26:58 -0500 From: Segher Boessenkool To: Vineet Gupta Cc: gcc-patches@gcc.gnu.org, Jeff Law , kito.cheng@gmail.com, Palmer Dabbelt , Robin Dapp , gnu-toolchain@rivosinc.com Subject: Re: [PATCH 3/3] combine: initialize a local var Message-ID: <20240503082658.GU19790@gate.crashing.org> References: <20240502185924.2060196-1-vineetg@rivosinc.com> <20240502185924.2060196-4-vineetg@rivosinc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240502185924.2060196-4-vineetg@rivosinc.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, May 02, 2024 at 11:59:24AM -0700, Vineet Gupta wrote: > This is no logic change (but technically still a functional change). Where are 1/3 and 2/3? Or are those unrelated? Please don't make series like that. > 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. The same is true for all uninitialised variables. Setting everything to zero explicitly is a) quite a bit slower, and b) just as wrong! For example, here, newpat should never be zero. Never. It does not make any sense. Is there any place where newpat is used uninitialised? Segher