This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR target/59588: Don't check/change generic/i686 tuning


On Thu, Dec 26, 2013 at 11:11 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, Dec 26, 2013 at 8:06 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Thu, Dec 26, 2013 at 7:45 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>>>> On Thu, Dec 26, 2013 at 4:38 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>>>> >> Hi Honza,
>>>> >>
>>>> >> We have combined generic32 and generic64 into generic.  There is no need
>>>> >> to check "generic" anymore.  Also we shouldn't change -mtune=i686 into
>>>> >> -mtune=generic.  OK to install?
>>>> >
>>>> > The i686->generic change was intended to get generic optimized code
>>>> > for i686-linux configuration rather than pentiumpro.  I think it still makes
>>>> > sense to use this, since it is what most 32bit distros still configure for?
>>>> >
>>>>
>>>> Should -mtune=i686 define __tune_i686__?  If not, how can
>>>> it be defined? Don't we default -mtune to generic for
>>>> i686-linux?
>>>
>>> If i686-linux defaults to -mtune=generic, then I think it is all fine.
>>
> ...
>>
>> I will check in my patch.
>>
>
> My patch exposes a testsuite bug:
>
> spawn -ignore SIGHUP /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
> -B/export/build/gnu/gcc/build-x86_64-linux/gcc/
> /export/gnu/import/git/gcc/gcc/testsuite/gcc.target/i386/andor-2.c
> -fno-diagnostics-show-caret -fdiagnostics-color=never -O2 -mtune=i686
> -ffat-lto-objects -ffat-lto-objects -S -o andor-2.s^M
> /export/gnu/import/git/gcc/gcc/testsuite/gcc.target/i386/andor-2.c:1:0:
> error: CPU you selected does not support x86-64 instruction set^M
> compiler exited with status 1
> output is:
> /export/gnu/import/git/gcc/gcc/testsuite/gcc.target/i386/andor-2.c:1:0:
> error: CPU you selected does not support x86-64 instruction set^M
>
> FAIL: gcc.target/i386/andor-2.c (test for excess errors)
>
> We used to silently turn -mtune=i686 into -mtune=generic.
> Now we don't.  It is wrong to accept -mtune=i686 when compiling
> for  x86-64.  I am checking in this patch as an obvious fix.
>
> Thanks.
>
> --
> H.J.
> --
> diff --git a/gcc/testsuite/gcc.target/i386/andor-2.c
> b/gcc/testsuite/gcc.target/i386/andor-2.c
> index 88118aa..eacc7b1 100644
> --- a/gcc/testsuite/gcc.target/i386/andor-2.c
> +++ b/gcc/testsuite/gcc.target/i386/andor-2.c
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O2 -mtune=i686" } */
> +/* { dg-options "-O2 -mtune=generic" } */
>
>  int h(int x, int y)
>  {

Another one happens with -mx32.  I checked in
this patch to fix it.

-- 
H.J.
---
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 98d22b3e..ad98f63 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,11 @@
 2013-12-26   H.J. Lu  <hongjiu.lu@intel.com>

+ * g++.old-deja/g++.other/store-expr1.C (dg-options): Replace
+ -mtune=i686 with -mtune=generic.
+ * g++.old-deja/g++.other/store-expr2.C (dg-options): Likewise.
+
+2013-12-26   H.J. Lu  <hongjiu.lu@intel.com>
+
  * gcc.target/i386/andor-2.c (dg-options): Replace -mtune=i686
  with -mtune=generic.

diff --git a/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C
b/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C
index 72d30eb..af5e415 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C
@@ -1,7 +1,7 @@
 // { dg-do run { target i?86-*-* x86_64-*-* } }
 // { dg-require-effective-target ilp32 }
 // { dg-require-effective-target fpic }
-// { dg-options "-mtune=i686 -O2 -fpic" }
+// { dg-options "-mtune=generic -O2 -fpic" }
 class G {};

 struct N {
diff --git a/gcc/testsuite/g++.old-deja/g++.other/store-expr2.C
b/gcc/testsuite/g++.old-deja/g++.other/store-expr2.C
index 99e0943..1dffbcc 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/store-expr2.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/store-expr2.C
@@ -1,6 +1,6 @@
 // { dg-do run { target i?86-*-* x86_64-*-*} }
 // { dg-require-effective-target ilp32 }
-// { dg-options "-mtune=i686 -O2" }
+// { dg-options "-mtune=generic -O2" }
 class G {};

 struct N {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]