[MIPS GlobalISel] NarrowScalar G_MUL
authorPetar Avramovic <Petar.Avramovic@rt-rk.com>
Mon, 11 Mar 2019 10:00:17 +0000 (10:00 +0000)
committerPetar Avramovic <Petar.Avramovic@rt-rk.com>
Mon, 11 Mar 2019 10:00:17 +0000 (10:00 +0000)
commit0b17e59b5cf411b37e02e492b8d9d97450836477
treecf960f537640f0ac756303ec47f8bf93bc69098c
parent021b27fbcfe6bc0a1a8afa1656bd064dd4a051b8
[MIPS GlobalISel] NarrowScalar G_MUL

Narrow Scalar G_MUL for MIPS32.
Revisit NarrowScalar implementation in LegalizerHelper.
Introduce new helper function multiplyRegisters.
It performs generic multiplication of values held in multiple registers.
Generated instructions use only types NarrowTy and i1.
Destination can be same or two times size of the source.

Differential Revision: https://reviews.llvm.org/D58824

llvm-svn: 355814
llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
llvm/lib/Target/Mips/MipsLegalizerInfo.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-mul.mir
llvm/test/CodeGen/Mips/GlobalISel/legalizer/mul.mir
llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/mul.ll