[PPC64LE] Remove implicit-subreg restriction from VSX swap removal
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Thu, 2 Jul 2015 19:01:22 +0000 (19:01 +0000)
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>
Thu, 2 Jul 2015 19:01:22 +0000 (19:01 +0000)
commit397fac95d58198ce97cc59d8520dbe27635f7a6a
tree09cc3f683610e8ae82e7c2e21b2bbd040b7987d3
parent1e09eba39d812686e8abf627e8baf94ada99ec9f
[PPC64LE] Remove implicit-subreg restriction from VSX swap removal

In r241285, I removed the SUBREG_TO_REG restriction from VSX swap
removal, determining that this was overly conservative.  We have
another form of the same restriction in that we check for the presence
of implicit subregs in vector operations.  As with SUBREG_TO_REG for
partial register conversions, an implicit subreg is safe in and of
itself, provided no other operation makes a lane-sensitive assumption
about the result.  This patch removes that restriction, by removing
the HasImplicitSubreg flag and all code that relies on it.

I've added a test case that fails to optimize before this patch is
applied, and optimizes properly with the patch.  Test based on a
report from Anton Blanchard.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241290 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
test/CodeGen/PowerPC/swaps-le-4.ll [new file with mode: 0644]