]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Update SSE <-> integer move costs
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Jun 2019 15:41:43 +0000 (15:41 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Jun 2019 15:41:43 +0000 (15:41 +0000)
commit824e2c0e24daaef45aba7dbead0210bcba20885f
tree20a9feee570cc504bf8347e92937e6e4507fa0b9
parent5f613a37a20a3ac1a98f2c5c393089fe51508e03
i386: Update SSE <-> integer move costs

Since inline_secondary_memory_needed has

  /* ??? This is a lie.  We do have moves between mmx/general, and for
     mmx/sse2.  But by saying we need secondary memory we discourage the
     register allocator from using the mmx registers unless needed.  */
  if (MMX_CLASS_P (class1) != MMX_CLASS_P (class2))
    return true;

moves between MMX and non-MMX units require secondary memory.   There
is no need to check moves between MMX and integer units.

struct processor_costs has:

  const int mmxsse_to_integer;  /* cost of moving mmxsse register to
                                   integer.  */
  const int ssemmx_to_integer;  /* cost of moving integer to mmxsse register. */

This patch also renames mmxsse_to_integer to sse_to_integer and
ssemmx_to_integer to integer_to_sse.

Tested on Linux/x86-64.

PR target/90877
* config/i386/i386-features.c
(dimode_scalar_chain::compute_convert_gain): Replace
mmxsse_to_integer with sse_to_integer.
* config/i386/i386.c (ix86_register_move_cost): Verify that
moves between MMX and non-MMX units require secondary memory.
Correct costs of moves between SSE and integer units.
* config/i386/i386.h (processor_costs): Rename cost of moving
SSE register to integer to sse_to_integer.  Rename cost of
moving integer register to SSE to integer_to_sse.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@272294 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/i386/i386-features.c
gcc/config/i386/i386.c
gcc/config/i386/i386.h