OSDN Git Service

[PowerPC] Add a late MI-level pass for QPX load/splat simplification
authorHal Finkel <hfinkel@anl.gov>
Thu, 31 Mar 2016 20:39:41 +0000 (20:39 +0000)
committerHal Finkel <hfinkel@anl.gov>
Thu, 31 Mar 2016 20:39:41 +0000 (20:39 +0000)
commite2d3b8ca15b62ccd56cc813aeaaab76d28fd2731
tree4d25e52f61491ffacc44ee9f10646297c47e061a
parentb7cecbaebdf8082411ac0ed78dc592b0b6b52a57
[PowerPC] Add a late MI-level pass for QPX load/splat simplification

Chapter 3 of the QPX manual states that, "Scalar floating-point load
instructions, defined in the Power ISA, cause a replication of the source data
across all elements of the target register." Thus, if we have a load followed
by a QPX splat (from the first lane), the splat is redundant. This adds a late
MI-level pass to remove the redundant splats in some of these cases
(specifically when both occur in the same basic block).

This optimization is scheduled just prior to post-RA scheduling. It can't happen
before anything that might replace the load with some already-computed quantity
(i.e. store-to-load forwarding).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265047 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/CMakeLists.txt
lib/Target/PowerPC/PPC.h
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCQPXLoadSplat.cpp [new file with mode: 0644]
lib/Target/PowerPC/PPCTargetMachine.cpp
test/CodeGen/PowerPC/qpx-load-splat.ll [new file with mode: 0644]