[PATCH] D24271: [LV] Don't mark pointers used by scalarized memory accesses uniform

Matthew Simpson via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 6 11:21:34 PDT 2016


mssimpso created this revision.
mssimpso added reviewers: mkuper, wmi, anemet.
mssimpso added subscribers: samparker, hfinkel, mcrosier, llvm-commits.
Herald added a subscriber: mzolotukhin.

Previously, all consecutive pointers were marked uniform after vectorization. However, if a consecutive pointer is used by a memory access that is eventually scalarized, the pointer may not remain uniform after all. An example is predicated stores. Even though a predicated store may be consecutive, it will still be scalarized, making it's pointer operand non-uniform.

This patch updates the logic in collectLoopUniforms to consider the cases where a memory access may be scalarized. If a memory access may be scalarized, its pointer operand is not marked uniform.

https://reviews.llvm.org/D24271

Files:
  lib/Transforms/Vectorize/LoopVectorize.cpp
  test/Transforms/LoopVectorize/consecutive-ptr-uniforms.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24271.70435.patch
Type: text/x-patch
Size: 15898 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160906/e32e8cb7/attachment.bin>


More information about the llvm-commits mailing list