From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) by sourceware.org (Postfix) with ESMTPS id 5CAE63858D1E for ; Thu, 28 Apr 2022 08:39:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5CAE63858D1E Received: by mail-qv1-xf34.google.com with SMTP id r8so2731271qvx.10 for ; Thu, 28 Apr 2022 01:39:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QSbaosR1RYT3SpMAbrRq/Jvw08mXfMj6wijX3oC6k4k=; b=GFHzqFQo1nZkW9Iu+t3sSjDAmafUl4xe8rVgo13/mHyZ6znAVvXe5qtDG0nXdFZrXs Dh7fzawNx8BclHpxIfwrLe8wSRCRLBXdxorc0hHmssqmikDeVLlCOc/2gJEpCHcbkkCo NFuL24SNbKQg6bkXxBjROsyaWdPFj6jh+EFNbqmypdYfJx/rQ2xrAgEblCXZWuBav4F3 75WHfBi7mZWabw9Uk8Fol+Q56P6LLBBXTwIbV7JESDCUdyiz79vksl8DO/FLiqDM9IqJ ddB8laHCqw1ZkSj4ywvGBNAcppsKnnT/zrkLrtlJbNWfyNm1teY877FrPPGTg/2pxTGK J5Aw== X-Gm-Message-State: AOAM530ekdMF2CpbkKVzc7ol0MELx84lYi8SHnt4pmIyaUC30xOf487T Fgk+EdGlipyrZ19ThmQhleuIcbK5HRCoAWQxxDd4SLlIuY0= X-Google-Smtp-Source: ABdhPJzNcffGU/7TJFYjAXyooeS43Pa8PByPVIlJP1Jqe50yvS4xxwvH3VHSAbhuatZHlgf6nkAy7dLESOyAsQfaFow= X-Received: by 2002:a05:6214:1c8a:b0:443:bc78:25ef with SMTP id ib10-20020a0562141c8a00b00443bc7825efmr23140513qvb.2.1651135183502; Thu, 28 Apr 2022 01:39:43 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Uros Bizjak Date: Thu, 28 Apr 2022 10:39:39 +0200 Message-ID: Subject: Re: Patch ping Re: [PATCH] i386: Fix up ix86_gimplify_va_arg [PR105331] To: Jakub Jelinek Cc: "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Apr 2022 08:39:46 -0000 On Thu, Apr 28, 2022 at 10:31 AM Jakub Jelinek wrote: > > Hi! > > I'd like to ping this patch. I know it isn't a full week yet, but we are > almost out of P1s and GCC 12 branching is any time now. > > Thanks: > On Fri, Apr 22, 2022 at 09:25:04AM +0200, Jakub Jelinek via Gcc-patches wrote: > > On the following testcase we emit a bogus > > 'va_arg_tmp.5' may be used uninitialized > > warning. The reason is that when gimplifying the addr = &temp; > > statement, the va_arg_tmp temporary var for which we emit ADDR_EXPR > > is not TREE_ADDRESSABLE, prepare_gimple_addressable emits some extra > > code to initialize the newly addressable var from its previous value, > > but it is a new variable which hasn't been initialized yet and will > > be later, so we end up initializing it with uninitialized SSA_NAME: > > va_arg_tmp.6 = va_arg_tmp.5_14(D); > > addr.2_16 = &va_arg_tmp.6; > > _17 = MEM[(double *)sse_addr.4_13]; > > MEM[(double * {ref-all})addr.2_16] = _17; > > and with -O1 we actually don't DSE it before the warning is emitted. > > If we make the temp TREE_ADDRESSABLE before the gimplification, then > > this prepare_gimple_addressable path isn't taken and we effectively > > omit the first statement above and so the bogus warning is gone. > > > > I went through other backends and didn't find another instance of this > > problem. > > > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > > > 2022-04-22 Jakub Jelinek > > > > PR target/105331 > > * config/i386/i386.cc (ix86_gimplify_va_arg): Mark va_arg_tmp > > temporary TREE_ADDRESSABLE before trying to gimplify ADDR_EXPR > > of it. > > > > * gcc.dg/pr105331.c: New test. Sorry, I have no idea if this patch is correct or not. Uros.