diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2012-08-28 20:37:50 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2012-08-28 20:37:50 +0000 |
commit | c0c00664887f5d99780c9b3e33e2f204712823b7 (patch) | |
tree | 6553c141b716313da2779a50d15b7aba50a84de3 /test/CodeGenCUDA | |
parent | 1aba7783ad8fe326f10f5aa494721db23bdd593e (diff) |
CUDA: give static storage class to __shared__ and __constant__
variables without a storage class within a function, to implement
CUDA B.2.5: "__shared__ and __constant__ variables have implied static
storage [duration]."
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162788 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCUDA')
-rw-r--r-- | test/CodeGenCUDA/address-spaces.cu | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGenCUDA/address-spaces.cu b/test/CodeGenCUDA/address-spaces.cu index 15e49205b6..9df7e3f4d2 100644 --- a/test/CodeGenCUDA/address-spaces.cu +++ b/test/CodeGenCUDA/address-spaces.cu @@ -24,5 +24,13 @@ __device__ void foo() { static int li; // CHECK: load i32 addrspace(1)* @_ZZ3foovE2li li++; + + __constant__ int lj; + // CHECK: load i32 addrspace(4)* @_ZZ3foovE2lj + lj++; + + __shared__ int lk; + // CHECK: load i32 addrspace(3)* @_ZZ3foovE2lk + lk++; } |