Files
TheRock/compiler/amd-llvm/llvm/test/Transforms/Util/control-flow-hub-finalize-same-succ-crash.ll
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

107 lines
3.2 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
; RUN: opt -S -passes=fix-irreducible %s | FileCheck %s
declare void @foo()
define void @bar(i32 %0) {
; CHECK-LABEL: define void @bar(
; CHECK-SAME: i32 [[TMP0:%.*]]) {
; CHECK-NEXT: [[ENTRY:.*:]]
; CHECK-NEXT: br label %[[BB_1:.*]]
; CHECK: [[BB_1]]:
; CHECK-NEXT: [[V_0:%.*]] = icmp slt i32 [[TMP0]], 35
; CHECK-NEXT: br i1 [[V_0]], label %[[BB_3:.*]], label %[[BB_2:.*]]
; CHECK: [[BB_2]]:
; CHECK-NEXT: [[V_1:%.*]] = icmp slt i32 [[TMP0]], 47
; CHECK-NEXT: br label %[[IRR_GUARD:.*]]
; CHECK: [[BB_3]]:
; CHECK-NEXT: [[V_2:%.*]] = icmp eq i32 [[TMP0]], 0
; CHECK-NEXT: br label %[[IRR_GUARD]]
; CHECK: [[BB_4:.*]]:
; CHECK-NEXT: br label %[[IRR_GUARD]]
; CHECK: [[BB_5:.*]]:
; CHECK-NEXT: [[V_4:%.*]] = icmp eq i32 [[V_3_MOVED:%.*]], 0
; CHECK-NEXT: br i1 true, label %[[BB_6:.*]], label %[[BB_7:.*]]
; CHECK: [[BB_6]]:
; CHECK-NEXT: [[V_5:%.*]] = phi i32 [ [[V_3_MOVED]], %[[BB_5]] ], [ [[V_5_MOVED:%.*]], %[[IRR_GUARD1:.*]] ]
; CHECK-NEXT: call void @foo()
; CHECK-NEXT: br label %[[BB_4]]
; CHECK: [[BB_7]]:
; CHECK-NEXT: ret void
; CHECK: [[IRR_GUARD]]:
; CHECK-NEXT: [[V_5_MOVED]] = phi i32 [ poison, %[[BB_4]] ], [ poison, %[[BB_2]] ], [ 0, %[[BB_3]] ]
; CHECK-NEXT: [[V_3_MOVED]] = phi i32 [ 0, %[[BB_4]] ], [ 1, %[[BB_2]] ], [ poison, %[[BB_3]] ]
; CHECK-NEXT: [[GUARD_BB_5:%.*]] = phi i1 [ true, %[[BB_4]] ], [ true, %[[BB_2]] ], [ false, %[[BB_3]] ]
; CHECK-NEXT: [[GUARD_BB_6:%.*]] = phi i1 [ false, %[[BB_4]] ], [ false, %[[BB_2]] ], [ [[V_2]], %[[BB_3]] ]
; CHECK-NEXT: br i1 [[GUARD_BB_5]], label %[[BB_5]], label %[[IRR_GUARD1]]
; CHECK: [[IRR_GUARD1]]:
; CHECK-NEXT: br i1 [[GUARD_BB_6]], label %[[BB_6]], label %[[BB_4]]
;
entry:
br label %bb.1
bb.1:
%v.0 = icmp slt i32 %0, 35
br i1 %v.0, label %bb.3, label %bb.2
bb.2:
%v.1 = icmp slt i32 %0, 47
br i1 %v.1, label %bb.5, label %bb.5
bb.3:
%v.2 = icmp eq i32 %0, 0
br i1 %v.2, label %bb.6, label %bb.4
bb.4:
br label %bb.5
bb.5:
%v.3 = phi i32 [ 0, %bb.4 ], [ 1, %bb.2 ], [ 1, %bb.2 ]
%v.4 = icmp eq i32 %v.3, 0
br i1 true, label %bb.6, label %bb.7
bb.6:
%v.5 = phi i32 [ %v.3, %bb.5 ], [ 0, %bb.3 ]
call void @foo()
br label %bb.4
bb.7:
ret void
}
define void @baz(i1 %v.0, i1 %v.1) {
; CHECK-LABEL: define void @baz(
; CHECK-SAME: i1 [[V_0:%.*]], i1 [[V_1:%.*]]) {
; CHECK-NEXT: [[ENTRY:.*:]]
; CHECK-NEXT: br i1 [[V_0]], label %[[BB_1:.*]], label %[[BB_2:.*]]
; CHECK: [[BB_1]]:
; CHECK-NEXT: br label %[[IRR_GUARD:.*]]
; CHECK: [[BB_2]]:
; CHECK-NEXT: br label %[[IRR_GUARD]]
; CHECK: [[BB_3:.*]]:
; CHECK-NEXT: br label %[[BB_4:.*]]
; CHECK: [[BB_4]]:
; CHECK-NEXT: br label %[[IRR_GUARD]]
; CHECK: [[IRR_GUARD]]:
; CHECK-NEXT: [[GUARD_BB_3:%.*]] = phi i1 [ true, %[[BB_4]] ], [ true, %[[BB_2]] ], [ false, %[[BB_1]] ]
; CHECK-NEXT: br i1 [[GUARD_BB_3]], label %[[BB_3]], label %[[BB_4]]
;
entry:
br i1 %v.0, label %bb.1, label %bb.2
bb.1:
br label %bb.4
bb.2:
br i1 %v.1, label %bb.3, label %bb.3
bb.3:
br label %bb.4
bb.4:
br label %bb.3
; required to trigger the issue.
uselistorder label %bb.4, { 1, 0 }
}