[PowerPC] Custom lowering for funnel shifts
authorJay Foad <jay.foad@amd.com>
Thu, 16 Jul 2020 12:10:12 +0000 (13:10 +0100)
committerJay Foad <jay.foad@amd.com>
Tue, 4 Aug 2020 15:30:49 +0000 (16:30 +0100)
commit28e322ea9393e6b3841886006dd170ddd810fd9b
treee31144094a887e0305e1e6a1366285ed55feeb77
parent817b3a6fe3a4452eb61a2503c8beaa7267ca0351
[PowerPC] Custom lowering for funnel shifts

The custom lowering saves an instruction over the generic expansion, by
taking advantage of the fact that PowerPC shift instructions are well
defined in the shift-by-bitwidth case.

Differential Revision: https://reviews.llvm.org/D83948
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.h
llvm/test/CodeGen/PowerPC/funnel-shift.ll
llvm/test/CodeGen/PowerPC/pr44183.ll