Fix bug in FP to integer conversion.
This commit is contained in:
parent
c9bff1e64b
commit
8d28c5e909
|
@ -177,7 +177,7 @@ llvm::Value* coerce(BitcodeEmitter::Private *d, llvm::Value *val, llvm::Type *to
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (isFP(toType) && isInt(fromType)) {
|
else if (isFP(toType) && isInt(fromType)) {
|
||||||
return d->builder.CreateFPToSI(val, toType);
|
return d->builder.CreateSIToFP(val, toType);
|
||||||
}
|
}
|
||||||
else if (fromType->isFloatTy() && toType->isDoubleTy()) {
|
else if (fromType->isFloatTy() && toType->isDoubleTy()) {
|
||||||
return d->builder.CreateFPExt(val, toType);
|
return d->builder.CreateFPExt(val, toType);
|
||||||
|
|
Reference in New Issue
Block a user