diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp index 9e3f14ccaf01..705dd783fc36 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -49,9 +49,11 @@ static std::string getDataLayoutString(const PPCSubtarget &ST) { // documentation are wrong; these are correct (i.e. "what gcc does"). if (ST.isPPC64() || ST.isSVR4ABI()) Ret += "-i64:64"; + else + Ret += "-f64:32:64"; // Set support for 128 floats depending on the ABI. - if (!ST.isPPC64() || !ST.isSVR4ABI()) + if (!ST.isPPC64() && ST.isSVR4ABI()) Ret += "-f128:64:128"; // PPC64 has 32 and 64 bit registers, PPC32 has only 32 bit ones.