[PATCH] D25580: [PowerPC] Improve handling of BUILD_VECTOR nodes (integer results)

Nemanja Ivanovic via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 13 15:26:10 PDT 2016


nemanjai created this revision.
nemanjai added reviewers: hfinkel, kbarton, amehsan, wschmidt, seurer.
nemanjai added subscribers: llvm-commits, echristo.
nemanjai set the repository for this revision to rL LLVM.

This patch accomplishes the following:

- Detects BUILD_VECTOR nodes whose operands are consecutive memory locations (ascending or descending) and converts the load to a vector load (with a possible vector shuffle)
- Converts a BUILD_VECTOR node whose operands are fp-to-int conversions into a BUILD_VECTOR of fp values followed by a single fp-to-int conversions
- Provides optimal patterns for common BUILD_VECTOR nodes on Power8 and Power9 (i.e. avoiding things like mfvsr -> mtvsr for converting fp scalars to integer vectors, etc.)
- Cleans up some redundant splats (i.e. after a splatting load, etc.)

The patch passes double bootstrap on Power8 LE with all the testing. I'll try to investigate the performance impact on the test suite test cases and post that in a follow-up comment.

I'll follow this patch up with similar improvements for BUILD_VECTOR nodes with floating point results.


Repository:
  rL LLVM

https://reviews.llvm.org/D25580

Files:
  lib/Target/PowerPC/PPCISelLowering.cpp
  lib/Target/PowerPC/PPCISelLowering.h
  lib/Target/PowerPC/PPCInstrInfo.td
  lib/Target/PowerPC/PPCInstrVSX.td
  lib/Target/PowerPC/PPCMIPeephole.cpp
  test/CodeGen/PowerPC/build-vector-tests.ll
  test/CodeGen/PowerPC/p8-scalar_vector_conversions.ll
  test/CodeGen/PowerPC/power9-moves-and-splats.ll
  test/CodeGen/PowerPC/tail-dup-analyzable-fallthrough.ll
  test/CodeGen/PowerPC/vsx.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25580.74590.patch
Type: text/x-patch
Size: 226179 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161013/4978eeb0/attachment-0001.bin>


More information about the llvm-commits mailing list