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

Adam Nemet anemet at apple.com
Mon Jun 1 21:07:46 PDT 2015


In http://reviews.llvm.org/D9368#181632, @HaoLiu wrote:

> I also found a bug that write after load to the same location like:
>
>   A[i] = a;
>   b = A[i];
>
> is not looked as store-load forwarding currently. As this could affect the correctness, I fixed this with slight modification. 2 new test cases are added.


Why do you think that this is bug?  In this case because the vectorized loads and stores are aligned with each other, there should be no problem for the memory unit to figure out store-to-load forwarding.  See the big comment in MemoryDepChecker::couldPreventStoreLoadForward.


http://reviews.llvm.org/D9368

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






More information about the llvm-commits mailing list