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;
}
}
|