From: Jakub Jelinek <jakub@redhat.com>
To: Uros Bizjak <ubizjak@gmail.com>, Paolo Bonzini <bonzini@gnu.org>,
Richard Henderson <rth@redhat.com>
Cc: gcc-patches@gcc.gnu.org, Vladimir Yakovlev <vbyakovl23@gmail.com>,
"Kumar, Venkataramanan" <Venkataramanan.Kumar@amd.com>
Subject: Re: [PATCH, dataflow]: Fix PR55845, 454.calculix miscompares on x86 AVX due to movement of vzeroupper
Date: Sun, 06 Jan 2013 16:23:00 -0000 [thread overview]
Message-ID: <20130106162251.GX7269@tucnak.redhat.com> (raw)
In-Reply-To: <CAFULd4asYbD30GODKEYOUyoCH3mKRtm+zbXEW0+nK8O=6wZ7hw@mail.gmail.com>
On Sun, Jan 06, 2013 at 04:48:03PM +0100, Uros Bizjak wrote:
> --- df-problems.c (revision 194945)
> +++ df-problems.c (working copy)
> @@ -3916,6 +3916,10 @@ can_move_insns_across (rtx from, rtx to, rtx acros
> break;
> if (NONDEBUG_INSN_P (insn))
> {
> + /* Do not move unspec_volatile insns. */
> + if (GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE)
> + break;
> +
Shouldn't UNSPEC_VOLATILE be handled similarly in the across_from ..
across_to loop? Both UNSPEC_VOLATILE and volatile asm are handled there
just with
trapping_insns_in_across |= may_trap_p (PATTERN (insn));
but your new change doesn't prevent moving just trapping insns across
UNSPEC_VOLATILE, but any insns whatsoever. So supposedly for UNSPEC_VOLATILE
the first loop should just return false; (or fail = 1; ?).
For asm volatile I guess the code is fine as is, it must always describe
what exactly it modifies, so supposedly non-trapping insns can be moved
across asm volatile.
> if (may_trap_or_fault_p (PATTERN (insn))
> && (trapping_insns_in_across || other_branch_live != NULL))
> break;
You could do the check only for may_trap_or_fault_p, all UNSPEC_VOLATILE
may trap.
BTW, can't UNSPEC_VOLATILE be embedded deeply in the pattern?
So volatile_insn_p (insn) && asm_noperands (PATTERN (insn)) == -1?
But perhaps you want to treat that way only UNSPEC_VOLATILE directly in the
pattern and all other UNSPEC_VOLATILE insns must describe in detail what
exactly they are changing? This really needs to be better documented.
Jakub
next prev parent reply other threads:[~2013-01-06 16:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-06 15:48 Uros Bizjak
2013-01-06 16:23 ` Jakub Jelinek [this message]
2013-01-06 16:44 ` Eric Botcazou
2013-01-07 16:52 ` Uros Bizjak
2013-01-07 23:26 ` Jakub Jelinek
2013-01-08 7:10 ` Uros Bizjak
2013-01-08 17:55 ` Richard Henderson
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=20130106162251.GX7269@tucnak.redhat.com \
--to=jakub@redhat.com \
--cc=Venkataramanan.Kumar@amd.com \
--cc=bonzini@gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=rth@redhat.com \
--cc=ubizjak@gmail.com \
--cc=vbyakovl23@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).