Go to the documentation of this file.
15 #ifndef LLVM_ADT_FLOATINGPOINTMODE_H
16 #define LLVM_ADT_FLOATINGPOINTMODE_H
58 default:
return "invalid";
104 return DenormalMode(DenormalModeKind::IEEE, DenormalModeKind::IEEE);
109 DenormalModeKind::PreserveSign);
122 return !(*
this ==
Other);
136 inline std::string
str()
const {
167 return "preserve-sign";
169 return "positive-zero";
178 std::tie(OutputStr, InputStr) = Str.split(
',');
222 #endif // LLVM_ADT_FLOATINGPOINTMODE_H
StringSwitch & Case(StringLiteral S, T Value)
bool operator!=(DenormalMode Other) const
DenormalMode::DenormalModeKind parseDenormalFPAttributeComponent(StringRef Str)
Parse the expected names from the denormal-fp-math attribute.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_NODISCARD R Default(T Value)
A raw_ostream that writes to an std::string.
DenormalMode parseDenormalFPAttribute(StringRef Str)
Returns the denormal mode to use for inputs and outputs.
DenormalModeKind Input
Denormal treatment kind for floating point instruction inputs in the default floating-point environme...
RoundingMode
Rounding mode.
This class implements an extremely fast bulk output stream that can only output to a stream.
constexpr DenormalMode()=default
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
@ Invalid
Denotes invalid value.
DenormalModeKind
Represent handled modes for denormal (aka subnormal) modes in the floating point environment.
FPClassTest
Floating-point class tests, supported by 'is_fpclass' intrinsic.
static constexpr DenormalMode getPositiveZero()
constexpr LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
Represent subnormal handling kind for floating point instruction inputs and outputs.
constexpr DenormalMode(DenormalModeKind Out, DenormalModeKind In)
@ IEEE
IEEE-754 denormal numbers preserved.
@ TowardNegative
roundTowardNegative.
StringRef - Represent a constant reference to a string, i.e.
@ Dynamic
Denotes mode unknown at compile time.
@ PositiveZero
Denormals are flushed to positive zero.
StringSwitch & Cases(StringLiteral S0, StringLiteral S1, T Value)
static constexpr DenormalMode getInvalid()
@ NearestTiesToAway
roundTiesToAway.
StringRef spell(RoundingMode RM)
Returns text representation of the given rounding mode.
@ TowardZero
roundTowardZero.
bool operator==(DenormalMode Other) const
void print(raw_ostream &OS) const
static constexpr DenormalMode getPreserveSign()
static constexpr DenormalMode getIEEE()
@ TowardPositive
roundTowardPositive.
DenormalModeKind Output
Denormal flushing mode for floating point instruction results in the default floating point environme...
A switch()-like statement whose cases are string literals.
@ PreserveSign
The sign of a flushed-to-zero number is preserved in the sign of 0.
std::string & str()
Returns the string's reference.
@ NearestTiesToEven
roundTiesToEven.
Optional< std::vector< StOtherPiece > > Other
StringRef denormalModeKindName(DenormalMode::DenormalModeKind Mode)
Return the name used for the denormal handling mode used by the the expected names from the denormal-...