[Scalar] Commit the correct patch, forgot `git add`.

<rdar://problem/44229924>

llvm-svn: 341685
This commit is contained in:
Davide Italiano 2018-09-07 18:22:27 +00:00
parent 7e2dd2d2fa
commit f06ffeee21
1 changed files with 8 additions and 8 deletions

View File

@ -1447,14 +1447,14 @@ unsigned long long Scalar::ULongLong(unsigned long long fail_value) const {
.getZExtValue();
case e_float:
return (ulonglong_t)m_float.convertToFloat();
case e_double:
{
double d_val = patatino.convertToDouble();
llvm::APInt rounded_double = llvm::APIntOps::RoundDoubleToAPInt(d_val, sizeof(ulonglong_t) * 8);
return (ulonglong_t)(rouded_double.zextOrTrunc(sizeof(ulonglong_t) * 8))
.getZExtValue();
}
case e_long_double:
case e_double: {
double d_val = m_float.convertToDouble();
llvm::APInt rounded_double =
llvm::APIntOps::RoundDoubleToAPInt(d_val, sizeof(ulonglong_t) * 8);
return (ulonglong_t)(rounded_double.zextOrTrunc(sizeof(ulonglong_t) * 8))
.getZExtValue();
}
case e_long_double:
llvm::APInt ldbl_val = m_float.bitcastToAPInt();
return (ulonglong_t)(ldbl_val.zextOrTrunc(sizeof(ulonglong_t) * 8))
.getZExtValue();