This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/64286] Redundant extend removal ignores vector element type
- From: "law at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 09 Jan 2015 07:08:03 +0000
- Subject: [Bug rtl-optimization/64286] Redundant extend removal ignores vector element type
- Auto-submitted: auto-generated
- References: <bug-64286-4 at http dot gcc dot gnu dot 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