[all-commits] [llvm/llvm-project] 5840f7: [PowerPC] Respect rounding mode in the back end
Nemanja Ivanovic via All-commits
all-commits at lists.llvm.org
Wed Nov 10 06:20:15 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5840f7197d058371c01fd7ac9ad932a3ab2ced6a
https://github.com/llvm/llvm-project/commit/5840f7197d058371c01fd7ac9ad932a3ab2ced6a
Author: Nemanja Ivanovic <nemanja.i.ibm at gmail.com>
Date: 2021-11-10 (Wed, 10 Nov 2021)
Changed paths:
M llvm/lib/Target/PowerPC/P10InstrResources.td
M llvm/lib/Target/PowerPC/P9InstrResources.td
M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
M llvm/lib/Target/PowerPC/PPCISelLowering.h
M llvm/lib/Target/PowerPC/PPCInstr64Bit.td
M llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
M llvm/lib/Target/PowerPC/PPCInstrInfo.td
M llvm/lib/Target/PowerPC/PPCInstrVSX.td
A llvm/test/CodeGen/PowerPC/cse-despite-rounding-mode.ll
A llvm/test/CodeGen/PowerPC/respect-rounding-mode.ll
M llvm/test/CodeGen/PowerPC/vector-constrained-fp-intrinsics.ll
Log Message:
-----------
[PowerPC] Respect rounding mode in the back end
Currently, the floating point instructions that depend on
rounding mode are correctly marked in the PPC back end with
an implicit use of the RM register. Similarly, instructions
that explicitly define the register are marked with an
implicit def of the same register. So for the most part,
RM-using code won't be moved across RM-setting instructions.
However, calls are not marked as RM-setting instructions so
code can be moved across calls. This is generally desired,
but so is the ability to turn off this behaviour with an
appropriate option - and -frounding-math really should be
that option.
This patch provides a set of call instructions (for direct
and indirect calls) that are marked with an implicit def of
the RM register. These will be used for calls that are marked
with the strictfp attribute.
Differential revision: https://reviews.llvm.org/D111433
More information about the All-commits
mailing list