llvm-project/clang/lib/Basic/Targets
Sjoerd Meijer 5c4c998a54 [SPIR] Prevent SPIR targets from using half conversion intrinsics
The SPIR target currently allows for half precision floating point types to be
emitted using the LLVM intrinsic functions which convert half types to floats
and doubles. However, this is illegal in SPIR as the only intrinsic allowed by
SPIR is memcpy, as per section 3 of the SPIR specification. Currently this is
leading to an assert being hit in the Clang CodeGen when attempting to emit a
constant or literal _Float16 type in a comparison operation on a SPIR or SPIR64
target. This assert stems from the CodeGen attempting to emit a constant half
value as an integer because the backend has specified that it is using these
half conversion intrinsics (which represents half as i16). This patch prevents
SPIR targets from using these intrinsics by overloading the responsible target
info method, marks SPIR targets as having a legal half type and provides
additional regression testing for the _Float16 type on SPIR targets.

Patch by: Stephen McGroarty

Differential Revision: https://reviews.llvm.org/D48188

llvm-svn: 335111
2018-06-20 09:49:40 +00:00
..
AArch64.cpp [AAch64] Add the __ARM_FEATURE_DOTPROD macro definition 2018-04-17 22:38:40 +00:00
AArch64.h [Targets] Implement getConstraintRegister for ARM and AArch64 2018-04-30 09:11:08 +00:00
AMDGPU.cpp AMDGPU: Add Vega12 and Vega20 2018-04-30 19:08:27 +00:00
AMDGPU.h Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
ARM.cpp [ARM] Add __ARM_FEATURE_DOTPROD pre-defined macro 2018-04-27 13:56:02 +00:00
ARM.h [Targets] Implement getConstraintRegister for ARM and AArch64 2018-04-30 09:11:08 +00:00
AVR.cpp Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
AVR.h [AVR] Set the program address space in the data layout 2018-02-19 10:46:16 +00:00
BPF.cpp Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
BPF.h bpf: recognize target specific option -mattr=dwarfris in clang 2018-06-15 15:53:31 +00:00
Hexagon.cpp [Hexagon] Remove -mhvx-double and the corresponding subtarget feature 2018-04-03 15:59:10 +00:00
Hexagon.h Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
Lanai.cpp Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
Lanai.h Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
Le64.cpp
Le64.h
MSP430.cpp
MSP430.h
Mips.cpp Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
Mips.h [RISCV] Enable __int128_t and __uint128_t through clang flag 2018-02-25 03:58:23 +00:00
NVPTX.cpp [CUDA] Added -f[no-]cuda-short-ptr option 2018-05-09 23:10:09 +00:00
NVPTX.h [NVPTX] Removed 'satom' feature which is no longer used. 2018-04-11 17:51:33 +00:00
Nios2.cpp
Nios2.h Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
OSTargets.cpp Toolchain: Normalize dwarf, sjlj and seh eh 2017-11-29 07:25:12 +00:00
OSTargets.h Revert r333791 "Cap "voluntary" vector alignment at 16 for all Darwin platforms." 2018-06-04 21:39:20 +00:00
PNaCl.cpp
PNaCl.h
PPC.cpp [PowerPC] The __float128 type should only be available on Power9 2018-06-13 16:05:05 +00:00
PPC.h [Basic] Fix -Wreorder warning 2018-06-13 16:45:12 +00:00
RISCV.cpp [PATCH] [RISCV] Extend getTargetDefines for RISCVTargetInfo 2018-04-05 12:54:00 +00:00
RISCV.h [PATCH] [RISCV] Extend getTargetDefines for RISCVTargetInfo 2018-04-05 12:54:00 +00:00
SPIR.cpp
SPIR.h [SPIR] Prevent SPIR targets from using half conversion intrinsics 2018-06-20 09:49:40 +00:00
Sparc.cpp [Sparc] Add floating-point register names 2018-05-30 06:02:18 +00:00
Sparc.h Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
SystemZ.cpp Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
SystemZ.h Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
TCE.cpp
TCE.h [OpenCL] Add LangAS::opencl_private to represent private address space in AST 2017-10-13 03:37:48 +00:00
WebAssembly.cpp [WebAssembly] Add exception handling option 2018-03-02 00:39:16 +00:00
WebAssembly.h [WebAssembly] Add exception handling option 2018-03-02 00:39:16 +00:00
X86.cpp [x86] invpcid intrinsic 2018-05-25 06:34:42 +00:00
X86.h Revert r333791 "Cap "voluntary" vector alignment at 16 for all Darwin platforms." 2018-06-04 21:39:20 +00:00
XCore.cpp
XCore.h