mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-12 22:17:47 +00:00
Expand (f64 extload f32) to (f64 fp_ext (load f32)) if f64 type action is expand.
llvm-svn: 32527
This commit is contained in:
parent
d5d848048f
commit
e200668366
@ -4547,6 +4547,16 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){
|
||||
std::swap(Lo, Hi);
|
||||
} else {
|
||||
MVT::ValueType EVT = LD->getLoadedVT();
|
||||
|
||||
if (VT == MVT::f64 && EVT == MVT::f32) {
|
||||
// f64 = EXTLOAD f32 should expand to LOAD, FP_EXTEND
|
||||
SDOperand Load = DAG.getLoad(EVT, Ch, Ptr, LD->getSrcValue(),
|
||||
LD->getSrcValueOffset());
|
||||
// Remember that we legalized the chain.
|
||||
AddLegalizedOperand(SDOperand(Node, 1), LegalizeOp(Load.getValue(1)));
|
||||
ExpandOp(DAG.getNode(ISD::FP_EXTEND, VT, Load), Lo, Hi);
|
||||
break;
|
||||
}
|
||||
|
||||
if (EVT == NVT)
|
||||
Lo = DAG.getLoad(NVT, Ch, Ptr, LD->getSrcValue(),
|
||||
|
Loading…
Reference in New Issue
Block a user