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
80 lines
2.3 KiB
LLVM
80 lines
2.3 KiB
LLVM
; RUN: opt -passes=strip-convergence-intrinsics -S < %s | FileCheck %s
|
|
|
|
; Verify that convergence intrinsics and convergencectrl operand bundles are
|
|
; stripped by the pass.
|
|
|
|
define void @entry_and_call() convergent {
|
|
; CHECK-LABEL: define void @entry_and_call()
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: call void @convergent_callee()
|
|
; CHECK-NOT: convergence
|
|
; CHECK-NEXT: ret void
|
|
entry:
|
|
%0 = call token @llvm.experimental.convergence.entry()
|
|
call void @convergent_callee() [ "convergencectrl"(token %0) ]
|
|
ret void
|
|
}
|
|
|
|
define void @loop_with_token() convergent {
|
|
; CHECK-LABEL: define void @loop_with_token()
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: br label %loop
|
|
; CHECK: loop:
|
|
; CHECK-NEXT: call void @convergent_callee()
|
|
; CHECK-NOT: convergence
|
|
; CHECK-NEXT: br i1
|
|
entry:
|
|
%0 = call token @llvm.experimental.convergence.entry()
|
|
br label %loop
|
|
|
|
loop:
|
|
%1 = call token @llvm.experimental.convergence.loop() [ "convergencectrl"(token %0) ]
|
|
call void @convergent_callee() [ "convergencectrl"(token %1) ]
|
|
br i1 true, label %exit, label %loop
|
|
|
|
exit:
|
|
ret void
|
|
}
|
|
|
|
define void @anchor_token() convergent {
|
|
; CHECK-LABEL: define void @anchor_token()
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: call void @convergent_callee()
|
|
; CHECK-NOT: convergence
|
|
; CHECK-NEXT: ret void
|
|
entry:
|
|
%0 = call token @llvm.experimental.convergence.anchor()
|
|
call void @convergent_callee() [ "convergencectrl"(token %0) ]
|
|
ret void
|
|
}
|
|
|
|
; This ensures that when the use of a token is defined before the call that
|
|
; creates the token, we are still able to strip them as expected.
|
|
define void @reversed_block_order() convergent {
|
|
; CHECK-LABEL: define void @reversed_block_order()
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: br label %[[B:.*]]
|
|
; CHECK: [[A:.*]]:
|
|
; CHECK-NEXT: call void @convergent_callee()
|
|
; CHECK-NEXT: ret void
|
|
; CHECK: [[B]]:
|
|
; CHECK-NEXT: br label %[[A]]
|
|
entry:
|
|
br label %B
|
|
A:
|
|
call void @convergent_callee() [ "convergencectrl"(token %tok) ]
|
|
ret void
|
|
B:
|
|
%tok = call token @llvm.experimental.convergence.anchor()
|
|
br label %A
|
|
}
|
|
|
|
; Declarations may remain but should have no uses in function bodies.
|
|
; CHECK-LABEL: declare void @convergent_callee
|
|
|
|
declare void @convergent_callee() convergent
|
|
|
|
declare token @llvm.experimental.convergence.entry()
|
|
declare token @llvm.experimental.convergence.loop()
|
|
declare token @llvm.experimental.convergence.anchor()
|