This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC PATCH, i386]: Improve STV pass by correcting the cost of moves to/from XMM reg


And now with the patch attached.

On Fri, Aug 23, 2019 at 1:39 PM Uros Bizjak <ubizjak@gmail.com> wrote:
>
> This is currently a heads-up patch that removes the minimum limitation
> of cost of moves to/from XMM reg. The immediate benefit is the removal
> of mismatched spills, caused by subreg usage.
>
> *If* the patch proves to be beneficial (as in "doesn't regress
> important benchmarks"), then we should be able to un-hide the
> inter-regset moves from RA and allow it to collapse some moves. As an
> example, patched compiler removes a movd in gcc.target/i386/minmax-6.c
> and still avoids mismatched spill.
>
> 2019-08-23  Uroš Bizjak  <ubizjak@gmail.com>
>
>     * config/i386/i386.c (ix86_register_move_cost): Do not
>     limit the cost of moves to/from XMM register to minimum 8.
>     * config/i386/i386-features.c
>     (general_scalar_chain::make_vector_copies): Do not generate
>     zeroing move from GPR to XMM register, use gen_move_insn
>     instead of gen_gpr_to_xmm_move_src.
>     (general_scalar_chain::convert_op): Ditto.
>     (gen_gpr_to_xmm_move_src): Remove.
>
> The patch was bootstrapped and regression tested on x86_64-linux-gnu
> {,-m32}, configured w/ and w/o -with-arch=ivybridge.
>
> The patch regresses PR80481 scan-asm-not (where the compiler generates
> unrelated XMM spill on register starved x86_32). However, during the
> analysis, I found that the original issue is not fixed, and is still
> visible without -funrol-loops [1].
>
> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80481#c10
>
> So, I'd wait for the HJ's benchmark results of the cost to/from XMM
> change before proceeding with the patch.
>
> Uros.

Attachment: stv.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]