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

More ppcf128 issues (maybe the last)?

llvm-svn: 43160
This commit is contained in:
Dale Johannesen 2007-10-19 00:59:18 +00:00
parent 0449186690
commit b23b0bfa8f
3 changed files with 12 additions and 1 deletions

View File

@ -20,6 +20,10 @@ namespace RTLIB {
/// RTLIB::Libcall enum - This enum defines all of the runtime library calls
/// the backend can emit. The various long double types cannot be merged,
/// because 80-bit library functions use "xf" and 128-bit use "tf".
///
/// When adding PPCF128 functions here, note that their names generally need
/// to be overridden for Darwin with the xxx$LDBL128 form. See
/// PPCISelLowering.cpp.
///
enum Libcall {
// Integer

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() &&
if (ISD::isNON_EXTLoad(N0.Val) && N0.hasOneUse() && VT != MVT::ppcf128 &&
(!AfterLegalize||TLI.isLoadXLegal(ISD::EXTLOAD, N0.getValueType()))) {
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
SDOperand ExtLoad = DAG.getExtLoad(ISD::EXTLOAD, VT, LN0->getChain(),

View File

@ -341,6 +341,13 @@ PPCTargetLowering::PPCTargetLowering(PPCTargetMachine &TM)
setTargetDAGCombine(ISD::BR_CC);
setTargetDAGCombine(ISD::BSWAP);
// Darwin long double math library functions have $LDBL128 appended.
if (TM.getSubtarget<PPCSubtarget>().isDarwin()) {
setLibcallName(RTLIB::SQRT_PPCF128, "sqrtl$LDBL128");
setLibcallName(RTLIB::POW_PPCF128, "powl$LDBL128");
setLibcallName(RTLIB::REM_PPCF128, "fmodl$LDBL128");
}
computeRegisterProperties();
}