Files
TheRock/compiler/amd-llvm/llvm/test/Transforms/SimplifyCFG/tautological-conditional-branch.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

66 lines
2.2 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
%0 = type { ptr, ptr }
%1 = type { ptr }
%2 = type { ptr, ptr }
define void @eggs(i1 %arg, i1 %arg16, ptr %arg17, ptr %arg18, ptr %arg19) {
; CHECK-LABEL: @eggs(
; CHECK-NEXT: bb:
; CHECK-NEXT: br i1 [[ARG:%.*]], label [[BB20:%.*]], label [[BB21:%.*]]
; CHECK: bb20:
; CHECK-NEXT: call void @wombat()
; CHECK-NEXT: unreachable
; CHECK: bb21:
; CHECK-NEXT: [[I:%.*]] = icmp eq ptr [[ARG17:%.*]], null
; CHECK-NEXT: [[TMP0:%.*]] = xor i1 [[I]], true
; CHECK-NEXT: call void @llvm.assume(i1 [[TMP0]])
; CHECK-NEXT: call void @hoge()
; CHECK-NEXT: [[TMP1:%.*]] = xor i1 [[ARG16:%.*]], true
; CHECK-NEXT: call void @llvm.assume(i1 [[TMP1]])
; CHECK-NEXT: [[I28:%.*]] = load ptr, ptr [[ARG19:%.*]], align 8
; CHECK-NEXT: call void @pluto.1(ptr [[I28]])
; CHECK-NEXT: call void @pluto()
; CHECK-NEXT: ret void
;
bb:
br i1 %arg, label %bb20, label %bb21
bb20: ; preds = %bb
call void @wombat()
br label %bb24
bb21: ; preds = %bb
%i = icmp eq ptr %arg17, null
br i1 %i, label %bb24, label %bb22
bb22: ; preds = %bb21
call void @hoge()
br i1 %arg16, label %bb24, label %bb23
bb23: ; preds = %bb22
br label %bb24
bb24: ; preds = %bb23, %bb22, %bb21, %bb20
%i25 = phi i1 [ false, %bb21 ], [ false, %bb20 ], [ false, %bb23 ], [ false, %bb22 ]
%i26 = phi ptr [ null, %bb21 ], [ null, %bb20 ], [ %arg19, %bb23 ], [ null, %bb22 ]
%i28 = load ptr, ptr %i26, align 8
call void @pluto.1(ptr %i28)
br i1 %i25, label %bb30, label %bb29
bb29: ; preds = %bb24
call void @pluto()
ret void
bb30: ; preds = %bb24
call void @spam()
ret void
}
declare void @wombat()
declare void @pluto()
declare void @spam()
declare void @hoge()
declare void @pluto.1(ptr)