summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips
diff options
context:
space:
mode:
authorPetar Avramovic <Petar.Avramovic@rt-rk.com>2019-03-11 10:00:17 +0000
committerPetar Avramovic <Petar.Avramovic@rt-rk.com>2019-03-11 10:00:17 +0000
commit0b17e59b5cf411b37e02e492b8d9d97450836477 (patch)
treecf960f537640f0ac756303ec47f8bf93bc69098c /llvm/lib/Target/Mips
parent021b27fbcfe6bc0a1a8afa1656bd064dd4a051b8 (diff)
downloadbcm5719-llvm-0b17e59b5cf411b37e02e492b8d9d97450836477.tar.gz
bcm5719-llvm-0b17e59b5cf411b37e02e492b8d9d97450836477.zip
[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
Diffstat (limited to 'llvm/lib/Target/Mips')
-rw-r--r--llvm/lib/Target/Mips/MipsLegalizerInfo.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/Target/Mips/MipsLegalizerInfo.cpp b/llvm/lib/Target/Mips/MipsLegalizerInfo.cpp
index 1da43b0b6df..99f98dfabd2 100644
--- a/llvm/lib/Target/Mips/MipsLegalizerInfo.cpp
+++ b/llvm/lib/Target/Mips/MipsLegalizerInfo.cpp
@@ -24,14 +24,10 @@ MipsLegalizerInfo::MipsLegalizerInfo(const MipsSubtarget &ST) {
const LLT s64 = LLT::scalar(64);
const LLT p0 = LLT::pointer(0, 32);
- getActionDefinitionsBuilder({G_ADD, G_SUB})
+ getActionDefinitionsBuilder({G_ADD, G_SUB, G_MUL})
.legalFor({s32})
.clampScalar(0, s32, s32);
- getActionDefinitionsBuilder(G_MUL)
- .legalFor({s32})
- .minScalar(0, s32);
-
getActionDefinitionsBuilder({G_UADDO, G_UADDE, G_USUBO, G_USUBE, G_UMULO})
.lowerFor({{s32, s1}});
OpenPOWER on IntegriCloud