public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/45483] gcc-4.4.3: probably wrong optimization options chosen by "-march=native"
       [not found] <bug-45483-4@http.gcc.gnu.org/bugzilla/>
@ 2011-09-22 20:49 ` pacho at condmat1 dot ciencias.uniovi.es
  2011-09-22 21:39 ` [Bug target/45483] gcc-4.4.3 and 4.5.3: " hjl.tools at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: pacho at condmat1 dot ciencias.uniovi.es @ 2011-09-22 20:49 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45483

--- Comment #8 from Pacho Ramos <pacho at condmat1 dot ciencias.uniovi.es> 2011-09-22 20:47:04 UTC ---
It's still using generic in gcc-4.5, -march has moved from prescott to
pentium-m:
gcc-4.4: \_ /usr/libexec/gcc/i686-pc-linux-gnu/4.4.5/cc1 -quiet -
-D_FORTIFY_SOURCE=2 -march=prescott --param l1-cache-size=32 --param
l1-cache-line-size=64 --param l2-cache-size=2048 -mtune=generic -quiet
-dumpbase - -auxbase-strip /dev/null -o /tmp/ccpMToQG.s


gcc-4.5.3: \_ /usr/libexec/gcc/i686-pc-linux-gnu/4.5.3/cc1 -quiet -
-D_FORTIFY_SOURCE=2 -march=pentium-m --param l1-cache-size=32 --param
l1-cache-line-size=64 --param l2-cache-size=2048 -mtune=generic -quiet
-dumpbase - -auxbase-strip /dev/null -o /tmp/cc11MaKg.s


Should I try with gcc-4.6 to see if it uses something different than "generic"
for mtune (or march has changed again)?


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/45483] gcc-4.4.3 and 4.5.3: probably wrong optimization options chosen by "-march=native"
       [not found] <bug-45483-4@http.gcc.gnu.org/bugzilla/>
  2011-09-22 20:49 ` [Bug target/45483] gcc-4.4.3: probably wrong optimization options chosen by "-march=native" pacho at condmat1 dot ciencias.uniovi.es
@ 2011-09-22 21:39 ` hjl.tools at gmail dot com
  2011-09-22 22:36 ` pacho at condmat1 dot ciencias.uniovi.es
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: hjl.tools at gmail dot com @ 2011-09-22 21:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45483

--- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> 2011-09-22 21:08:09 UTC ---
(In reply to comment #8)
> Should I try with gcc-4.6 to see if it uses something different than "generic"
> for mtune (or march has changed again)?

Yes.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/45483] gcc-4.4.3 and 4.5.3: probably wrong optimization options chosen by "-march=native"
       [not found] <bug-45483-4@http.gcc.gnu.org/bugzilla/>
  2011-09-22 20:49 ` [Bug target/45483] gcc-4.4.3: probably wrong optimization options chosen by "-march=native" pacho at condmat1 dot ciencias.uniovi.es
  2011-09-22 21:39 ` [Bug target/45483] gcc-4.4.3 and 4.5.3: " hjl.tools at gmail dot com
@ 2011-09-22 22:36 ` pacho at condmat1 dot ciencias.uniovi.es
  2011-09-22 23:05 ` pacho at condmat1 dot ciencias.uniovi.es
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: pacho at condmat1 dot ciencias.uniovi.es @ 2011-09-22 22:36 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45483

--- Comment #10 from Pacho Ramos <pacho at condmat1 dot ciencias.uniovi.es> 2011-09-22 22:33:20 UTC ---
New output:

\_ /usr/libexec/gcc/i686-pc-linux-gnu/4.6.1/cc1 -quiet - -D_FORTIFY_SOURCE=2
-march=pentium-m -mno-cx16 -mno-sahf -mno-movbe -mno-aes -mno-pclmul
-mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm
-mno-avx -mno-sse4.2 -mno-sse4.1 --param l1-cache-size=32 --param
l1-cache-line-size=64 --param l2-cache-size=2048 -mtune=generic -quiet
-dumpbase - -auxbase-strip /dev/null -o /tmp/cc63ioaE.s


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/45483] gcc-4.4.3 and 4.5.3: probably wrong optimization options chosen by "-march=native"
       [not found] <bug-45483-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2011-09-22 22:36 ` pacho at condmat1 dot ciencias.uniovi.es
@ 2011-09-22 23:05 ` pacho at condmat1 dot ciencias.uniovi.es
  2011-09-24 15:54 ` hjl.tools at gmail dot com
  2011-09-24 16:03 ` pacho at condmat1 dot ciencias.uniovi.es
  5 siblings, 0 replies; 11+ messages in thread
From: pacho at condmat1 dot ciencias.uniovi.es @ 2011-09-22 23:05 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45483

--- Comment #11 from Pacho Ramos <pacho at condmat1 dot ciencias.uniovi.es> 2011-09-22 22:39:58 UTC ---
If I use "mtune=native" instead of "march", final gcc command is different:

/usr/libexec/gcc/i686-pc-linux-gnu/4.6.1/cc1 -quiet - -D_FORTIFY_SOURCE=2
--param l1-cache-size=32 --param l1-cache-line-size=64 --param
l2-cache-size=2048 -mtune=generic -quiet -dumpbase - -march=i686 -auxbase-strip
/dev/null -o /tmp/ccs2Uhin.s


Not sure if that is normal


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/45483] gcc-4.4.3 and 4.5.3: probably wrong optimization options chosen by "-march=native"
       [not found] <bug-45483-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2011-09-22 23:05 ` pacho at condmat1 dot ciencias.uniovi.es
@ 2011-09-24 15:54 ` hjl.tools at gmail dot com
  2011-09-24 16:03 ` pacho at condmat1 dot ciencias.uniovi.es
  5 siblings, 0 replies; 11+ messages in thread
From: hjl.tools at gmail dot com @ 2011-09-24 15:54 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45483

--- Comment #12 from H.J. Lu <hjl.tools at gmail dot com> 2011-09-24 15:19:56 UTC ---
(In reply to comment #10)
> New output:
> 
> \_ /usr/libexec/gcc/i686-pc-linux-gnu/4.6.1/cc1 -quiet - -D_FORTIFY_SOURCE=2
> -march=pentium-m -mno-cx16 -mno-sahf -mno-movbe -mno-aes -mno-pclmul
> -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm
> -mno-avx -mno-sse4.2 -mno-sse4.1 --param l1-cache-size=32 --param
> l1-cache-line-size=64 --param l2-cache-size=2048 -mtune=generic -quiet
> -dumpbase - -auxbase-strip /dev/null -o /tmp/cc63ioaE.s

It looks great.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/45483] gcc-4.4.3 and 4.5.3: probably wrong optimization options chosen by "-march=native"
       [not found] <bug-45483-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2011-09-24 15:54 ` hjl.tools at gmail dot com
@ 2011-09-24 16:03 ` pacho at condmat1 dot ciencias.uniovi.es
  5 siblings, 0 replies; 11+ messages in thread
From: pacho at condmat1 dot ciencias.uniovi.es @ 2011-09-24 16:03 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45483

Pacho Ramos <pacho at condmat1 dot ciencias.uniovi.es> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #13 from Pacho Ramos <pacho at condmat1 dot ciencias.uniovi.es> 2011-09-24 15:40:17 UTC ---
OK, I guess I should close this one as looks like "generic" is the best option
for my processor


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/45483] gcc-4.4.3: probably wrong optimization options chosen by "-march=native"
  2010-09-01 15:04 [Bug c/45483] New: gcc-4.4.3: " pacho at condmat1 dot ciencias dot uniovi dot es
                   ` (3 preceding siblings ...)
  2010-09-06 10:45 ` pacho at condmat1 dot ciencias dot uniovi dot es
@ 2010-09-06 15:09 ` hjl dot tools at gmail dot com
  4 siblings, 0 replies; 11+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-09-06 15:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from hjl dot tools at gmail dot com  2010-09-06 15:08 -------
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2010-09/msg00469.html


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ubizjak at gmail dot com
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2010-
                   |                            |09/msg00469.html
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-09-06 15:08:27
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45483


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/45483] gcc-4.4.3: probably wrong optimization options chosen by "-march=native"
  2010-09-01 15:04 [Bug c/45483] New: gcc-4.4.3: " pacho at condmat1 dot ciencias dot uniovi dot es
                   ` (2 preceding siblings ...)
  2010-09-01 16:37 ` hjl dot tools at gmail dot com
@ 2010-09-06 10:45 ` pacho at condmat1 dot ciencias dot uniovi dot es
  2010-09-06 15:09 ` hjl dot tools at gmail dot com
  4 siblings, 0 replies; 11+ messages in thread
From: pacho at condmat1 dot ciencias dot uniovi dot es @ 2010-09-06 10:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pacho at condmat1 dot ciencias dot uniovi dot es  2010-09-06 10:45 -------
This is what I get with gcc-4.5.1:
root       651  0.0  0.1  13080  1780 tty1     S+   19:18   0:00
usr/libexec/gcc/i686-pc-linux-gnu/4.5.1/cc1 -quiet - -D_FORTIFY_SOURCE=2
 -march=pentium-m --param l1-cache-size=32 --param l1-cache-line-size=64
 - --param l2-cache-size=2048 -mtune=generic -quiet -dumpbase -
 - -- -auxbase-strip /dev/null -o /tmp/cc3udN3F.s

Then, looks like:
1. It's still using -mtune=generic
2. It now uses "-march=pentium-m" instead of "presscott" :-/
3. It doesn't seem to detect "sse3" 

Thanks for your help :-)


-- 

pacho at condmat1 dot ciencias dot uniovi dot es changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |UNCONFIRMED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45483


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/45483] gcc-4.4.3: probably wrong optimization options chosen by "-march=native"
  2010-09-01 15:04 [Bug c/45483] New: gcc-4.4.3: " pacho at condmat1 dot ciencias dot uniovi dot es
  2010-09-01 15:56 ` [Bug target/45483] " hjl dot tools at gmail dot com
  2010-09-01 16:06 ` pacho at condmat1 dot ciencias dot uniovi dot es
@ 2010-09-01 16:37 ` hjl dot tools at gmail dot com
  2010-09-06 10:45 ` pacho at condmat1 dot ciencias dot uniovi dot es
  2010-09-06 15:09 ` hjl dot tools at gmail dot com
  4 siblings, 0 replies; 11+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-09-01 16:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from hjl dot tools at gmail dot com  2010-09-01 16:37 -------
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > gcc-4.5 is still hardmasked downstream in Gentoo, then, I am unsure about
> > > installing it :-/, are you sure this bug could be solved in 4.5* ?
> > > 
> > 
> > 1. -march=native is changed in gcc 4.5.
> 
> Will try then with 4.5.1 (4.5.2 is still not available on Gentoo)
> 
> > 2. Your cpu is Core.
> > 3. -mtune=generic generates the fastest code for Core.
> > 4. Prescott and Core have the same instruction set.
> 
> Is -mtune=generic better than -mtune=prescott? "man gcc" looks to suggest last
> one would be better:
> If you know the CPU on which your code will run, then you should use the
> corresponding -mtune option instead of -mtune=generic.
> 
> 

-mtune=generic is the best tuning option for Intel processors,
regardless whatever gcc manual says.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45483


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/45483] gcc-4.4.3: probably wrong optimization options chosen by "-march=native"
  2010-09-01 15:04 [Bug c/45483] New: gcc-4.4.3: " pacho at condmat1 dot ciencias dot uniovi dot es
  2010-09-01 15:56 ` [Bug target/45483] " hjl dot tools at gmail dot com
@ 2010-09-01 16:06 ` pacho at condmat1 dot ciencias dot uniovi dot es
  2010-09-01 16:37 ` hjl dot tools at gmail dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: pacho at condmat1 dot ciencias dot uniovi dot es @ 2010-09-01 16:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pacho at condmat1 dot ciencias dot uniovi dot es  2010-09-01 16:06 -------
(In reply to comment #3)
> (In reply to comment #2)
> > gcc-4.5 is still hardmasked downstream in Gentoo, then, I am unsure about
> > installing it :-/, are you sure this bug could be solved in 4.5* ?
> > 
> 
> 1. -march=native is changed in gcc 4.5.

Will try then with 4.5.1 (4.5.2 is still not available on Gentoo)

> 2. Your cpu is Core.
> 3. -mtune=generic generates the fastest code for Core.
> 4. Prescott and Core have the same instruction set.

Is -mtune=generic better than -mtune=prescott? "man gcc" looks to suggest last
one would be better:
If you know the CPU on which your code will run, then you should use the
corresponding -mtune option instead of -mtune=generic.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45483


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/45483] gcc-4.4.3: probably wrong optimization options chosen by "-march=native"
  2010-09-01 15:04 [Bug c/45483] New: gcc-4.4.3: " pacho at condmat1 dot ciencias dot uniovi dot es
@ 2010-09-01 15:56 ` hjl dot tools at gmail dot com
  2010-09-01 16:06 ` pacho at condmat1 dot ciencias dot uniovi dot es
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-09-01 15:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from hjl dot tools at gmail dot com  2010-09-01 15:56 -------
(In reply to comment #2)
> gcc-4.5 is still hardmasked downstream in Gentoo, then, I am unsure about
> installing it :-/, are you sure this bug could be solved in 4.5* ?
> 

1. -march=native is changed in gcc 4.5.
2. Your cpu is Core.
3. -mtune=generic generates the fastest code for Core.
4. Prescott and Core have the same instruction set.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45483


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-09-24 15:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-45483-4@http.gcc.gnu.org/bugzilla/>
2011-09-22 20:49 ` [Bug target/45483] gcc-4.4.3: probably wrong optimization options chosen by "-march=native" pacho at condmat1 dot ciencias.uniovi.es
2011-09-22 21:39 ` [Bug target/45483] gcc-4.4.3 and 4.5.3: " hjl.tools at gmail dot com
2011-09-22 22:36 ` pacho at condmat1 dot ciencias.uniovi.es
2011-09-22 23:05 ` pacho at condmat1 dot ciencias.uniovi.es
2011-09-24 15:54 ` hjl.tools at gmail dot com
2011-09-24 16:03 ` pacho at condmat1 dot ciencias.uniovi.es
2010-09-01 15:04 [Bug c/45483] New: gcc-4.4.3: " pacho at condmat1 dot ciencias dot uniovi dot es
2010-09-01 15:56 ` [Bug target/45483] " hjl dot tools at gmail dot com
2010-09-01 16:06 ` pacho at condmat1 dot ciencias dot uniovi dot es
2010-09-01 16:37 ` hjl dot tools at gmail dot com
2010-09-06 10:45 ` pacho at condmat1 dot ciencias dot uniovi dot es
2010-09-06 15:09 ` hjl dot tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).