[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)
commit54cced54a66c36a8bcb7b0b14bc1c0e1c59688ed
tree5cbbc70d5b5d3a260869150167c709dd460450e8
parentb773631ecdd863875c0ec3037fef92f6153fd0ee
[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.

llvm-svn: 242442
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/test/CodeGen/PowerPC/vsx.ll
llvm/test/CodeGen/PowerPC/vsx_insert_extract_le.ll