================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits