[PowerPC] Fix RM operands for some instructions
authorKang Zhang <shkzhang@cn.ibm.com>
Thu, 30 Jul 2020 02:10:49 +0000 (02:10 +0000)
committerKang Zhang <shkzhang@cn.ibm.com>
Thu, 30 Jul 2020 02:10:49 +0000 (02:10 +0000)
commita18953c1c05e520406783acbb5e6b06954f9150d
treeb8736a0abf6c02a6ee50cad401c4af03923a1b16
parent5aa2fd88cfb745659fb36d700326b21fcd148afd
[PowerPC] Fix RM operands for some instructions

Summary:
Some instructions have set the wrong [RM] flag, this patch is to fix it.

Instructions x(v|s)r(d|s)pi[zmp]? and fri[npzm] use fixed rounding
directions without referencing current rounding mode.

Also, the SETRNDi, SETRND, BCLRn, MTFSFI, MTFSB0, MTFSB1, MTFSFb,
MTFSFI, MTFSFI_rec, MTFSF, MTFSF_rec should also fix the RM flag.

Reviewed By: jsji

Differential Revision: https://reviews.llvm.org/D81360
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCInstrInfo.td
llvm/lib/Target/PowerPC/PPCInstrVSX.td
llvm/test/CodeGen/PowerPC/rounding-rm-flag.ll [new file with mode: 0644]
llvm/test/CodeGen/PowerPC/setrnd.ll