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

--- Comment #5 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 
2012-04-16 11:19:26 UTC ---
indeed.
will it be back-ported to 4.7.1?

btw
I find very "elegant" the
    movaps    (%rdx,%rax), %xmm0
    minps    %xmm1, %xmm0
    movaps    %xmm0, (%rcx,%rax)
produced by -Ofast  for
  for (int j=0; j<100 ; ++j)
    xsum[j] = (clus[j] > 0) ? 0 : clus[j];

I suppose it is to ask to much to produce the same for
  for (int j=0; j<100 ; ++j) {
    xsum[j] = clus[j];
    if (xsum[j] > 0) xsum[j] = 0;
  }
and
  for (int j=0; j<100 ; ++j) {
    xsum[j] = 0;
    if (clus[j] < 0) xsum[j] = clus[j];

in any case I confirm that now all three forms produces the very same code with
-O3 and -Ofast (for the last two) even for march=corei7 (also avx)

I also tested the three variations for
    xsum[j] = clus[j];
    if (xsum[j] > cut[j]) xsum[j] = 0;

Reply via email to