[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Driver / amdgpu-features.c
blob98383cd53410c75b28777e020f437f39484792cc
1 // RUN: %clang -### -target amdgcn-amd-amdhsa -mcpu=gfx700 -mcode-object-v3 %s 2>&1 | FileCheck --check-prefix=CODE-OBJECT-V3 %s
2 // CODE-OBJECT-V3: warning: argument '-mcode-object-v3' is deprecated, use '-mcode-object-version=3' instead [-Wdeprecated]
3 // CODE-OBJECT-V3: "-mllvm" "--amdhsa-code-object-version=3"
5 // RUN: %clang -### -target amdgcn-amd-amdhsa amdgcn -mcpu=gfx700 -mno-code-object-v3 %s 2>&1 | FileCheck --check-prefix=NO-CODE-OBJECT-V3 %s
6 // NO-CODE-OBJECT-V3: warning: argument '-mno-code-object-v3' is deprecated, use '-mcode-object-version=2' instead [-Wdeprecated]
7 // NO-CODE-OBJECT-V3: "-mllvm" "--amdhsa-code-object-version=2"
9 // RUN: %clang -### -target amdgcn-amd-amdhsa -mcpu=gfx700 -mcode-object-v3 -mno-code-object-v3 -mcode-object-v3 %s 2>&1 | FileCheck --check-prefix=MUL-CODE-OBJECT-V3 %s
10 // MUL-CODE-OBJECT-V3: warning: argument '-mcode-object-v3' is deprecated, use '-mcode-object-version=3' instead [-Wdeprecated]
11 // MUL-CODE-OBJECT-V3: "-mllvm" "--amdhsa-code-object-version=3"
13 // RUN: %clang -### -target amdgcn-amdhsa -mcpu=gfx900:xnack+ %s 2>&1 | FileCheck --check-prefix=XNACK %s
14 // XNACK: "-target-feature" "+xnack"
16 // RUN: %clang -### -target amdgcn-amdpal -mcpu=gfx900:xnack- %s 2>&1 | FileCheck --check-prefix=NO-XNACK %s
17 // NO-XNACK: "-target-feature" "-xnack"
19 // RUN: %clang -### -target amdgcn-mesa3d -mcpu=gfx908:sramecc+ %s 2>&1 | FileCheck --check-prefix=SRAM-ECC %s
20 // SRAM-ECC: "-target-feature" "+sramecc"
22 // RUN: %clang -### -target amdgcn-amdhsa -mcpu=gfx908:sramecc- %s 2>&1 | FileCheck --check-prefix=NO-SRAM-ECC %s
23 // NO-SRAM-ECC: "-target-feature" "-sramecc"
25 // RUN: %clang -### -target amdgcn -mcpu=gfx90A -mtgsplit %s 2>&1 | FileCheck --check-prefix=TGSPLIT %s
26 // RUN: %clang -### -target amdgcn -mcpu=gfx90A -mno-tgsplit %s 2>&1 | FileCheck --check-prefix=NO-TGSPLIT %s
27 // TGSPLIT: "-target-feature" "+tgsplit"
28 // NO-TGSPLIT: "-target-feature" "-tgsplit"
30 // RUN: %clang -### -target amdgcn-amdpal -mcpu=gfx1010 -mwavefrontsize64 %s 2>&1 | FileCheck --check-prefix=WAVE64 %s
31 // RUN: %clang -### -target amdgcn-amdpal -mcpu=gfx1010 -mno-wavefrontsize64 -mwavefrontsize64 %s 2>&1 | FileCheck --check-prefix=WAVE64 %s
32 // WAVE64: "-target-feature" "+wavefrontsize64"
33 // WAVE64-NOT: {{".*wavefrontsize16"}}
34 // WAVE64-NOT: {{".*wavefrontsize32"}}
36 // RUN: %clang -### -target amdgcn -mcpu=gfx1010 -mno-wavefrontsize64 %s 2>&1 | FileCheck --check-prefix=NO-WAVE64 %s
37 // RUN: %clang -### -target amdgcn -mcpu=gfx1010 -mwavefrontsize64 -mno-wavefrontsize64 %s 2>&1 | FileCheck --check-prefix=NO-WAVE64 %s
38 // NO-WAVE64-NOT: {{".*wavefrontsize16"}}
39 // NO-WAVE64-NOT: {{".*wavefrontsize32"}}
40 // NO-WAVE64-NOT: {{".*wavefrontsize64"}}
42 // RUN: %clang -### -target amdgcn -mcpu=gfx1010 -mcumode %s 2>&1 | FileCheck --check-prefix=CUMODE %s
43 // CUMODE: "-target-feature" "+cumode"
45 // RUN: %clang -### -target amdgcn -mcpu=gfx1010 -mno-cumode %s 2>&1 | FileCheck --check-prefix=NO-CUMODE %s
46 // NO-CUMODE: "-target-feature" "-cumode"