Files
TheRock/compiler/amd-llvm/llvm/test/Transforms/SimplifyCFG/common-dest-folding.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

58 lines
1.5 KiB
LLVM

; RUN: opt < %s -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
;CHECK: @foo
;CHECK: and i32 %c1, %k
;CHECK: icmp eq i32
;CHECK: and i32 %c2, %k
;CHECK: icmp eq i32
;CHECK: select i1 {{.*}}, i1 true,
;CHECK: ret
define i32 @foo(i32 %k, i32 %c1, i32 %c2) {
%1 = and i32 %c1, %k
%2 = icmp eq i32 %1, 0
br i1 %2, label %8, label %3
; <label>:3 ; preds = %0
%4 = and i32 %c2, %k
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
; <label>:6 ; preds = %3
%7 = tail call i32 (...) @bar() nounwind
br label %8
; <label>:8 ; preds = %3, %0, %6
ret i32 undef
}
;CHECK: @conduse
;CHECK: shl i32 1, %c1
;CHECK-NEXT: shl i32 1, %c2
;CHECK-NEXT: and i32
;CHECK-NEXT: icmp eq i32
;CHECK-NEXT: and i32
;CHECK-NEXT: icmp eq i32
;CHECK: ret
define i32 @conduse(i32 %k, i32 %c1, i32 %c2) #0 {
bb:
%tmp = shl i32 1, %c1
%tmp4 = shl i32 1, %c2
%tmp1 = and i32 %tmp, %k
%tmp2 = icmp eq i32 %tmp1, 0
br i1 %tmp2, label %bb9, label %bb3
bb3: ; preds = %bb
%tmp5 = and i32 %tmp4, %k
%tmp6 = icmp eq i32 %tmp5, 0
br i1 %tmp6, label %bb9, label %bb7
bb7: ; preds = %bb3
%tmp8 = tail call i32 (...) @bar() #1
br label %bb9
bb9: ; preds = %bb7, %bb3, %bb
ret i32 undef
}
declare i32 @bar(...)