Files
TheRock/compiler/amd-llvm/llvm/test/Transforms/SimplifyCFG/FoldValueComparisonIntoPredecessors-domtree-preservation-edgecase-2.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

77 lines
2.4 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -S -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s
declare void @widget()
declare i16 @baz()
declare void @snork()
declare void @spam()
define void @zot() local_unnamed_addr align 2 personality ptr undef {
; CHECK-LABEL: @zot(
; CHECK-NEXT: bb:
; CHECK-NEXT: invoke void @widget()
; CHECK-NEXT: to label [[BB14:%.*]] unwind label [[BB21:%.*]]
; CHECK: bb14:
; CHECK-NEXT: [[I0:%.*]] = invoke i16 @baz()
; CHECK-NEXT: to label [[BB15:%.*]] unwind label [[BB21]]
; CHECK: bb15:
; CHECK-NEXT: switch i16 [[I0]], label [[BB19:%.*]] [
; CHECK-NEXT: i16 42, label [[BB23:%.*]]
; CHECK-NEXT: i16 21330, label [[BB23]]
; CHECK-NEXT: ]
; CHECK: bb19:
; CHECK-NEXT: invoke void @snork()
; CHECK-NEXT: to label [[BB20:%.*]] unwind label [[BB21]]
; CHECK: bb20:
; CHECK-NEXT: unreachable
; CHECK: common.ret:
; CHECK-NEXT: ret void
; CHECK: bb21:
; CHECK-NEXT: [[I22:%.*]] = landingpad { ptr, i32 }
; CHECK-NEXT: cleanup
; CHECK-NEXT: br label [[COMMON_RET:%.*]]
; CHECK: bb23:
; CHECK-NEXT: invoke void @spam()
; CHECK-NEXT: to label [[COMMON_RET]] unwind label [[BB21]]
;
bb:
invoke void @widget()
to label %bb14 unwind label %bb21
bb14: ; preds = %bb
%i0 = invoke i16 @baz()
to label %bb15 unwind label %bb25
bb15: ; preds = %bb14
%i16 = icmp eq i16 %i0, 42
br i1 %i16, label %bb23, label %bb17
bb17: ; preds = %bb15
%i18 = icmp eq i16 %i0, 21330
br i1 %i18, label %bb23, label %bb19
bb19: ; preds = %bb17
invoke void @snork()
to label %bb20 unwind label %bb25
bb20: ; preds = %bb19
unreachable
bb21: ; preds = %bb
%i22 = landingpad { ptr, i32 }
cleanup
ret void
bb23: ; preds = %bb17, %bb15
invoke void @spam()
to label %bb24 unwind label %bb25
bb24: ; preds = %bb25, %bb23
ret void
bb25: ; preds = %bb23, %bb19, %bb14
%i26 = landingpad { ptr, i32 }
cleanup
br label %bb24
}