[Bug rtl-optimization/89680] Redundant moves with -march=skylake for long long shift on 32bit x86

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Mar 12 13:45:00 GMT 2019


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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ra
          Component|target                      |rtl-optimization

--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
This issue can be "solved" by the following cost-adjustment patch:

diff --git a/gcc/config/i386/x86-tune-costs.h
b/gcc/config/i386/x86-tune-costs.h
index ac06e37733a0..9301fc2d9231 100644
--- a/gcc/config/i386/x86-tune-costs.h
+++ b/gcc/config/i386/x86-tune-costs.h
@@ -1457,7 +1457,7 @@ struct processor_costs skylake_cost = {
   {6, 6, 6, 10, 20},                   /* cost of loading SSE registers
                                           in 32,64,128,256 and 512-bit */
   {6, 6, 6, 10, 20},                   /* cost of unaligned loads.  */
-  {8, 8, 8, 12, 24},                   /* cost of storing SSE registers
+  {8, 6, 8, 12, 24},                   /* cost of storing SSE registers
                                           in 32,64,128,256 and 512-bit */
   {8, 8, 8, 8, 16},                    /* cost of unaligned stores.  */
   2, 2,                                        /* SSE->integer and
integer->SSE moves */

However, RA should notice that the value is already in memory and should be
loaded from there regardless of costs. Based on this reasoning, I think this is
RA problem.


More information about the Gcc-bugs mailing list