[PATCH] D23049: [LV, X86] Be more optimistic about vectorizing shifts.

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 1 19:25:11 PDT 2016


mkuper created this revision.
mkuper added reviewers: anemet, wmi, mssimpso, spatel, RKSimon, delena.
mkuper added subscribers: llvm-commits, nadav.
Herald added a subscriber: mzolotukhin.

Shifts with a uniform but non-constant count were considered very expensive to vectorize since rL178703, because the splat would often live in a different block and be invisible to ISel. However, since rL201655, CodeGenPrepare would sink those splats next to their use, so that we can select an appropriate vector shift.

This updates the cost model to reflect the fact we don't need to be so pessimistic anymore.

https://reviews.llvm.org/D23049

Files:
  lib/Analysis/CostModel.cpp
  lib/Analysis/LoopAccessAnalysis.cpp
  lib/Target/X86/X86TargetTransformInfo.cpp
  lib/Transforms/Vectorize/LoopVectorize.cpp
  test/Analysis/CostModel/X86/uniformshift.ll
  test/Transforms/LoopVectorize/X86/uniformshift.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23049.66424.patch
Type: text/x-patch
Size: 8965 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160802/bf4932cd/attachment.bin>


More information about the llvm-commits mailing list