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
76 lines
2.7 KiB
LLVM
76 lines
2.7 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: opt -S -mtriple=amdgcn-- -passes=structurizecfg %s | FileCheck -check-prefix=OPT %s
|
|
|
|
define amdgpu_ps i32 @if_else(i32 %0) {
|
|
; OPT-LABEL: define amdgpu_ps i32 @if_else(
|
|
; OPT-SAME: i32 [[TMP0:%.*]]) {
|
|
; OPT-NEXT: [[C:%.*]] = icmp ne i32 [[TMP0]], 0
|
|
; OPT-NEXT: br i1 [[C]], label %[[FALSE:.*]], label %[[FLOW:.*]], !prof [[PROF0:![0-9]+]]
|
|
; OPT: [[FLOW]]:
|
|
; OPT-NEXT: [[TMP2:%.*]] = phi i1 [ false, %[[FALSE]] ], [ true, [[TMP1:%.*]] ]
|
|
; OPT-NEXT: br i1 [[TMP2]], label %[[TRUE:.*]], label %[[EXIT:.*]]
|
|
; OPT: [[TRUE]]:
|
|
; OPT-NEXT: br label %[[EXIT]]
|
|
; OPT: [[FALSE]]:
|
|
; OPT-NEXT: br label %[[FLOW]]
|
|
; OPT: [[EXIT]]:
|
|
; OPT-NEXT: [[RET:%.*]] = phi i32 [ 33, %[[FLOW]] ], [ 42, %[[TRUE]] ]
|
|
; OPT-NEXT: ret i32 [[RET]]
|
|
;
|
|
%c = icmp eq i32 %0, 0
|
|
br i1 %c, label %true, label %false, !prof !0
|
|
|
|
true: ; preds = %1
|
|
br label %exit
|
|
|
|
false: ; preds = %1
|
|
br label %exit
|
|
|
|
exit: ; preds = %false, %true
|
|
%ret = phi i32 [ 42, %true ], [ 33, %false ]
|
|
ret i32 %ret
|
|
}
|
|
|
|
define amdgpu_ps void @loop_if_break(i32 %n) {
|
|
; OPT-LABEL: define amdgpu_ps void @loop_if_break(
|
|
; OPT-SAME: i32 [[N:%.*]]) {
|
|
; OPT-NEXT: [[ENTRY:.*]]:
|
|
; OPT-NEXT: br label %[[LOOP:.*]]
|
|
; OPT: [[LOOP]]:
|
|
; OPT-NEXT: [[I:%.*]] = phi i32 [ [[N]], %[[ENTRY]] ], [ [[TMP0:%.*]], %[[FLOW:.*]] ]
|
|
; OPT-NEXT: [[C:%.*]] = icmp ugt i32 [[I]], 0
|
|
; OPT-NEXT: br i1 [[C]], label %[[LOOP_BODY:.*]], label %[[FLOW]], !prof [[PROF1:![0-9]+]]
|
|
; OPT: [[LOOP_BODY]]:
|
|
; OPT-NEXT: [[I_NEXT:%.*]] = sub i32 [[I]], 1
|
|
; OPT-NEXT: br label %[[FLOW]]
|
|
; OPT: [[FLOW]]:
|
|
; OPT-NEXT: [[TMP0]] = phi i32 [ [[I_NEXT]], %[[LOOP_BODY]] ], [ poison, %[[LOOP]] ]
|
|
; OPT-NEXT: [[TMP1:%.*]] = phi i1 [ false, %[[LOOP_BODY]] ], [ true, %[[LOOP]] ]
|
|
; OPT-NEXT: br i1 [[TMP1]], label %[[EXIT:.*]], label %[[LOOP]]
|
|
; OPT: [[EXIT]]:
|
|
; OPT-NEXT: ret void
|
|
;
|
|
entry:
|
|
br label %loop
|
|
|
|
loop: ; preds = %loop_body, %entry
|
|
%i = phi i32 [ %n, %entry ], [ %i.next, %loop_body ]
|
|
%c = icmp ugt i32 %i, 0
|
|
br i1 %c, label %loop_body, label %exit, !prof !0
|
|
|
|
loop_body: ; preds = %loop
|
|
%i.next = sub i32 %i, 1
|
|
br label %loop
|
|
|
|
exit: ; preds = %loop
|
|
ret void
|
|
}
|
|
|
|
attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
|
|
|
|
!0 = !{!"branch_weights", i32 1000, i32 1}
|
|
;.
|
|
; OPT: [[PROF0]] = !{!"branch_weights", i32 1, i32 1000}
|
|
; OPT: [[PROF1]] = !{!"branch_weights", i32 1000, i32 1}
|
|
;.
|