Hi Uros,

While debugging GCC to see if cost of multiplication for DI mode is set 
correctly for znver1 target.
 I found that the order of cost table insertion is wrong for znver1 and it 
worked because btver2 had same cost for multiply .

The patch corrects the mistake I made.

2016-03-08  Venkataramanan Kumar  <venkataramanan.ku...@amd.com>

        *  config/i386/i386.c (processor_target_table): Fix cost table 
        initialization order for znver1.

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 8a026ae..3d67c65 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -2662,9 +2662,9 @@ static const struct ptt 
processor_target_table[PROCESSOR_max] =
   {"bdver2", &bdver2_cost, 16, 10, 16, 7, 11},
   {"bdver3", &bdver3_cost, 16, 10, 16, 7, 11},
   {"bdver4", &bdver4_cost, 16, 10, 16, 7, 11},
-  {"znver1", &znver1_cost, 16, 10, 16, 7, 11},
   {"btver1", &btver1_cost, 16, 10, 16, 7, 11},
-  {"btver2", &btver2_cost, 16, 10, 16, 7, 11}
+  {"btver2", &btver2_cost, 16, 10, 16, 7, 11},
+  {"znver1", &znver1_cost, 16, 10, 16, 7, 11},
 };

It passes normal bootstrap and bootstrap with BOOT_CFLAGS="-O2 -g -march=znver1 
-mno-clzero -mno-sha " on avx2 target. 

Is it ok for trunk?

Regards,
Venkat.

Reply via email to