[DAG][ARM][MIPS][RISCV] Improve funnel shift promotion to use 'double shift' patterns
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 12 Oct 2020 13:10:18 +0000 (14:10 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 12 Oct 2020 13:11:02 +0000 (14:11 +0100)
commitc252200e4de4411478fb525e93cc7ae05b189a22
treededbf413f7529f169635fe87dbe451d40b681a6f
parent1968a6155fd5ef178598b204cc6a176719b99f2e
[DAG][ARM][MIPS][RISCV] Improve funnel shift promotion to use 'double shift' patterns

Based on a discussion on D88783, if we're promoting a funnel shift to a width at least twice the size as the original type, then we can use the 'double shift' patterns (shifting the concatenated sources).

Differential Revision: https://reviews.llvm.org/D89139
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/test/CodeGen/ARM/funnel-shift.ll
llvm/test/CodeGen/Mips/funnel-shift.ll
llvm/test/CodeGen/RISCV/rv64Zbt.ll