[clang] [llvm] Implement operand bundles for floating-point operations (PR #109798)
Serge Pavlov via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 27 09:25:16 PDT 2024
================
@@ -47,6 +47,15 @@ enum class RoundingMode : int8_t {
Invalid = -1 ///< Denotes invalid value.
};
+inline bool isValidRoundingMode(int X) {
+ return X >= 0 && X <= static_cast<int>(RoundingMode::Dynamic);
----------------
spavloff wrote:
This is bad function name. Actually set of supported rounding modes depends on the used target. For example not every target supports rounding `NearestTiesToAway`. But any rounding mode must fit 3 bits. So the function is about loose validation.
If metadata will be used fo "fpe.round", this function would be unnecessary.
https://github.com/llvm/llvm-project/pull/109798
More information about the cfe-commits
mailing list