diff options
author | Artem Belevich <tra@google.com> | 2015-09-28 22:54:08 +0000 |
---|---|---|
committer | Artem Belevich <tra@google.com> | 2015-09-28 22:54:08 +0000 |
commit | 757da432107d7c06a337f0984acf60d4bccec08d (patch) | |
tree | 5f9bf894788c41077f8ffe99cfd3c9e6d5445a0a /test/CodeGen/builtins-nvptx.c | |
parent | bfa22743ff0f050462c38d3e9d1b575563300133 (diff) | |
download | clang-757da432107d7c06a337f0984acf60d4bccec08d.tar.gz |
[CUDA] 32-bit NVPTX should have 32-bit long type.
Currently it's 64-bit which will lead to mismatch between host and
device code if we compile for i386.
Differential Revision: http://reviews.llvm.org/D13181
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248753 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/builtins-nvptx.c')
-rw-r--r-- | test/CodeGen/builtins-nvptx.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/CodeGen/builtins-nvptx.c b/test/CodeGen/builtins-nvptx.c index 498da476d1..d1abb9c950 100644 --- a/test/CodeGen/builtins-nvptx.c +++ b/test/CodeGen/builtins-nvptx.c @@ -109,16 +109,15 @@ __device__ int read_lanemasks() { } -__device__ long read_clocks() { +__device__ long long read_clocks() { // CHECK: call i32 @llvm.ptx.read.clock() // CHECK: call i64 @llvm.ptx.read.clock64() int a = __builtin_ptx_read_clock(); - long b = __builtin_ptx_read_clock64(); - - return (long)a + b; + long long b = __builtin_ptx_read_clock64(); + return a + b; } __device__ int read_pms() { |