diff options
| author | Yaxun Liu <Yaxun.Liu@amd.com> | 2017-10-23 17:49:26 +0000 |
|---|---|---|
| committer | Yaxun Liu <Yaxun.Liu@amd.com> | 2017-10-23 17:49:26 +0000 |
| commit | bd3823618da09ecc9cef482aa4a81d5a638c3e2b (patch) | |
| tree | ab3c64630b779bd3049b4fa4d43a265bf477f2ab /clang/test/CodeGenOpenCL/amdgcn-automatic-variable.cl | |
| parent | f651698488ba104b2e4c4d8d5a8f562ef2b2a498 (diff) | |
| download | bcm5719-llvm-bd3823618da09ecc9cef482aa4a81d5a638c3e2b.tar.gz bcm5719-llvm-bd3823618da09ecc9cef482aa4a81d5a638c3e2b.zip | |
CodeGen: Fix invalid bitcast in partial initialization of automatic arrary variable
Differential Revision: https://reviews.llvm.org/D39184
llvm-svn: 316353
Diffstat (limited to 'clang/test/CodeGenOpenCL/amdgcn-automatic-variable.cl')
| -rw-r--r-- | clang/test/CodeGenOpenCL/amdgcn-automatic-variable.cl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/CodeGenOpenCL/amdgcn-automatic-variable.cl b/clang/test/CodeGenOpenCL/amdgcn-automatic-variable.cl index 19287c7d899..fefe1c4a41d 100644 --- a/clang/test/CodeGenOpenCL/amdgcn-automatic-variable.cl +++ b/clang/test/CodeGenOpenCL/amdgcn-automatic-variable.cl @@ -58,3 +58,11 @@ void func2(void) { const int lvc = 4; lv1 = lvc; } + +// CHECK-LABEL: define void @func3() +// CHECK: %a = alloca [16 x [1 x float]], align 4, addrspace(5) +// CHECK: %[[CAST:.+]] = bitcast [16 x [1 x float]] addrspace(5)* %a to i8 addrspace(5)* +// CHECK: call void @llvm.memset.p5i8.i64(i8 addrspace(5)* %[[CAST]], i8 0, i64 64, i32 4, i1 false) +void func3(void) { + float a[16][1] = {{0.}}; +} |

