[PowerPC] Fix the xxperm swap requirements
authorMaryam Moghadas <maryammo@ca.ibm.com>
Wed, 22 Mar 2023 14:14:00 +0000 (09:14 -0500)
committerMaryam Moghadas <maryammo@ca.ibm.com>
Thu, 6 Apr 2023 01:13:40 +0000 (20:13 -0500)
commitcf0395f81655ead3ac8e7e6c85778316097f2748
treea72b248d0df3b5ea85b29b96576c319fe5999ca6
parent8c885658edf599da277d6d8f2f66bf4cf6f2b934
[PowerPC] Fix the xxperm swap requirements

This patch is to fix the xxperm vector operand swap condition so that the
single-use operand is in V2 to prevent copying, it also fixes the subtarget
condition to exploit the xpperm.

Reviewed By: stefanp

Differential Revision: https://reviews.llvm.org/D146632
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/test/CodeGen/PowerPC/pre-inc-disable.ll
llvm/test/CodeGen/PowerPC/v16i8_scalar_to_vector_shuffle.ll
llvm/test/CodeGen/PowerPC/vector-constrained-fp-intrinsics.ll
llvm/test/CodeGen/PowerPC/xxperm-swap.ll [new file with mode: 0644]