Files
UnrealEngine/Engine/Source/ThirdParty/Intel/ISPC/ispc-1.24.0/tests/lit-tests/blend-curves-loop.ispc
Brandyn / Techy fcc1b09210 init
2026-04-04 15:40:51 -05:00

20 lines
628 B
Plaintext

// RUN: %{ispc} --target=host --nowrap --nostdlib -O2 --emit-llvm-text %s -o - | FileCheck %s
// CHECK-LABEL: @foo(
// CHECK: foreach_full_body.lr.ph:
// CHECK: br i1 [[TMP:%.*]], label %[[FOREACH_SPLIT_US:.*]], label %[[FOREACH_SPLIT:.*]]
// CHECK: [[FOREACH_SPLIT_US]]:
// CHECK: [[FOREACH_SPLIT]]:
// CHECK: foreach_reset:
export void foo(const uniform uint32 input[], uniform uint32 output[],
const uniform int index, const uniform int n)
{
foreach (i = 0 ... n) {
if (index == 0) {
output[i] = input[i];
} else {
output[i] |= input[i];
}
}
}