Hi Maintainers, > -----Original Message----- > From: Kumar, Venkataramanan > Sent: Tuesday, March 08, 2016 7:27 PM > To: Uros Bizjak (ubiz...@gmail.com); gcc-patches@gcc.gnu.org > Cc: Richard Beiner (richard.guent...@gmail.com); Kumar, Venkataramanan > Subject: RE: [Patch x86_64]: fix order of cost table initialization for - > march=znver1. > > Hi Uros, > > > -----Original Message----- > > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > > ow...@gcc.gnu.org] On Behalf Of Kumar, Venkataramanan > > Sent: Tuesday, March 08, 2016 7:21 PM > > To: Uros Bizjak (ubiz...@gmail.com); gcc-patches@gcc.gnu.org > > Cc: Richard Beiner (richard.guent...@gmail.com) > > Subject: [Patch x86_64]: fix order of cost table initialization for - > > march=znver1. > > > > 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? > > Please find the correct patch below. > > Change Log > 2016-03-08 Venkataramanan Kumar <venkataramanan.ku...@amd.com> > > * config/i386/i386.c (processor_target_table): Fix cost table > initialization order for znver1. > > > ----snip---- > diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c > index 8a026ae..234327a 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} > }; > ----snip---- > > Ok for trunk?
Committed the patch to trunk since it as obvious fix. https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=234076 regards, Venkat. > > > > > Regards, > > Venkat.