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
139 lines
3.4 KiB
C++
139 lines
3.4 KiB
C++
// RUN: %clang_cc1 -emit-llvm -o - %s -triple x86_64-linux | FileCheck %s
|
|
|
|
struct A {
|
|
A();
|
|
A(const A &);
|
|
~A();
|
|
operator bool();
|
|
void *data;
|
|
};
|
|
|
|
A make();
|
|
bool cond();
|
|
void f(int);
|
|
|
|
// PR49585: Ensure that 'continue' performs the proper cleanups in the presence
|
|
// of a for loop condition variable.
|
|
//
|
|
// CHECK: define {{.*}} void @_Z7PR49585v(
|
|
void PR49585() {
|
|
for (
|
|
// CHECK: call void @_Z1fi(i32 noundef 1)
|
|
// CHECK: br label %[[for_cond:.*]]
|
|
f(1);
|
|
|
|
// CHECK: [[for_cond]]:
|
|
// CHECK: call {{.*}} @_Z4makev(
|
|
// CHECK: call {{.*}} @_ZN1AcvbEv(
|
|
// CHECK: br i1 {{.*}}, label %[[for_body:.*]], label %[[for_cond_cleanup:.*]]
|
|
A a = make();
|
|
|
|
// CHECK: [[for_cond_cleanup]]:
|
|
// CHECK: store
|
|
// CHECK: br label %[[cleanup:.*]]
|
|
|
|
f(2)) {
|
|
// CHECK: [[for_body]]:
|
|
// CHECK: call {{.*}} @_Z4condv(
|
|
// CHECK: br i1 {{.*}}, label %[[if_then:.*]], label %[[if_end:.*]]
|
|
if (cond()) {
|
|
// CHECK: [[if_then]]:
|
|
// CHECK: call {{.*}} @_Z1fi(i32 noundef 3)
|
|
// CHECK: br label %[[for_inc:.*]]
|
|
f(3);
|
|
continue;
|
|
}
|
|
|
|
// CHECK: [[if_end]]:
|
|
// CHECK: call {{.*}} @_Z1fi(i32 noundef 4)
|
|
// CHECK: br label %[[for_inc]]
|
|
f(4);
|
|
}
|
|
|
|
// CHECK: [[for_inc]]:
|
|
// CHECK: call void @_Z1fi(i32 noundef 2)
|
|
// CHECK: store
|
|
// CHECK: br label %[[cleanup]]
|
|
|
|
// CHECK: [[cleanup]]:
|
|
// CHECK: call void @_ZN1AD1Ev(
|
|
// CHECK: load
|
|
// CHECK: switch {{.*}} label
|
|
// CHECK-NEXT: label %[[cleanup_cont:.*]]
|
|
// CHECK-NEXT: label %[[for_end:.*]]
|
|
|
|
// CHECK: [[cleanup_cont]]:
|
|
// CHECK: br label %[[for_cond]]
|
|
|
|
// CHECK [[for_end]]:
|
|
// CHECK: ret void
|
|
}
|
|
|
|
// CHECK: define {{.*}} void @_Z13PR49585_breakv(
|
|
void PR49585_break() {
|
|
for (
|
|
// CHECK: call void @_Z1fi(i32 noundef 1)
|
|
// CHECK: br label %[[for_cond:.*]]
|
|
f(1);
|
|
|
|
// CHECK: [[for_cond]]:
|
|
// CHECK: call {{.*}} @_Z4makev(
|
|
// CHECK: call {{.*}} @_ZN1AcvbEv(
|
|
// CHECK: br i1 {{.*}}, label %[[for_body:.*]], label %[[for_cond_cleanup:.*]]
|
|
A a = make();
|
|
|
|
// CHECK: [[for_cond_cleanup]]:
|
|
// CHECK: store
|
|
// CHECK: br label %[[cleanup:.*]]
|
|
|
|
f(2)) {
|
|
// CHECK: [[for_body]]:
|
|
// CHECK: call {{.*}} @_Z4condv(
|
|
// CHECK: br i1 {{.*}}, label %[[if_then:.*]], label %[[if_end:.*]]
|
|
if (cond()) {
|
|
// CHECK: [[if_then]]:
|
|
// CHECK: call {{.*}} @_Z1fi(i32 noundef 3)
|
|
// CHECK: store
|
|
// CHECK: br label %[[cleanup:.*]]
|
|
f(3);
|
|
break;
|
|
}
|
|
|
|
// CHECK: [[if_end]]:
|
|
// CHECK: call {{.*}} @_Z1fi(i32 noundef 4)
|
|
// CHECK: br label %[[for_inc]]
|
|
f(4);
|
|
}
|
|
|
|
// CHECK: [[for_inc]]:
|
|
// CHECK: call void @_Z1fi(i32 noundef 2)
|
|
// CHECK: store
|
|
// CHECK: br label %[[cleanup]]
|
|
|
|
// CHECK: [[cleanup]]:
|
|
// CHECK: call void @_ZN1AD1Ev(
|
|
// CHECK: load
|
|
// CHECK: switch {{.*}} label
|
|
// CHECK-NEXT: label %[[cleanup_cont:.*]]
|
|
// CHECK-NEXT: label %[[for_end:.*]]
|
|
|
|
// CHECK: [[cleanup_cont]]:
|
|
// CHECK: br label %[[for_cond]]
|
|
|
|
// CHECK [[for_end]]:
|
|
// CHECK: ret void
|
|
}
|
|
|
|
// CHECK: define {{.*}} void @_Z16incless_for_loopv(
|
|
void incless_for_loop() {
|
|
// CHECK: br label %[[for_cond:.*]]
|
|
// CHECK: [[for_cond]]:
|
|
// CHECK: br i1 {{.*}}, label %[[for_body:.*]], label %[[for_end:.*]]
|
|
// CHECK: [[for_body]]:
|
|
// CHECK: br label %[[for_cond]]
|
|
// CHECK: [[for_end]]:
|
|
// CHECK: ret void
|
|
// CHECK: }
|
|
for (; int b = 0;) continue;
|
|
}
|