llvm-project/clang/test/SemaSYCL
Jennifer Yu f8d5b49c78 Fix missing error for use of 128-bit integer inside SPIR64 device code.
Emit error for use of 128-bit integer inside device code had been
already implemented in https://reviews.llvm.org/D74387.  However,
the error is not emitted for SPIR64, because for SPIR64, hasInt128Type
return true.

hasInt128Type: is also used to control generation of certain 128-bit
predefined macros, initializer predefined 128-bit integer types and
build 128-bit ArithmeticTypes.  Except predefined macros, only the
device target is considered, since error only emit when 128-bit
integer is used inside device code, the host target (auxtarget) also
needs to be considered.

The change address:
1. (SPIR.h) Correct hasInt128Type() for SPIR targets.
2. Sema.cpp and SemaOverload.cpp: Add additional check to consider host
   target(auxtarget) when call to hasInt128Type.  So that __int128_t
   and __int128() are allowed to avoid error when they used outside
   device code.
3. SemaType.cpp: add check for SYCLIsDevice to delay the error message.
   The error will be emitted if the use of 128-bit integer in the device
   code.

   Reviewed By: Johannes Doerfert and Aaron Ballman

   Differential Revision: https://reviews.llvm.org/D92439
2020-12-07 10:42:32 -08:00
..
float128.cpp [OpenMP][SYCL] Improve diagnosing of unsupported types usage 2020-05-29 18:00:48 +03:00
int128.cpp Fix missing error for use of 128-bit integer inside SPIR64 device code. 2020-12-07 10:42:32 -08:00
kernel-attribute-on-non-sycl.cpp
kernel-attribute.cpp [SYCL] Driver option to select SYCL version 2020-03-07 18:28:54 +03:00
prohibit-thread-local.cpp [SYCL][OpenMP] Implement thread-local storage restriction 2020-06-17 14:36:00 +03:00