OSDN Git Service

[PowerPC] allow D-form VSX load/store when accessing FrameIndex without offset
authorHiroshi Inoue <inouehrs@jp.ibm.com>
Fri, 6 Apr 2018 05:41:16 +0000 (05:41 +0000)
committerHiroshi Inoue <inouehrs@jp.ibm.com>
Fri, 6 Apr 2018 05:41:16 +0000 (05:41 +0000)
commitbbe1d513213d7753f9b154795b0ae2ceec40f806
tree881bef91d514533a7bc709b2ea7f8ba8407ce890
parent905f35003d007e52ccd2230b935b81db071e7a92
[PowerPC] allow D-form VSX load/store when accessing FrameIndex without offset

VSX D-form load/store instructions of POWER9 require the offset be a multiple of 16 and a helper`isOffsetMultipleOf` is used to check this.
So far, the helper handles FrameIndex + offset case, but not handling FrameIndex without offset case. Due to this, we are missing opportunities to exploit D-form instructions when accessing an object or array allocated on stack.
For example, x-form store (stxvx) is used for int a[4] = {0}; instead of d-form store (stxv). For larger arrays, D-form instruction is not used when accessing the first 16-byte. Using D-form instructions reduces register pressure as well as instructions.

Differential Revision: https://reviews.llvm.org/D45079

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329377 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCISelDAGToDAG.cpp
test/CodeGen/PowerPC/vsx-p9.ll