mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Simplify code using convertFromZeroExtendedInteger with an APInt
by using the new convertFromAPInt directly. llvm-svn: 47739
This commit is contained in:
parent
45a26a462f
commit
44367c23de
@ -424,9 +424,9 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
|
||||
else if (CE->getType() == Type::X86_FP80Ty) {
|
||||
const uint64_t zero[] = {0, 0};
|
||||
APFloat apf = APFloat(APInt(80, 2, zero));
|
||||
(void)apf.convertFromZeroExtendedInteger(GV.IntVal.getRawData(),
|
||||
GV.IntVal.getBitWidth(), false,
|
||||
APFloat::rmNearestTiesToEven);
|
||||
(void)apf.convertFromAPInt(GV.IntVal,
|
||||
false,
|
||||
APFloat::rmNearestTiesToEven);
|
||||
GV.IntVal = apf.convertToAPInt();
|
||||
}
|
||||
return GV;
|
||||
@ -440,9 +440,9 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
|
||||
else if (CE->getType() == Type::X86_FP80Ty) {
|
||||
const uint64_t zero[] = { 0, 0};
|
||||
APFloat apf = APFloat(APInt(80, 2, zero));
|
||||
(void)apf.convertFromZeroExtendedInteger(GV.IntVal.getRawData(),
|
||||
GV.IntVal.getBitWidth(), true,
|
||||
APFloat::rmNearestTiesToEven);
|
||||
(void)apf.convertFromAPInt(GV.IntVal,
|
||||
true,
|
||||
APFloat::rmNearestTiesToEven);
|
||||
GV.IntVal = apf.convertToAPInt();
|
||||
}
|
||||
return GV;
|
||||
|
Loading…
Reference in New Issue
Block a user