[PowerPC] Exploit `vrl(b|h|w|d)` to perform vector rotation
commit9681dc9627b1ea50fd90cdea84290ddc021d3fca
authorKai Luo <lkail@cn.ibm.com>
Mon, 23 Dec 2019 02:06:40 +0000 (23 02:06 +0000)
committerKai Luo <lkail@cn.ibm.com>
Mon, 23 Dec 2019 03:04:43 +0000 (23 03:04 +0000)
treeb7c644488a543a08759b79ea63ea1a72f0b7484b
parent5128026467cbc17bfc796d94bc8e40e52a9b0752
[PowerPC] Exploit `vrl(b|h|w|d)` to perform vector rotation

Summary:
Currently, we set legalization action of `ISD::ROTL` vectors as
`Expand` in `PPCISelLowering`. However, we can exploit `vrl(b|h|w|d)`
to lower `ISD::ROTL` directly.

Differential Revision: https://reviews.llvm.org/D71324
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCInstrAltivec.td
llvm/test/CodeGen/PowerPC/funnel-shift-rot.ll
llvm/test/CodeGen/PowerPC/vector-rotates.ll [new file with mode: 0644]