[PATCH] D24022: Update the vectorizer cost model for getVectorInstrCost to reflect actual costs of the operations on Power8/Power9

Nemanja Ivanovic via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 30 02:36:19 PDT 2016


nemanjai created this revision.
nemanjai added reviewers: hfinkel, kbarton, amehsan, wschmidt.
nemanjai added a subscriber: llvm-commits.
nemanjai set the repository for this revision to rL LLVM.
Herald added a subscriber: nemanjai.

Integer vector extractions and insertions are accomplished with direct moves which take about 5 cycles.
Single precision floating point values just need to be aligned and converted (and inserted with a vperm in the insert case).
Double precision floating point values just need to be aligned (and inserted using an xxpermdi in the insert case).

For Power9, 32-bit values can be inserted into a vector without a vperm so do not require loading a permute mask.

This patch reflects these aspects of the operations in getVectorInstrCost.

Repository:
  rL LLVM

https://reviews.llvm.org/D24022

Files:
  lib/Target/PowerPC/PPCISelLowering.cpp
  lib/Target/PowerPC/PPCInstrVSX.td
  lib/Target/PowerPC/PPCTargetTransformInfo.cpp
  test/Analysis/CostModel/PowerPC/insert_extract.ll
  test/CodeGen/PowerPC/p9-xxinsertw-xxextractuw.ll
  test/CodeGen/PowerPC/swaps-le-5.ll
  test/CodeGen/PowerPC/swaps-le-6.ll
  test/CodeGen/PowerPC/vsx_insert_extract_le.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24022.69654.patch
Type: text/x-patch
Size: 11390 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160830/d3f4ccf9/attachment.bin>


More information about the llvm-commits mailing list