[PowerPC] v4i32 is a VSRCRegClass
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Thu, 16 Jul 2015 21:14:07 +0000 (21:14 +0000)
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>
Thu, 16 Jul 2015 21:14:07 +0000 (21:14 +0000)
commit7be3a33a0b957d2f0f21d3e0eead84ca5fcb34ed
tree4087c29b2540db551d7b3c841240c6456b037a21
parentedcb51fd4c6d2dcbcae7ae10dcbdbf8555848070
[PowerPC] v4i32 is a VSRCRegClass

I was looking at some vector code generation and kept seeing
unnecessary vector copies into the Altivec half of the VSX registers.
I discovered that we overlooked v4i32 when adding the register classes
for VSX; we only added v4f32 and v2f64.  This means that anything that
canonicalizes into v4i32 (which is a LOT of stuff) ends up being
forced into VRRC on its way to VSRC.

The fix is one line.  The rest of the patch is fixing up some test
cases whose code generation has changed as a result.

This seems like it would be a good candidate for backport to 3.7.

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