[PATCH] D48950: [PowerPC] Improve codegen for vector loads using scalar_to_vector

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 4 12:51:31 PDT 2018


amyk created this revision.
amyk added reviewers: nemanjai, lei, sfertile, syzaara.
Herald added subscribers: kbarton, hiraditya.

This patch aims to improve the codegen for vector loads involving the `scalar_to_vector (load X)` sequence.

Initially, ld->mv instructions were used for `scalar_to_vector (load X)`, so this patch allows `scalar_to_vector (load X)` to utilize:

- `LXSD` and `LXSDX` (via the `DFLOADf64` and `XFLOADf64` pseudo instructions respectively) for i64 and f64
- `LXSIWAX` for i32 (sign extension to i64)
- `LXSIWZX` for i32 and f64


https://reviews.llvm.org/D48950

Files:
  llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  llvm/lib/Target/PowerPC/PPCInstrVSX.td
  llvm/test/CodeGen/PowerPC/VSX-XForm-Scalars.ll
  llvm/test/CodeGen/PowerPC/build-vector-tests.ll
  llvm/test/CodeGen/PowerPC/load-v4i8-improved.ll
  llvm/test/CodeGen/PowerPC/power9-moves-and-splats.ll
  llvm/test/CodeGen/PowerPC/qpx-load-splat.ll
  llvm/test/CodeGen/PowerPC/scalar_vector_test_1.ll
  llvm/test/CodeGen/PowerPC/scalar_vector_test_2.ll
  llvm/test/CodeGen/PowerPC/scalar_vector_test_3.ll
  llvm/test/CodeGen/PowerPC/scalar_vector_test_4.ll
  llvm/test/CodeGen/PowerPC/swaps-le-6.ll
  llvm/test/CodeGen/PowerPC/vsx_insert_extract_le.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48950.154146.patch
Type: text/x-patch
Size: 34903 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180704/40347dcf/attachment.bin>


More information about the llvm-commits mailing list