summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/inline-asm-validate-amdgpu.cl
blob: d60b09e0ce9dd712a12678405c0d07bbf1c2f52a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// REQUIRES: amdgpu-registered-target
// RUN: %clang_cc1 -x cl -triple amdgcn -fsyntax-only  %s
// expected-no-diagnostics

kernel void test () {

  int sgpr = 0, vgpr = 0, imm = 0;

  // sgpr constraints
  __asm__ ("s_mov_b32 %0, %1" : "=s" (sgpr) : "s" (imm) : );

  // vgpr constraints
  __asm__ ("v_mov_b32 %0, %1" : "=v" (vgpr) : "v" (imm) : );
}
OpenPOWER on IntegriCloud