CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
131 lines
5.3 KiB
HLSL
131 lines
5.3 KiB
HLSL
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
|
|
// RUN: spirv-pc-vulkan-library %s -emit-llvm -disable-llvm-passes -o - | FileCheck %s
|
|
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
|
|
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes -o - | FileCheck %s
|
|
|
|
bool cond();
|
|
bool cond2();
|
|
void foo();
|
|
|
|
void test1() {
|
|
for (;;) {
|
|
foo();
|
|
}
|
|
}
|
|
// CHECK-LABEL: define hidden{{.*}} void @_Z5test1v()
|
|
// CHECK-SAME: [[A0:#[0-9]+]] {
|
|
// CHECK: entry:
|
|
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
|
// CHECK: for.cond:
|
|
// CHECK: [[T1:%[0-9]+]] = call token @llvm.experimental.convergence.loop() [ "convergencectrl"(token [[T0]]) ]
|
|
// CHECK: call{{.*}} void @_Z3foov() [[A3:#[0-9]+]] [ "convergencectrl"(token [[T1]]) ]
|
|
|
|
void test2() {
|
|
for (;cond();) {
|
|
foo();
|
|
}
|
|
}
|
|
// CHECK-LABEL: define hidden{{.*}} void @_Z5test2v()
|
|
// CHECK-SAME: [[A0]] {
|
|
// CHECK: entry:
|
|
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
|
// CHECK: for.cond:
|
|
// CHECK: [[T1:%[0-9]+]] = call token @llvm.experimental.convergence.loop() [ "convergencectrl"(token [[T0]]) ]
|
|
// CHECK: call{{.*}} noundef i1 @_Z4condv() [[A3]] [ "convergencectrl"(token [[T1]]) ]
|
|
// CHECK: for.body:
|
|
// CHECK: call{{.*}} void @_Z3foov() [[A3]] [ "convergencectrl"(token [[T1]]) ]
|
|
|
|
void test3() {
|
|
for (cond();;) {
|
|
foo();
|
|
}
|
|
}
|
|
// CHECK-LABEL: define hidden{{.*}} void @_Z5test3v()
|
|
// CHECK-SAME: [[A0]] {
|
|
// CHECK: entry:
|
|
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
|
// CHECK: call{{.*}} noundef i1 @_Z4condv() [[A3]] [ "convergencectrl"(token [[T0]]) ]
|
|
// CHECK: for.cond:
|
|
// CHECK: [[T1:%[0-9]+]] = call token @llvm.experimental.convergence.loop() [ "convergencectrl"(token [[T0]]) ]
|
|
// CHECK: call{{.*}} void @_Z3foov() [[A3]] [ "convergencectrl"(token [[T1]]) ]
|
|
|
|
void test4() {
|
|
for (cond();cond2();) {
|
|
foo();
|
|
}
|
|
}
|
|
// CHECK-LABEL: define hidden{{.*}} void @_Z5test4v()
|
|
// CHECK-SAME: [[A0]] {
|
|
// CHECK: entry:
|
|
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
|
// CHECK: call{{.*}} noundef i1 @_Z4condv() [[A3]] [ "convergencectrl"(token [[T0]]) ]
|
|
// CHECK: for.cond:
|
|
// CHECK: [[T1:%[0-9]+]] = call token @llvm.experimental.convergence.loop() [ "convergencectrl"(token [[T0]]) ]
|
|
// CHECK: call{{.*}} noundef i1 @_Z5cond2v() [[A3]] [ "convergencectrl"(token [[T1]]) ]
|
|
// CHECK: for.body:
|
|
// CHECK: call{{.*}} void @_Z3foov() [[A3]] [ "convergencectrl"(token [[T1]]) ]
|
|
|
|
void test5() {
|
|
for (cond();cond2();foo()) {
|
|
}
|
|
}
|
|
// CHECK-LABEL: define hidden{{.*}} void @_Z5test5v()
|
|
// CHECK-SAME: [[A0]] {
|
|
// CHECK: entry:
|
|
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
|
// CHECK: call{{.*}} noundef i1 @_Z4condv() [[A3]] [ "convergencectrl"(token [[T0]]) ]
|
|
// CHECK: for.cond:
|
|
// CHECK: [[T1:%[0-9]+]] = call token @llvm.experimental.convergence.loop() [ "convergencectrl"(token [[T0]]) ]
|
|
// CHECK: call{{.*}} noundef i1 @_Z5cond2v() [[A3]] [ "convergencectrl"(token [[T1]]) ]
|
|
// CHECK: for.inc:
|
|
// CHECK: call{{.*}} void @_Z3foov() [[A3]] [ "convergencectrl"(token [[T1]]) ]
|
|
|
|
void test6() {
|
|
for (cond();cond2();foo()) {
|
|
if (cond()) {
|
|
foo();
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
// CHECK-LABEL: define hidden{{.*}} void @_Z5test6v()
|
|
// CHECK-SAME: [[A0]] {
|
|
// CHECK: entry:
|
|
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
|
// CHECK: call{{.*}} noundef i1 @_Z4condv() [[A3]] [ "convergencectrl"(token [[T0]]) ]
|
|
// CHECK: for.cond:
|
|
// CHECK: [[T1:%[0-9]+]] = call token @llvm.experimental.convergence.loop() [ "convergencectrl"(token [[T0]]) ]
|
|
// CHECK: call{{.*}} noundef i1 @_Z5cond2v() [[A3]] [ "convergencectrl"(token [[T1]]) ]
|
|
// CHECK: for.body:
|
|
// CHECK: [[C1:%[a-zA-Z0-9]+]] = call{{.*}} noundef i1 @_Z4condv() [[A3]] [ "convergencectrl"(token [[T1]]) ]
|
|
// CHECK: br i1 [[C1]], label %if.then, label %if.end
|
|
// CHECK: if.then:
|
|
// CHECK: call{{.*}} void @_Z3foov() [[A3]] [ "convergencectrl"(token [[T1]]) ]
|
|
// CHECK: br label %for.end
|
|
// CHECK: if.end:
|
|
// CHECK: br label %for.inc
|
|
// CHECK: for.inc:
|
|
// CHECK: call{{.*}} void @_Z3foov() [[A3]] [ "convergencectrl"(token [[T1]]) ]
|
|
|
|
void test7() {
|
|
for (cond();;) {
|
|
for (cond();;) {
|
|
foo();
|
|
}
|
|
}
|
|
}
|
|
// CHECK-LABEL: define hidden{{.*}} void @_Z5test7v()
|
|
// CHECK-SAME: [[A0]] {
|
|
// CHECK: entry:
|
|
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
|
// CHECK: call{{.*}} noundef i1 @_Z4condv() [[A3]] [ "convergencectrl"(token [[T0]]) ]
|
|
// CHECK: for.cond:
|
|
// CHECK: [[T1:%[0-9]+]] = call token @llvm.experimental.convergence.loop() [ "convergencectrl"(token [[T0]]) ]
|
|
// CHECK: call{{.*}} noundef i1 @_Z4condv() [[A3]] [ "convergencectrl"(token [[T1]]) ]
|
|
// CHECK: for.cond3:
|
|
// CHECK: [[T2:%[0-9]+]] = call token @llvm.experimental.convergence.loop() [ "convergencectrl"(token [[T1]]) ]
|
|
// CHECK: call{{.*}} void @_Z3foov() [[A3]] [ "convergencectrl"(token [[T2]]) ]
|
|
|
|
// CHECK-DAG: attributes [[A0]] = { {{.*}}convergent{{.*}} }
|
|
// CHECK-DAG: attributes [[A3]] = { {{.*}}convergent{{.*}} }
|