From: Hongtao Liu <crazylht@gmail.com>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: liuhongt <hongtao.liu@intel.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] i386 [stv]: Handle REG_EH_REGION note [pr111822].
Date: Mon, 18 Mar 2024 19:02:40 +0800 [thread overview]
Message-ID: <CAMZc-bz=czuBUmWVROnsDuexO=3+32mjOzTcbq6HVyBB5T44MQ@mail.gmail.com> (raw)
In-Reply-To: <CAFULd4ZVrjosTjLf2XiEdS4YJxtc7H8Y0XGwcAqOzAfViUfE-A@mail.gmail.com>
On Mon, Mar 18, 2024 at 6:59 PM Uros Bizjak <ubizjak@gmail.com> wrote:
>
> On Mon, Mar 18, 2024 at 11:52 AM liuhongt <hongtao.liu@intel.com> wrote:
> >
> > Commit r14-9459-g618e34d56cc38e only handles
> > general_scalar_chain::convert_op. The patch also handles
> > timode_scalar_chain::convert_op to avoid potential similar bug.
> >
> > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}.
> > Ok for trunk and backport to releases/gcc-13 branch?
>
> I have the following patch in testing that merges
> {general,timode}_scalar_chain::convert_op, so in addition to less code
> duplication, it will fix the issue for both chains. WDYT?
It would be better for maintenance, I prefer your patch.
>
> Uros.
>
> >
> > gcc/ChangeLog:
> >
> > PR target/111822
> > * config/i386/i386-features.cc
> > (timode_scalar_chain::convert_op): Handle REG_EH_REGION note.
> > ---
> > gcc/config/i386/i386-features.cc | 20 +++++++++++++++++---
> > 1 file changed, 17 insertions(+), 3 deletions(-)
> >
> > diff --git a/gcc/config/i386/i386-features.cc b/gcc/config/i386/i386-features.cc
> > index c7d7a965901..38f57d96df5 100644
> > --- a/gcc/config/i386/i386-features.cc
> > +++ b/gcc/config/i386/i386-features.cc
> > @@ -1794,12 +1794,26 @@ timode_scalar_chain::convert_op (rtx *op, rtx_insn *insn)
> > *op = gen_rtx_SUBREG (V1TImode, *op, 0);
> > else if (MEM_P (*op))
> > {
> > + rtx_insn* eh_insn;
> > rtx tmp = gen_reg_rtx (V1TImode);
> > - emit_insn_before (gen_rtx_SET (tmp,
> > - gen_gpr_to_xmm_move_src (V1TImode, *op)),
> > - insn);
> > + eh_insn
> > + = emit_insn_before (gen_rtx_SET (tmp,
> > + gen_gpr_to_xmm_move_src (V1TImode,
> > + *op)),
> > + insn);
> > *op = tmp;
> >
> > + if (cfun->can_throw_non_call_exceptions)
> > + {
> > + /* Handle REG_EH_REGION note. */
> > + rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX);
> > + if (note)
> > + {
> > + control_flow_insns.safe_push (eh_insn);
> > + add_reg_note (eh_insn, REG_EH_REGION, XEXP (note, 0));
> > + }
> > + }
> > +
> > if (dump_file)
> > fprintf (dump_file, " Preloading operand for insn %d into r%d\n",
> > INSN_UID (insn), REGNO (tmp));
> > --
> > 2.31.1
> >
--
BR,
Hongtao
prev parent reply other threads:[~2024-03-18 11:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-18 10:52 liuhongt
2024-03-18 10:58 ` Uros Bizjak
2024-03-18 11:02 ` Hongtao Liu [this message]
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='CAMZc-bz=czuBUmWVROnsDuexO=3+32mjOzTcbq6HVyBB5T44MQ@mail.gmail.com' \
--to=crazylht@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hongtao.liu@intel.com \
--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).