diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index 8d9937e1459dd..04e4123ad117c 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -4903,7 +4903,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } if (Arg *A = Args.getLastArg(options::OPT_LongDouble_Group)) { - if (TC.getTriple().isX86()) + if (TC.getTriple().isX86() || TC.getTriple().isSPIR()) A->render(Args, CmdArgs); else if ((TC.getArch() == llvm::Triple::ppc || TC.getTriple().isPPC64()) && (A->getOption().getID() != options::OPT_mlong_double_80)) diff --git a/clang/test/Driver/mlong-double-128.c b/clang/test/Driver/mlong-double-128.c index 28d777a859c83..e452d450a6304 100644 --- a/clang/test/Driver/mlong-double-128.c +++ b/clang/test/Driver/mlong-double-128.c @@ -2,6 +2,7 @@ // RUN: %clang -target powerpc64-pc-freebsd12 -c -### %s -mlong-double-128 2>&1 | FileCheck %s // RUN: %clang -target powerpc64le-linux-musl -c -### %s -mlong-double-128 2>&1 | FileCheck %s // RUN: %clang -target i686-linux-gnu -c -### %s -mlong-double-128 2>&1 | FileCheck %s +// RUN: %clang -target spir64-unknown-unknown-sycldevice -c -### %s -mlong-double-128 2>&1 | FileCheck %s // RUN: %clang -target x86_64-linux-musl -c -### %s -mlong-double-128 -mlong-double-80 2>&1 | FileCheck --implicit-check-not=-mlong-double-128 /dev/null // RUN: %clang -target x86_64-linux-musl -c -### %s -mlong-double-80 -mlong-double-128 2>&1 | FileCheck %s diff --git a/clang/test/Driver/mlong-double-64.c b/clang/test/Driver/mlong-double-64.c index bcaa31f9831b6..2b47c4896efc6 100644 --- a/clang/test/Driver/mlong-double-64.c +++ b/clang/test/Driver/mlong-double-64.c @@ -3,6 +3,7 @@ // RUN: %clang -target powerpc64le-linux-musl -c -### %s -mlong-double-64 2>&1 | FileCheck %s // RUN: %clang -target i686-linux-gnu -c -### %s -mlong-double-64 2>&1 | FileCheck %s // RUN: %clang -target x86_64-linux-musl -c -### %s -mlong-double-64 2>&1 | FileCheck %s +// RUN: %clang -target spir64-unknown-unknown-sycldevice -c -### %s -mlong-double-64 2>&1 | FileCheck %s // CHECK: "-mlong-double-64"