You are not logged in.

#1 2013-01-16 17:55:17

Registered: 2009-07-02
Posts: 15

Dual-core Ivy Bridge and gcc -march


I wanted to give the ck-kernel a try, and, as indicated in the [repo-ck] wiki page I ran

gcc -c -Q -march=native --help=target | grep march

to see what package is best for me. It says

  -march=                     		corei7-avx

which is surprising, because, according to wiki, it corresponds to a Sandy Bridge processor. However my processor is an i7-3517U, which is a mobile dual-core Ivy Bridge processor.

vendor_id	: GenuineIntel
cpu family	: 6
model		: 58
model name	: Intel(R) Core(TM) i7-3517U CPU @ 1.90GHw

Any idea of what it's going on here?


#2 2013-01-16 18:25:34

Registered: 2007-12-07
Posts: 1,784

Re: Dual-core Ivy Bridge and gcc -march

Well, in the end yours is just an i7 of one generation higher than sandy bridge. I don't think this makes any difference for gcc or the kernel.


#3 2013-01-16 18:50:12

broken pipe
Registered: 2010-12-10
Posts: 221

Re: Dual-core Ivy Bridge and gcc -march

makes no difference, the cflags are the same for each generation. … _Xeon_55xx

Last edited by broken pipe (2013-01-16 18:51:48)


#4 2013-01-16 19:00:58

Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,462

Re: Dual-core Ivy Bridge and gcc -march

broken pipe wrote:

makes no difference, the cflags are the same for each generation.

Not true...per the docs for gcc:

corei7-avx = sandy
core-avx-i = ivy

Different optimizations for sure, dunno about real-world impact though.  The OP's question goes beyond the repo packages for linux-ck.  Anything he/she builds via ABS or AUR (assuming a setting of -march=native in /etc/makepkg.conf) will potentially have impacts.

Last edited by graysky (2013-01-16 19:01:51)

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs • 1.21 JIGOWATTS!


#5 2013-01-16 19:01:17

Registered: 2009-07-02
Posts: 15

Re: Dual-core Ivy Bridge and gcc -march

There are different kernels for Sandy Bridge and Ivy Bridge in [repo-ck], so I guess there's a difference (although I realize it's probably espilon-esque).

Last edited by fhr (2013-01-16 19:01:38)


#6 2013-01-17 00:37:13

Registered: 2011-04-21
Posts: 127

Re: Dual-core Ivy Bridge and gcc -march

@graysky Last week i noticed the same thing the OP did (I have a ivy i7 3770 though). However if you take a look at the [enabled] features from gcc -c -Q -march=native --help=target | grep enabled

  -m64                        		[enabled]
  -m80387                     		[enabled]
  -m96bit-long-double         	[enabled]
  -maes                       		[enabled]
  -malign-stringops           	[enabled]
  -mavx                       		[enabled]
  -mcx16                      		[enabled]
  -mf16c                      		[enabled]
  -mfancy-math-387            	[enabled]
  -mfentry                    		[enabled]
  -mfp-ret-in-387             		[enabled]
  -mfsgsbase                  		[enabled]
  -mglibc                     		[enabled]
  -mhard-float                		[enabled]
  -mieee-fp                   		[enabled]
  -mpclmul                    		[enabled]
  -mpopcnt                    		[enabled]
  -mpush-args                 		[enabled]
  -mrdrnd                     		[enabled]
  -mred-zone                  		[enabled]
  -msahf                      		[enabled]
  -msse                       		[enabled]
  -msse2                      		[enabled]
  -msse3                      		[enabled]
  -msse4                      		[enabled]
  -msse4.1                    		[enabled]
  -msse4.2                    		[enabled]
  -mssse3                     		[enabled]
  -mstackrealign              		[enabled]
  -mtls-direct-seg-refs       	[enabled]

All of the features that ivy bridge are supported are there MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AES, PCLMUL, FSGSBASE, RDRND and F16C.

I am unsure however if there are any other optimisations which occur differently between corei7-avx and core-avx-i as i am not going to try and understand the full inner workings of gcc.

However i did manage to patch gcc to enable core-avx-i support when asking for -march=native except that i am unsure of and repercussions of doing so


#7 2013-05-13 17:43:36

Registered: 2013-03-27
Posts: 3

Re: Dual-core Ivy Bridge and gcc -march

Ok not to drag up an old thread...but this issue continues to there a reason why GCC is reporting tunings for sandy on my ivy dual? Has anyone done research as to which set of compiler optimizations will work best with my dual core ivy? Would love to know...


Board footer

Powered by FluxBB