llvm.org GIT mirror llvm / fabd32d
More ppcf128 issues (maybe the last)? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43160 91177308-0d34-0410-b5e6-96231b3b80d8 Dale Johannesen 12 years ago
3 changed file(s) with 12 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
1919 /// RTLIB::Libcall enum - This enum defines all of the runtime library calls
2020 /// the backend can emit. The various long double types cannot be merged,
2121 /// because 80-bit library functions use "xf" and 128-bit use "tf".
22 ///
23 /// When adding PPCF128 functions here, note that their names generally need
24 /// to be overridden for Darwin with the xxx$LDBL128 form. See
25 /// PPCISelLowering.cpp.
2226 ///
2327 enum Libcall {
2428 // Integer
34923492 return DAG.getNode(ISD::FP_EXTEND, VT, N0);
34933493
34943494 // fold (fpext (load x)) -> (fpext (fpround (extload x)))
3495 if (ISD::isNON_EXTLoad(N0.Val) && N0.hasOneUse() &&
3495 if (ISD::isNON_EXTLoad(N0.Val) && N0.hasOneUse() && VT != MVT::ppcf128 &&
34963496 (!AfterLegalize||TLI.isLoadXLegal(ISD::EXTLOAD, N0.getValueType()))) {
34973497 LoadSDNode *LN0 = cast(N0);
34983498 SDOperand ExtLoad = DAG.getExtLoad(ISD::EXTLOAD, VT, LN0->getChain(),
340340 setTargetDAGCombine(ISD::BR_CC);
341341 setTargetDAGCombine(ISD::BSWAP);
342342
343 // Darwin long double math library functions have $LDBL128 appended.
344 if (TM.getSubtarget().isDarwin()) {
345 setLibcallName(RTLIB::SQRT_PPCF128, "sqrtl$LDBL128");
346 setLibcallName(RTLIB::POW_PPCF128, "powl$LDBL128");
347 setLibcallName(RTLIB::REM_PPCF128, "fmodl$LDBL128");
348 }
349
343350 computeRegisterProperties();
344351 }
345352