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

2023-05-19 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89680

Andrew Pinski  changed:

   What|Removed |Added

  Known to work||10.1.0

--- Comment #2 from Andrew Pinski  ---
Looks like this was fixed in GCC 10.

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

2019-03-12 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89680

Uroš Bizjak  changed:

   What|Removed |Added

   Keywords||ra
  Component|target  |rtl-optimization

--- Comment #1 from Uroš Bizjak  ---
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.