OSDN Git Service

[Power9] Added support for the modsw, moduw, modsd, modud hardware instructions.
authorTony Jiang <jtony@ca.ibm.com>
Mon, 12 Jun 2017 17:58:42 +0000 (17:58 +0000)
committerTony Jiang <jtony@ca.ibm.com>
Mon, 12 Jun 2017 17:58:42 +0000 (17:58 +0000)
commite3ae196e2449d071c068c58795c50527d631f79c
treeb476316ae5eb0d0abe309aa7af782c1a965a006a
parent20e04578a8e6c88f9a6e73a1826ebbae84fd8e94
[Power9] Added support for the modsw, moduw, modsd, modud hardware instructions.

Note that if we need the result of both the divide and the modulo then we
compute the modulo based on the result of the divide and not using the new
hardware instruction.

Commit on behalf of STEFAN PINTILIE.
Differential Revision: https://reviews.llvm.org/D33940

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305210 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCISelLowering.h
lib/Target/PowerPC/PPCInstr64Bit.td
lib/Target/PowerPC/PPCInstrInfo.td
test/CodeGen/PowerPC/ppc64-P9-mod.ll [new file with mode: 0644]
test/MC/Disassembler/PowerPC/ppc64-encoding.txt
test/MC/Disassembler/PowerPC/ppc64le-encoding.txt
test/MC/PowerPC/ppc64-encoding.s