llvm.org GIT mirror llvm / 5938bef
don't fold fp_round(fp_extend(load)) -> fp_round(extload) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45400 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 11 years ago
1 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
36713671 ConstantFPSDNode *N0CFP = dyn_cast(N0);
36723672 MVT::ValueType VT = N->getValueType(0);
36733673
3674 // If this is fp_round(fpextend), don't fold it, allow ourselves to be folded.
3675 if (N->hasOneUse() && (*N->use_begin())->getOpcode() == ISD::FP_ROUND)
3676 return SDOperand();
3677
36743678 // fold (fp_extend c1fp) -> c1fp
36753679 if (N0CFP && VT != MVT::ppcf128)
36763680 return DAG.getNode(ISD::FP_EXTEND, VT, N0);