[PATCH] Break dependencies in large loops containing reductions (LoopVectorize)

Michael Zolotukhin mzolotukhin at apple.com
Tue Feb 10 12:05:22 PST 2015


Hi Olivier,

Probably I miss somethings, but what dependencies would unrolling of the outer loop break?

  for(int i=0; i<n; i++) {
    for(int i_c=0; i_c<3; i_c++) {
      _Complex __attribute__ ((aligned (8))) at = a[i][i_c];
      sum += ((__real__(at))*(__real__(at)) + (__imag__(at))*(__imag__(at)));
    }
  }

I see that it can be beneficial, but it's not about dependencies, as far as I can tell (e.g. SLP probably can vectorize the unrolled body).


http://reviews.llvm.org/D7514

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list