diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 0ebab141b187d..e6fcd378ca408 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -188,7 +188,8 @@ createTargetCodeGenInfo(CodeGenModule &CGM) { return createPPC32TargetCodeGenInfo(CGM, IsSoftFloat); } case llvm::Triple::ppcle: { - bool IsSoftFloat = CodeGenOpts.FloatABI == "soft"; + bool IsSoftFloat = + CodeGenOpts.FloatABI == "soft" || Target.hasFeature("spe"); return createPPC32TargetCodeGenInfo(CGM, IsSoftFloat); } case llvm::Triple::ppc64: diff --git a/clang/test/CodeGen/PowerPC/ppc-sfvarargs.c b/clang/test/CodeGen/PowerPC/ppc-sfvarargs.c index 850acf8f0317e..125f2ae4680ef 100644 --- a/clang/test/CodeGen/PowerPC/ppc-sfvarargs.c +++ b/clang/test/CodeGen/PowerPC/ppc-sfvarargs.c @@ -1,4 +1,7 @@ // RUN: %clang -O0 --target=powerpc-unknown-linux-gnu -EB -msoft-float -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang -O0 --target=powerpcle-unknown-linux-gnu -EL -msoft-float -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang -O0 --target=powerpcle-unknown-unknown -mcpu=e500 -mhard-float -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang -O0 --target=powerpc-unknown-unknown -mcpu=e500 -mhard-float -S -emit-llvm %s -o - | FileCheck %s #include void test(char *fmt, ...) {