[PowerPC] Implement intrinsics for mtfsf[i]
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Fri, 16 Jul 2021 18:54:21 +0000 (13:54 -0500)
committerLei Huang <lei@ca.ibm.com>
Fri, 16 Jul 2021 21:26:11 +0000 (16:26 -0500)
commit35a18a981f6b0f67899baec46be0086dc1aad757
treea32392acdb79b052b747bb97b4e8444933fcef9c
parent68ec4aa63b4ba762a634485b51b25b21257e5882
[PowerPC] Implement intrinsics for mtfsf[i]

This provides intrinsics for emitting instructions that set the FPSCR (`mtfsf/mtfsfi`).

The patch also conservatively marks the rounding mode as an implicit def for both since they both may set the rounding mode depending on the operands.

Reviewed By: #powerpc, qiucf

Differential Revision: https://reviews.llvm.org/D105957
clang/lib/CodeGen/CGBuiltin.cpp
clang/test/CodeGen/builtins-ppc-xlcompat-math.c
llvm/include/llvm/IR/IntrinsicsPowerPC.td
llvm/lib/Target/PowerPC/P9InstrResources.td
llvm/lib/Target/PowerPC/PPCInstrInfo.td
llvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-math.ll
llvm/test/CodeGen/PowerPC/fpscr-intrinsics.ll [new file with mode: 0644]