[llvm-branch-commits] [clang] [llvm] [IR] Add FPOperation intrinsic property (PR #122313)
Serge Pavlov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jan 14 02:58:57 PST 2025
spavloff wrote:
Rounding mode is a parameter of a floating-point operation, its effect does not depend on the fact that it comes from a register or is specified as an immediate value. Implementing them differently does not look like a good solution.
Implementing static rounding using different intrinsic set would require four instrinsics to represent a single FP operation (constrained intrinsics also can use static rounding). It is the problem the operand bundles should solve.
Now an FP operation may have two parameters attached to it - rounding mode and exception handling. They are of very different nature, - rounding mode is a part of FP environment but exception handling is just an instruction to the compiler, it contains no information about FP environment. Adding static rounding (and in future probably static denormal mode) hardly add a confusion to this solution.
https://github.com/llvm/llvm-project/pull/122313
More information about the llvm-branch-commits
mailing list