Files
UnrealEngine/Engine/Source/ThirdParty/Intel/ISPC/ispc-1.21.0/tests/lit-tests/ind-var-simplify-xe.ispc
2025-05-18 13:04:45 +08:00

17 lines
514 B
Plaintext

// This test checks that induction variables are not canonicalized or widened on GPU.
// RUN: %{ispc} %s --nostdlib --emit-llvm-text --target=xehpg-x8 --arch=xe64 -o - | FileCheck %s
// REQUIRES: XE_ENABLED
// CHECK-LABEL: for_test:
// CHECK: %i{{.*}} = phi i32
// CHECK: %add{{.*}} = add{{.*}} i32 %i{{.*}}
task void widen(uniform float A[], uniform int64 Num, uniform int64 N) {
uniform float result = 0;
for (uniform int i = 0; i < Num; i += N) {
result += A[i];
}
}