+ /// two floating point values. The version with a double operand is retained
+ /// because it's so convenient to write isExactlyValue(2.0), but please use
+ /// it only for simple constants.
+ bool isExactlyValue(const APFloat& V) const;
+
+ bool isExactlyValue(double V) const {
+ bool ignored;
+ // convert is not supported on this type
+ if (&Val.getSemantics() == &APFloat::PPCDoubleDouble)
+ return false;
+ APFloat FV(V);
+ FV.convert(Val.getSemantics(), APFloat::rmNearestTiesToEven, &ignored);
+ return isExactlyValue(FV);
+ }