mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-09 13:33:17 +00:00
Alpha doesn't have a native f32 extload instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19880 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e76ad6de40
commit
99939d39c9
@ -256,7 +256,11 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
|
||||
bool isDouble = VT == MVT::f64;
|
||||
ConstantFP *LLVMC = ConstantFP::get(isDouble ? Type::DoubleTy :
|
||||
Type::FloatTy, CFP->getValue());
|
||||
if (isDouble && CFP->isExactlyValue((float)CFP->getValue())) {
|
||||
if (isDouble && CFP->isExactlyValue((float)CFP->getValue()) &&
|
||||
// Only do this if the target has a native EXTLOAD instruction from
|
||||
// f32.
|
||||
TLI.getOperationAction(ISD::EXTLOAD,
|
||||
MVT::f32) == TargetLowering::Legal) {
|
||||
LLVMC = cast<ConstantFP>(ConstantExpr::getCast(LLVMC, Type::FloatTy));
|
||||
VT = MVT::f32;
|
||||
Extend = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user