[PowerPC] Implement low-order Vector Multiply, Modulus and Divide Instructions
authorAmy Kwan <amy.kwan1@ibm.com>
Thu, 23 Jul 2020 18:12:45 +0000 (13:12 -0500)
committerAmy Kwan <amy.kwan1@ibm.com>
Thu, 23 Jul 2020 22:18:36 +0000 (17:18 -0500)
commit1dc1a3fb0c51527d46ca47ae794ace16c8ec2fd2
tree221d9ffe42173f623784a9600c885e9e88003b2d
parent38c71b7c85cac4c8de39329ff3ed682e63f61525
[PowerPC] Implement low-order Vector Multiply, Modulus and Divide Instructions

This patch aims to implement the low order vector multiply, divide and modulo
instructions available on Power10.

The patch involves legalizing the ISD nodes MUL, UDIV, SDIV, UREM and SREM for
v2i64 and v4i32 vector types in order to utilize the following instructions:
- Vector Multiply Low Doubleword: vmulld
- Vector Modulus Word/Doubleword: vmodsw, vmoduw, vmodsd, vmodud
- Vector Divide Word/Doubleword: vdivsw, vdivsd, vdivuw, vdivud

Differential Revision: https://reviews.llvm.org/D82510
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCInstrPrefix.td
llvm/test/CodeGen/PowerPC/p10-vector-divide.ll [new file with mode: 0644]
llvm/test/CodeGen/PowerPC/p10-vector-modulo.ll [new file with mode: 0644]
llvm/test/CodeGen/PowerPC/p10-vector-multiply.ll [new file with mode: 0644]