llvm-capstone/clang/test/CodeGenHLSL/group_shared.hlsl
Xiang Li 7e04c0ad63 [HLSL] Add groupshare address space.
Added keyword, LangAS and TypeAttrbute for groupshared.

Tanslate it to LangAS with asHLSLLangAS.

Make sure it translated into address space 3 for DirectX target.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D135060
2022-10-20 09:29:09 -07:00

16 lines
382 B
HLSL

// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
// RUN: dxil-pc-shadermodel6.3-library %s \
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s
// Make sure groupshared translated into address space 3.
// CHECK:@"?a@@3PAMA" = addrspace(3) global [10 x float]
groupshared float a[10];
[numthreads(8,8,1)]
void main() {
a[0] = 1;
}