Consider case where __int128 type is supported by the host target but
not by a device target (e.g. spirv*). Clang emits an error message for
unsupported type even if the device code does not use it. This patch
fixes this issue by emitting the error message when the device code
attempts to use the unsupported type.
Details
Details
- Reviewers
rsmith jdoerfert tra - Commits
- rGc99b2c63169d: CUDA/HIP: Allow __int128 on the host side
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM. This could be useful for other types.
E.g. long double is technically not supported by NVPTX. We current demote it to double, so host-side does not cause errors, but ideally it should be treated similar to what you propose for i128 here.
clang/lib/Sema/Sema.cpp | ||
---|---|---|
1857–1858 | Nit:I'd rephrase it a bit to make it a bit easier to understand (less negations). | |
clang/lib/Sema/SemaType.cpp | ||
1497–1499 | Similarly, here I'd separate the check for i128 support by the target and the compilation mode check. |
Comment Actions
This patch should be ready to land. @tra, could you please commit it to the LLVM for us? Thanks.
Nit:I'd rephrase it a bit to make it a bit easier to understand (less negations).