[DAG] MatchRotate - Add funnel shift by immediate support
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 11 Mar 2020 18:55:18 +0000 (18:55 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 11 Mar 2020 18:55:18 +0000 (18:55 +0000)
commitd8f9416fdc83dd85062dc8cffdf982d2a953193f
tree1788836924301fa3a0d62d7f6b97f2b07054f297
parentdc120bae46d28e61783a873f3cf21cc84642f327
[DAG] MatchRotate - Add funnel shift by immediate support

This patch reuses the existing MatchRotate ROTL/ROTR rotation pattern code to also recognize the more general FSHL/FSHR funnel shift patterns when we have constant shift amounts.

Differential Revision: https://reviews.llvm.org/D75114
13 files changed:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/avg.ll
llvm/test/CodeGen/X86/avx512vbmi2-funnel-shifts.ll
llvm/test/CodeGen/X86/avx512vbmi2vl-funnel-shifts.ll
llvm/test/CodeGen/X86/const-shift-of-constmasked.ll
llvm/test/CodeGen/X86/fshl.ll
llvm/test/CodeGen/X86/fshr.ll
llvm/test/CodeGen/X86/known-bits.ll
llvm/test/CodeGen/X86/sdiv_fix.ll
llvm/test/CodeGen/X86/sdiv_fix_sat.ll
llvm/test/CodeGen/X86/udiv_fix_sat.ll
llvm/test/CodeGen/X86/x86-64-double-precision-shift-left.ll
llvm/test/CodeGen/X86/x86-64-double-shifts-Oz-Os-O2.ll