diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-12-05 18:03:58 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-12-05 18:03:58 +0000 |
commit | dcbb8fe6d53e6737e198954850aaa33cf19bdd1d (patch) | |
tree | 33d64c5e953f9756271d213c71856d910f8d8e72 /test/SemaOpenCL | |
parent | aefc430bcddaa7b89636e54a07e2ac3bbf9eadf3 (diff) |
Workaround attribute ordering issue with kernel only attributes
Placing the attribute after the kernel keyword would incorrectly
reject the attribute, so use the smae workaround that other
kernel only attributes use.
Also add a FIXME because there are two different phrasings now
for the same error, althoug amdgpu_num_[sv]gpr uses a consistent one.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223490 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaOpenCL')
-rw-r--r-- | test/SemaOpenCL/amdgpu-num-register-attrs.cl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/SemaOpenCL/amdgpu-num-register-attrs.cl b/test/SemaOpenCL/amdgpu-num-register-attrs.cl index 0967700d10..ec8f8c072a 100644 --- a/test/SemaOpenCL/amdgpu-num-register-attrs.cl +++ b/test/SemaOpenCL/amdgpu-num-register-attrs.cl @@ -32,3 +32,9 @@ __attribute__((amdgpu_num_vgpr(4294967296))) kernel void foo13() {} // expected- __attribute__((amdgpu_num_sgpr(4294967296))) kernel void foo14() {} // expected-error {{integer constant expression evaluates to value 4294967296 that cannot be represented in a 32-bit unsigned integer type}} __attribute__((amdgpu_num_sgpr(4294967296), amdgpu_num_vgpr(4294967296))) kernel void foo15() {} // expected-error 2 {{integer constant expression evaluates to value 4294967296 that cannot be represented in a 32-bit unsigned integer type}} + + +// Make sure it is accepted with kernel keyword before the attribute. +kernel __attribute__((amdgpu_num_vgpr(40))) void foo16() {} + +kernel __attribute__((amdgpu_num_sgpr(40))) void foo17() {} |