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)