<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 4, 2017 at 10:02 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> writes:<br>
<br>
> On Tue, Apr 4, 2017 at 3:40 PM, Filippo Leonardi <<a href="mailto:filippo.leon@gmail.com">filippo.leon@gmail.com</a>><br>
> wrote:<br>
><br>
>> I had weird issues where gcc (that I am using for my tests right now)<br>
>> wasn't vectorising properly (even enabling all flags, from tree-vectorize,<br>
>> to mavx). According to my tests, I know the Intel compiler was a bit better<br>
>> at that.<br>
>><br>
><br>
> We are definitely at the mercy of the compiler for this. Maybe Jed has an<br>
> idea why its not vectorizing.<br>
<br>
Is this so bad?<br>
<br>
000000000024080e <VecMAXPY_Seq+0x2fe> mov rax,QWORD PTR [rbp-0xb0]<br>
0000000000240815 <VecMAXPY_Seq+0x305> add ebx,0x1<br>
0000000000240818 <VecMAXPY_Seq+0x308> vmulpd ymm0,ymm7,YMMWORD PTR [rax+r9*1]<br>
000000000024081e <VecMAXPY_Seq+0x30e> mov rax,QWORD PTR [rbp-0xa8]<br>
0000000000240825 <VecMAXPY_Seq+0x315> vfmadd231pd ymm0,ymm8,YMMWORD PTR [rax+r9*1]<br>
000000000024082b <VecMAXPY_Seq+0x31b> mov rax,QWORD PTR [rbp-0xb8]<br>
0000000000240832 <VecMAXPY_Seq+0x322> vfmadd231pd ymm0,ymm6,YMMWORD PTR [rax+r9*1]<br>
0000000000240838 <VecMAXPY_Seq+0x328> vfmadd231pd ymm0,ymm5,YMMWORD PTR [r10+r9*1]<br>
000000000024083e <VecMAXPY_Seq+0x32e> vaddpd ymm0,ymm0,YMMWORD PTR [r11+r9*1]<br>
0000000000240844 <VecMAXPY_Seq+0x334> vmovapd YMMWORD PTR [r11+r9*1],ymm0<br>
000000000024084a <VecMAXPY_Seq+0x33a> add r9,0x20<br>
000000000024084e <VecMAXPY_Seq+0x33e> cmp DWORD PTR [rbp-0xa0],ebx<br>
0000000000240854 <VecMAXPY_Seq+0x344> ja 000000000024080e <VecMAXPY_Seq+0x2fe><br>
</blockquote></div><br>I agree that is what we should see. It cannot be what Fillippo has if he is getting ~4x with the template stuff.</div><div class="gmail_extra"><br></div><div class="gmail_extra"> Matt<br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>