Ext or trunc for integers types, not bitcast.
This commit is contained in:
parent
1f4fec77b3
commit
2d58363c50
|
@ -186,7 +186,7 @@ llvm::Value* coerce(BitcodeEmitter::Private *d, llvm::Value *val, llvm::Type *to
|
|||
if (isFP(fromType)) {
|
||||
return d->builder.CreateFPToSI(val, toType);
|
||||
} else if (isInt(fromType)) {
|
||||
return d->builder.CreateSExtOrBitCast(val, toType);
|
||||
return d->builder.CreateSExtOrTrunc(val, toType);
|
||||
}
|
||||
}
|
||||
else if (isFP(toType) && isInt(fromType)) {
|
||||
|
|
Reference in New Issue
Block a user