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
95 lines
1.7 KiB
LLVM
95 lines
1.7 KiB
LLVM
;
|
|
; RUN: opt -mtriple amdgcn-- -passes='print<uniformity>' -disable-output %s 2>&1 | FileCheck %s
|
|
;
|
|
;
|
|
; Entry (div.cond)
|
|
; / \
|
|
; B0 B3
|
|
; | |
|
|
; B1 B4
|
|
; | |
|
|
; \ /
|
|
; B5 (phi: divergent)
|
|
; |
|
|
; B6 (div.uni)
|
|
; / \
|
|
; B7 B9
|
|
; | |
|
|
; B8 B10
|
|
; | |
|
|
; \ /
|
|
; B11 (phi: uniform)
|
|
|
|
|
|
; CHECK-LABEL: 'test_ctrl_divergence':
|
|
; CHECK-LABEL: BLOCK Entry
|
|
; CHECK: DIVERGENT: %div.cond = icmp eq i32 %tid, 0
|
|
; CHECK: DIVERGENT: br i1 %div.cond, label %B3, label %B0
|
|
;
|
|
; CHECK-LABEL: BLOCK B5
|
|
; CHECK: DIVERGENT: %div_a = phi i32 [ %a0, %B1 ], [ %a1, %B4 ]
|
|
; CHECK: DIVERGENT: %div_b = phi i32 [ %b0, %B1 ], [ %b1, %B4 ]
|
|
;
|
|
; CHECK-LABEL: BLOCK B6
|
|
; CHECK-NOT: DIVERGENT: %uni.cond = icmp
|
|
; CHECK-NOT: DIVERGENT: br i1 %div.cond
|
|
;
|
|
; CHECK-LABEL: BLOCK B11
|
|
; CHECK-NOT: DIVERGENT: %div_d = phi i32
|
|
|
|
|
|
define amdgpu_kernel void @test_ctrl_divergence(i32 %a, i32 %b, i32 %c, i32 %d) {
|
|
Entry:
|
|
%tid = call i32 @llvm.amdgcn.workitem.id.x()
|
|
%div.cond = icmp eq i32 %tid, 0
|
|
br i1 %div.cond, label %B3, label %B0 ; divergent branch
|
|
|
|
B0:
|
|
%a0 = add i32 %a, 1
|
|
br label %B1
|
|
|
|
B1:
|
|
%b0 = add i32 %b, 2
|
|
br label %B5
|
|
|
|
B3:
|
|
%a1 = add i32 %a, 10
|
|
br label %B4
|
|
|
|
B4:
|
|
%b1 = add i32 %b, 20
|
|
br label %B5
|
|
|
|
B5:
|
|
%div_a = phi i32 [%a0, %B1], [%a1, %B4]
|
|
%div_b = phi i32 [%b0, %B1], [%b1, %B4]
|
|
br label %B6
|
|
|
|
B6:
|
|
%uni.cond = icmp eq i32 %c, 0
|
|
br i1 %uni.cond, label %B7, label %B9
|
|
|
|
B7:
|
|
%d1 = add i32 %d, 1
|
|
br label %B8
|
|
|
|
B8:
|
|
br label %B11
|
|
|
|
B9:
|
|
%d2 = add i32 %d, 3
|
|
br label %B10
|
|
|
|
B10:
|
|
br label %B11
|
|
|
|
B11:
|
|
%div_d = phi i32 [%d1, %B8], [%d2, %B10]
|
|
ret void
|
|
}
|
|
|
|
|
|
declare i32 @llvm.amdgcn.workitem.id.x() #0
|
|
|
|
attributes #0 = {nounwind readnone }
|