From: Jakub Jelinek <jakub@redhat.com>
To: Uros Bizjak <ubizjak@gmail.com>, gcc-patches@gcc.gnu.org
Subject: Patch ping Re: [PATCH] i386: Fix up ix86_gimplify_va_arg [PR105331]
Date: Thu, 28 Apr 2022 10:31:13 +0200 [thread overview]
Message-ID: <YmpQ0Zg6+QsB//yj@tucnak> (raw)
In-Reply-To: <YmJYTyEtsqlTwhKM@tucnak>
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 <jakub@redhat.com>
>
> 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.
Jakub
next prev parent reply other threads:[~2022-04-28 8:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-22 7:25 Jakub Jelinek
2022-04-28 8:31 ` Jakub Jelinek [this message]
2022-04-28 8:39 ` Patch ping " Uros Bizjak
2022-04-28 10:30 ` Jakub Jelinek
2022-04-28 10:31 ` Richard Biener
2022-04-28 13:16 ` Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YmpQ0Zg6+QsB//yj@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=ubizjak@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).