[PATCH] D64289: [OpenMP] Fix 128-bit long double support on target
Joel E. Denny via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 6 14:02:44 PDT 2019
jdenny added inline comments.
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:1594
+ !Context.getTargetInfo().hasFloat128Type() &&
+ Context.getTargetInfo().getLongDoubleWidth() != 128) ||
(Ty->isIntegerType() && Context.getTypeSize(Ty) == 128 &&
----------------
ABataev wrote:
> Hmm, this look strange, at least. Seems to me, in this case the size of the long double is 128 bit (copied from the host), but device reports that it does not support 128 bit double. Seems to me, it is a problem with the device configuration. Why does the host translate long double to 128 bit fp, while the device translates it to 64 bit FP?
Sorry, I think I've misunderstood what's happening here, and my fix is probably wrong.
For x86_64, the example from my patch summary fails as described there. Does that work for you?
For powerpc64le, the reproducer I added to the test suite fails without this patch. Shouldn't it succeed?
================
Comment at: clang/test/OpenMP/nvptx_unsupported_type_messages.cpp:9
+// RUN: %clang_cc1 -verify=quiet -fopenmp -x c++ -triple x86_64-unknown-linux -fopenmp-targets=x86_64-unknown-linux -emit-llvm-bc %s -o %t-host.bc
+// RUN: %clang_cc1 -verify=quiet -fopenmp -x c++ -triple powerpc64le-unknown-linux-gnu -aux-triple x86_64-unknown-linux -fopenmp-targets=x86_64-unknown-linux %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-host.bc -fsyntax-only
+// RUN: %clang_cc1 -verify=quiet -fopenmp -x c++ -triple powerpc64le-unknown-linux-gnu -fopenmp-targets=powerpc64le-unknown-linux-gnu -emit-llvm-bc %s -o %t-host.bc
----------------
Sorry, this line was supposed to be x86_64 only, and then it no longer acts as a reproducer for me.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64289/new/
https://reviews.llvm.org/D64289
More information about the cfe-commits
mailing list