[PATCH] D25631: [LV] Avoid emitting trivially dead instructions

Matthew Simpson via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 14 12:14:06 PDT 2016


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

Some instructions from the original loop, when vectorized, can become trivially dead. This happens because of the way we structure the new loop. For example, we create new induction variables and induction variable "steps" in the new loop. Thus, when we go to vectorize the original induction variable update, it may no longer be needed due to the instructions we've already created. This patch prevents us from creating these redundant instructions. This reduces code size before simplification and allows greater flexibility in code generation since we have fewer unnecessary instruction uses.


https://reviews.llvm.org/D25631

Files:
  lib/Transforms/Vectorize/LoopVectorize.cpp
  test/Transforms/LoopVectorize/dead_instructions.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25631.74727.patch
Type: text/x-patch
Size: 5144 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161014/42793482/attachment.bin>


More information about the llvm-commits mailing list