File: 1609.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 (32 lines) | stat: -rw-r--r-- 1,075 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//; RUN: %{ispc} %s --target=avx512skx-x16 --emit-asm -o - | FileCheck %s -check-prefix=CHECK_AVX512skx16
//; RUN: %{ispc} %s --target=avx512skx-x8 --emit-asm -o - | FileCheck %s --implicit-check-not "vptestnmw" -check-prefix=CHECK_AVX512skx8
// REQUIRES: X86_ENABLED
void while_loop_test(uniform float cmp[], uniform float vout[], uniform int count) {
    foreach (index = 0 ... count) {
        varying float c = cmp[index];
// Might have to revisit instructions being checked for.

// CHECK_AVX512skx16: vcmp
// CHECK_AVX512skx16-NEXT: kortestw
// CHECK_AVX512skx16: vcmp
// CHECK_AVX512skx16-NEXT: kortestw
// CHECK_AVX512skx16:vcmp
// CHECK_AVX512skx16-NEXT: kortestw
// CHECK_AVX512skx16: vcmp
// CHECK_AVX512skx16-NEXT: kortestw

// CHECK_AVX512skx8: vcmp
// CHECK_AVX512skx8-NEXT: kortestb
// CHECK_AVX512skx8: vcmp
// CHECK_AVX512skx8-NEXT: kortestb
// CHECK_AVX512skx8:vcmp
// CHECK_AVX512skx8-NEXT: kortestb
// CHECK_AVX512skx8: vcmp
// CHECK_AVX512skx8-NEXT: kortestb
        while (c > 1.0) {
            c = c - 1.0;
        }

        vout[index] = c;
    }
}