[PATCH] [LoopVectorize]Teach Loop Vectorizer about interleaved memory access

Hao Liu Hao.Liu at arm.com
Wed May 13 04:03:59 PDT 2015


Hi all the reviews,

The new patch rewrites the identification phase. So I'll explain more details.

The new method is based on the paper: Auto-Vectorization of Interleaved Data for SIMD (Dorit Nuzman, Ira Rosen and Ayal Zaks). It has two benefits comparing to old method:

  (1) Support the gapped interleaved load. E.g. The load of { A[i], A[i+2] } can work even without A[i+1].
  (2) Support identify opportunities from mixed loads/stores. E.g. 
       for (int i = 0; i < 1024; i+=2) {
         B[i] = A[i] + A[i+1];
         B[i+1] = A[i] * A[i+1];
       }

There may be worries about the dependences. I think our memory dependence check has already checked the dependence. I've added a lot of comments in the code to explain this. 
I've tested the correctness with LNT, EEMBC, SPEC2000, SPEC2006. There is no known failure.

Sorry for the annoying of my old identification method. But I think we could get more benefit from the new method.

Review again please.

Thanks,
-Hao


http://reviews.llvm.org/D9368

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






More information about the llvm-commits mailing list