convertFromInteger, as originally written, expected sign-extended
input. APInt unfortunately zero-extends signed integers, so Dale
modified the function to expect zero-extended input. Make this
assumption explicit in the function name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42732 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp
index 61be350..96604f1 100644
--- a/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -396,7 +396,7 @@
else if (CE->getType() == Type::X86_FP80Ty) {
const uint64_t zero[] = {0, 0};
APFloat apf = APFloat(APInt(80, 2, zero));
- (void)apf.convertFromInteger(GV.IntVal.getRawData(),
+ (void)apf.convertFromZeroExtendedInteger(GV.IntVal.getRawData(),
GV.IntVal.getBitWidth(), false,
APFloat::rmNearestTiesToEven);
GV.IntVal = apf.convertToAPInt();
@@ -412,7 +412,7 @@
else if (CE->getType() == Type::X86_FP80Ty) {
const uint64_t zero[] = { 0, 0};
APFloat apf = APFloat(APInt(80, 2, zero));
- (void)apf.convertFromInteger(GV.IntVal.getRawData(),
+ (void)apf.convertFromZeroExtendedInteger(GV.IntVal.getRawData(),
GV.IntVal.getBitWidth(), true,
APFloat::rmNearestTiesToEven);
GV.IntVal = apf.convertToAPInt();