From 7ae267dc0f34a3dec1e08a8dac42ad780ebbc059 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Tue, 18 Jun 2019 19:04:27 +0000 Subject: [OPENMP][NVPTX]Correct codegen for 128 bit long double. If the host uses 128 bit long doubles, the compiler should generate correct code for NVPTX devices. If the return type has 128 bit long doubles, in LLVM IR this type must be coerced to int array instead. llvm-svn: 363720 --- clang/lib/CodeGen/TargetInfo.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'clang/lib/CodeGen') diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 707425ea813..b1ff46049fa 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -6330,7 +6330,9 @@ private: static bool isUnsupportedType(ASTContext &Context, QualType T) { if (!Context.getTargetInfo().hasFloat16Type() && T->isFloat16Type()) return true; - if (!Context.getTargetInfo().hasFloat128Type() && T->isFloat128Type()) + if (!Context.getTargetInfo().hasFloat128Type() && + (T->isFloat128Type() || + (T->isRealFloatingType() && Context.getTypeSize(T) == 128))) return true; if (!Context.getTargetInfo().hasInt128Type() && T->isIntegerType() && Context.getTypeSize(T) > 64) -- cgit v1.2.3