[PATCH] D24275: [LV] Don't emit unused scalars for uniform instructions

Matthew Simpson via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 6 12:48:00 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.

If we identify an instruction as uniform after vectorization, we know that we should only use the value corresponding to the first vector lane of each unroll iteration. However, when scalarizing such instructions, we still produce values for the other vector lanes. This patch prevents us from generating the unused scalars.

https://reviews.llvm.org/D24275

Files:
  lib/Transforms/Vectorize/LoopVectorize.cpp
  test/Transforms/LoopVectorize/induction.ll
  test/Transforms/LoopVectorize/reverse_induction.ll

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


More information about the llvm-commits mailing list