File: reduce_equal_no_branches.ispc

package info (click to toggle)
ispc 1.28.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 97,620 kB
  • sloc: cpp: 77,067; python: 8,303; yacc: 3,337; lex: 1,126; ansic: 631; sh: 475; makefile: 17
file content (17 lines) | stat: -rw-r--r-- 741 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Check that reduce_equal implementation has no additional conditional branches for avx512 targets

// RUN: %{ispc} %s --target=avx512skx-x4 --nowrap --emit-asm -o - | FileCheck %s
// RUN: %{ispc} %s --target=avx512skx-x8 --nowrap --emit-asm -o - | FileCheck %s
// RUN: %{ispc} %s --target=avx512skx-x16 --nowrap --emit-asm -o - | FileCheck %s
// RUN: %{ispc} %s --target=avx512skx-x32 --nowrap --emit-asm -o - | FileCheck %s
// RUN: %{ispc} %s --target=avx512skx-x64 --nowrap --emit-asm -o - | FileCheck %s

// REQUIRES: X86_ENABLED && !MACOS_HOST

// CHECK-LABEL: test_reduce_equal___vyi
// CHECK-NOT: j{{[a-z]}}
// CHECK: ret
uniform bool test_reduce_equal(int32 val) {
    uniform int32 result;
    return reduce_equal(val, &result);
}