[MIPS GlobalISel] Legalize i8 and i16 add
authorPetar Jovanovic <petar.jovanovic@mips.com>
Sun, 26 Aug 2018 07:25:33 +0000 (07:25 +0000)
committerPetar Jovanovic <petar.jovanovic@mips.com>
Sun, 26 Aug 2018 07:25:33 +0000 (07:25 +0000)
commit1fa5051bad754786c0d8a235beed05daf15e1bbc
treeb0feaa3b67b4d43b2d414ff41eb29b34cf31a386
parent7c3a12ff425ae850dc9dbbe04e181a892d06fd4d
[MIPS GlobalISel] Legalize i8 and i16 add

Legalize G_ADD for types smaller than i32.
LegalizationArtifactCombiner replaces extend instructions with appropriate
bitwise instructions.

Patch by Petar Avramovic.

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

llvm-svn: 340697
llvm/lib/Target/Mips/MipsLegalizerInfo.cpp
llvm/test/CodeGen/Mips/GlobalISel/legalizer/add.mir
llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/add.ll