clang/test/CodeGenHLSL/builtins/RWBuffer-subscript.hlsl
raw| 1 | // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -emit-llvm -o - -O0 %s | FileCheck %s |
| 2 | |
| 3 | RWBuffer<int> In; |
| 4 | RWBuffer<int> Out; |
| 5 | |
| 6 | [numthreads(1,1,1)] |
| 7 | void main(unsigned GI : SV_GroupIndex) { |
| 8 | Out[GI] = In[GI]; |
| 9 | } |
| 10 | |
| 11 | // Even at -O0 the subscript operators get inlined. The -O0 IR is a bit messy |
| 12 | // and confusing to follow so the match here is pretty weak. |
| 13 | |
| 14 | // CHECK: define internal void @"?main@@YAXI@Z" |
| 15 | // CHECK-NOT: call |
| 16 | // CHECK: ret void |