aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/TargetInfo.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2019-06-18 19:04:27 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2019-06-18 19:04:27 +0000
commit7ae267dc0f34a3dec1e08a8dac42ad780ebbc059 (patch)
tree826a4218d029be66bd47588063d253fe03fefdc1 /clang/lib/CodeGen/TargetInfo.cpp
parent10e6128c62ed4ef9e777a8dcb082f9f0a77d52eb (diff)
downloadllvm-7ae267dc0f34a3dec1e08a8dac42ad780ebbc059.zip
llvm-7ae267dc0f34a3dec1e08a8dac42ad780ebbc059.tar.gz
llvm-7ae267dc0f34a3dec1e08a8dac42ad780ebbc059.tar.bz2
[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
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r--clang/lib/CodeGen/TargetInfo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index 707425e..b1ff460 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)