Created
August 29, 2019 20:03
-
-
Save zoecarver/831606521a4a62bde9df66a5da3bb78b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case Builtin::BI__builtin_llroundf: { | |
APFloat FPVal(0.0); | |
APSInt IVal; | |
bool isExact = true; | |
if(!EvaluateFloat(E->getArg(0), FPVal, Info)) return false; | |
// I have also tried with several other rm values. | |
FPVal.convertToInteger(IVal, APFloat::rmNearestTiesToEven, &isExact); | |
return Success(IVal.getExtValue(), E); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment