mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-22 20:20:03 +00:00
Redo "last ppc long double fix" as Chris wants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43189 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4f78af8d77
commit
b6210fc92b
@ -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(),
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user