User: Password:
|
|
Subscribe / Log in / New account

Regehr: GCC 4.8 Breaks Broken SPEC 2006 Benchmarks

Regehr: GCC 4.8 Breaks Broken SPEC 2006 Benchmarks

Posted Apr 2, 2013 17:30 UTC (Tue) by hummassa (subscriber, #307)
In reply to: Regehr: GCC 4.8 Breaks Broken SPEC 2006 Benchmarks by hummassa
Parent article: Regehr: GCC 4.8 Breaks Broken SPEC 2006 Benchmarks

I am answering to my own comments in this subthread, and it really feels like I am losing my mind... :-D
anyway, I tried this with -O4 and both


for(auto x: d) satd += abs(x);

and

auto satd = accumulate(begin(d), end(d), 0, [](int a, int x) { return a+abs(x); });

generated the same code, roughly:

movl	(%rax), %edx
movl	(%rax), %ecx
addq	$4, %rax    
sarl	$31, %edx   
xorl	%edx, %ecx  
subl	%edx, %ecx  
leaq	64(%rsp), %r
addl	%ecx, %ebx  
cmpq	%rax, %rdx  
jne	.L3	#,

which seemed nice to me.


(Log in to post comments)

Regehr: GCC 4.8 Breaks Broken SPEC 2006 Benchmarks

Posted Apr 2, 2013 19:17 UTC (Tue) by jwakely (guest, #60262) [Link]

You know GCC doesn't have a -O4 optimisation level, right? ;)

Regehr: GCC 4.8 Breaks Broken SPEC 2006 Benchmarks

Posted Apr 2, 2013 20:08 UTC (Tue) by nix (subscriber, #2304) [Link]

I've seen people use -O4, -O6, -O64 ("it's a nice round number and higher than 3" he said, so at least he knew what he was aiming for), and of course glibc, of all things, used -O99 for donkey's years. GCC obviously needs an "-Olots" for these people.

Regehr: GCC 4.8 Breaks Broken SPEC 2006 Benchmarks

Posted Apr 2, 2013 22:56 UTC (Tue) by jwakely (guest, #60262) [Link]

It should be called -Over9000 though

Regehr: GCC 4.8 Breaks Broken SPEC 2006 Benchmarks

Posted Apr 2, 2013 21:18 UTC (Tue) by hummassa (subscriber, #307) [Link]

It's on my default makefile since forever, because clang does not like -O5 and beyond and I am too lazy to look up which is the biggest effective level for each compiler...


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds