[PATCH] D12286: [LV] Never widen an induction variable.

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 09:01:21 PDT 2015


jmolloy created this revision.
jmolloy added reviewers: anemet, mzolotukhin.
jmolloy added a subscriber: llvm-commits.
jmolloy set the repository for this revision to rL LLVM.

There's no need to widen canonical induction variables. It's just as efficient to create a *new*, wide, induction variable.

Consider, if we widen an indvar, then we'll have to truncate it before its uses anyway (1 trunc). If we create a new indvar instead, we'll have to truncate that instead (1 trunc) [besides which IndVars should go and clean up our mess after us anyway on principle].

This lets us remove a ton of special-casing code.

Repository:
  rL LLVM

http://reviews.llvm.org/D12286

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12286.32964.patch
Type: text/x-patch
Size: 9342 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150824/8327248b/attachment.bin>


More information about the llvm-commits mailing list