[PATCH] D48188: [SPIR] Prevent SPIR targets from using half conversion intrinsics

Stephen McGroarty via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 14 12:53:30 PDT 2018


smcgro created this revision.
smcgro added reviewers: SjoerdMeijer, rsmith.
Herald added a subscriber: cfe-commits.

The SPIR target currently allows for half precision floating point types to use the LLVM intrinsic functions to convert to floats and doubles. This is illegal in SPIR as the only intrinsic allowed by SPIR is memcpy, as per section 3 of the SPIR specification. This lead to an assert being hit when attempting to use a constant or literal _Float16 type in a comparison operation on a SPIR or SPIR64 target. This patch prevents SPIR targets from using these intrinsics and marks SPIR targets as having a legal half type.


Repository:
  rC Clang

https://reviews.llvm.org/D48188

Files:
  lib/Basic/Targets/SPIR.h
  test/CodeGen/spir-half-type.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48188.151403.patch
Type: text/x-patch
Size: 6041 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180614/3ebf5a21/attachment.bin>


More information about the cfe-commits mailing list