[PATCH] D98143: [HIP] Diagnose aggregate args containing half types
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 7 07:34:10 PST 2021
yaxunl created this revision.
yaxunl added a reviewer: tra.
Herald added subscribers: jansvoboda11, dexonsmith, dang.
yaxunl requested review of this revision.
gcc and clang currently do not have a consistent ABI
for half precision types. Passing aggregate args containing half precision
types between clang and gcc can cause UB.
This patch adds an option -fhip-allow-half-arg. When off, clang
will diagnose aggregate arguments containing half precision
types in host functions.
https://reviews.llvm.org/D98143
Files:
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Basic/LangOptions.def
clang/include/clang/Driver/Options.td
clang/lib/Headers/__clang_hip_cmath.h
clang/lib/Sema/SemaDecl.cpp
clang/test/SemaCUDA/half-arg.cu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98143.328861.patch
Type: text/x-patch
Size: 20085 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210307/798f7397/attachment-0001.bin>
More information about the cfe-commits
mailing list