1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Redo "last ppc long double fix" as Chris wants.

llvm-svn: 43189
This commit is contained in:
Dale Johannesen 2007-10-19 20:29:00 +00:00
parent 8dde52e2cd
commit 4ae755d15c
2 changed files with 3 additions and 2 deletions

View File

@ -3493,7 +3493,7 @@ SDOperand DAGCombiner::visitFP_EXTEND(SDNode *N) {
return DAG.getNode(ISD::FP_EXTEND, VT, N0);
// fold (fpext (load x)) -> (fpext (fpround (extload x)))
if (ISD::isNON_EXTLoad(N0.Val) && N0.hasOneUse() && VT != MVT::ppcf128 &&
if (ISD::isNON_EXTLoad(N0.Val) && N0.hasOneUse() &&
(!AfterLegalize||TLI.isLoadXLegal(ISD::EXTLOAD, N0.getValueType()))) {
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
SDOperand ExtLoad = DAG.getExtLoad(ISD::EXTLOAD, VT, LN0->getChain(),

View File

@ -5443,7 +5443,8 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){
} else {
MVT::ValueType EVT = LD->getLoadedVT();
if (VT == MVT::f64 && EVT == MVT::f32) {
if ((VT == MVT::f64 && EVT == MVT::f32) ||
(VT == MVT::ppcf128 && (EVT==MVT::f64 || EVT==MVT::f32))) {
// f64 = EXTLOAD f32 should expand to LOAD, FP_EXTEND
SDOperand Load = DAG.getLoad(EVT, Ch, Ptr, LD->getSrcValue(),
SVOffset, isVolatile, Alignment);