[PPC64LE] Fix wrong IR for vec_sld and vec_vsldoi
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Mon, 4 Aug 2014 23:21:01 +0000 (23:21 +0000)
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>
Mon, 4 Aug 2014 23:21:01 +0000 (23:21 +0000)
commitf04e998e00d6c71241c29b86c2fadfe0d1601e64
tree6800ea33eb36cccc93a9e89db49c7ae5e9065bc2
parente3c13468bf0371ef5f270bd74e3388e4cd1b6574
[PPC64LE] Fix wrong IR for vec_sld and vec_vsldoi

My original LE implementation of the vsldoi instruction, with its
altivec.h interfaces vec_sld and vec_vsldoi, produces incorrect
shufflevector operations in the LLVM IR.  Correct code is generated
because the back end handles the incorrect shufflevector in a
consistent manner.

This patch and a companion patch for Clang correct this problem by
removing the fixup from altivec.h and the corresponding fixup from the
PowerPC back end.  Several test cases are also modified to reflect the
now-correct LLVM IR.

llvm-svn: 214800
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/test/CodeGen/PowerPC/vec_shuffle_le.ll