File: sub_group_mask.cl

package info (click to toggle)
spirv-llvm-translator-14 14.0.17-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 15,700 kB
  • sloc: cpp: 47,811; lisp: 3,704; sh: 153; python: 43; makefile: 41
file content (17 lines) | stat: -rw-r--r-- 632 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// RUN: %clang_cc1 %s -triple spir -cl-std=CL2.0 -fdeclare-opencl-builtins -finclude-default-header -emit-llvm-bc -o %t.bc

// RUN: llvm-spirv %t.bc -o %t.spv
// RUN: spirv-val %t.spv
// RUN: llvm-spirv %t.spv -to-text -o - | FileCheck %s --check-prefix=CHECK-SPIRV
// RUN: llvm-spirv %t.spv -r -o - | llvm-dis -o - | FileCheck %s --check-prefix=CHECK-LLVM

// CHECK-SPIRV: Capability GroupNonUniformBallot
// CHECK-SPIRV: Decorate {{[0-9]+}} BuiltIn 4418

// CHECK-LLVM: test_mask
// CHECK-LLVM: call spir_func <4 x i32> @_Z21get_sub_group_gt_maskv()

kernel void test_mask(global uint4 *out)
{
  *out = get_sub_group_gt_mask();
}