[PATCH] D26476: [AMDGPU] Add support for f16 builtin functions for VI+

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 11 10:10:08 PST 2016


arsenm added inline comments.


================
Comment at: test/CodeGenOpenCL/builtins-amdgcn-error-f16-class.cl:1-9
+// REQUIRES: amdgpu-registered-target
+// RUN: %clang_cc1 -triple amdgcn-unknown-amdhsa -target-cpu tahiti -verify -S -o - %s
+
+#pragma OPENCL EXTENSION cl_khr_fp16 : enable
+
+void test_class_f16(global half* out, half a, int b)
+{
----------------
kzhuravl wrote:
> arsenm wrote:
> > These tests can all be in the same file 
> The problem is if I put them into the same file only the first function gives the error `'__builtin_amdgcn_*h' needs target feature 16-bit-insts` and I did not have time to investigate why, but I was planning to do it once I finish something else.
> 
> Would leaving them in the separate files be acceptable short-term?
I think putting all of the half instructions in one file is fine with an f16-less target, you don't need one for each individual error. 

Also target-cpu tahiti + amdhsa doesn't make sense, one or the other should be changed


https://reviews.llvm.org/D26476





More information about the cfe-commits mailing list