public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "law at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/64286] Redundant extend removal ignores vector element type
Date: Fri, 09 Jan 2015 07:08:00 -0000	[thread overview]
Message-ID: <bug-64286-4-1uLoisqB9g@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-64286-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64286

--- Comment #2 from Jeffrey A. Law <law at redhat dot com> ---
On 12/16/14 09:10, izamyatin at gmail dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64286
>
> --- Comment #1 from Igor Zamyatin <izamyatin at gmail dot com> ---
> Perhaps something like below to restrict ree for such cases?
>
> diff --git a/gcc/ree.c b/gcc/ree.c
> index 3376901..92370ea 100644
> --- a/gcc/ree.c
> +++ b/gcc/ree.c
> @@ -1004,6 +1004,11 @@ add_removable_extension (const_rtx expr, rtx_insn *insn,
>         struct df_link *defs, *def;
>         ext_cand *cand;
>
> +      if (!SCALAR_INT_MODE_P (GET_MODE (dest))
> +      && (GET_MODE_UNIT_PRECISION (mode) !=
> +          GET_MODE_UNIT_PRECISION (GET_MODE (XEXP (src, 0)))))
> +    return;
> +
>         /* First, make sure we can get all the reaching definitions.  */
>         defs = get_defs (insn, XEXP (src, 0), NULL);
>         if (!defs)
>
Funny, this is exactly the situation Jakub was concerned about in a 
comment for PR 59754.

I think you should remove the SCALAR_INT_MODE_P test in 
combine_reaching_defs which I think should be dead code if we filter 
things in add_removable_extension.


If you could make that change and confirm with Kirill that avx512f still 
looks good (in particular avx512f-vpmovzxwd-2.c) as well as doing a 
bootstrap and regression test, it'd be appreciated.

Thanks,
jeff


  reply	other threads:[~2015-01-09  7:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-12 13:11 [Bug rtl-optimization/64286] New: " sergos.gnu at gmail dot com
2015-01-09  7:08 ` law at redhat dot com [this message]
2015-01-09 16:06 ` [Bug rtl-optimization/64286] " jakub at gcc dot gnu.org
2015-01-09 17:20 ` jakub at gcc dot gnu.org
2015-01-09 17:57 ` jakub at gcc dot gnu.org
2015-01-12 11:33 ` jakub at gcc dot gnu.org
2015-01-12 11:35 ` [Bug rtl-optimization/64286] [4.9/5 Regression] " jakub at gcc dot gnu.org
2015-01-13 10:16 ` rguenth at gcc dot gnu.org
2015-01-13 19:13 ` jakub at gcc dot gnu.org
2015-01-13 19:15 ` [Bug rtl-optimization/64286] [4.9 " jakub at gcc dot gnu.org
2015-01-14 20:24 ` jakub at gcc dot gnu.org
2015-06-26 20:07 ` jakub at gcc dot gnu.org
2015-06-26 20:36 ` jakub at gcc dot gnu.org

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=bug-64286-4-1uLoisqB9g@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).