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
146 lines
5.5 KiB
LLVM
146 lines
5.5 KiB
LLVM
; RUN: opt -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S %s | FileCheck --match-full-lines %s
|
|
|
|
; The branch in %cont has !annotation metadata. Make sure generated AND
|
|
; has !annotation metadata.
|
|
define i32 @test_preserve_and(ptr %a, ptr %b, ptr %c, ptr %d) {
|
|
; CHECK-LABEL: define {{.*}} @test_preserve_and({{.*}}
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[C_1:%.*]] = icmp ult ptr [[A:%.*]], [[B:%.*]], !annotation !0
|
|
; CHECK-NEXT: [[C_2:%.*]] = icmp uge ptr [[C:%.*]], [[D:%.*]], !annotation !0
|
|
; CHECK-NEXT: [[OR_COND:%.*]] = select i1 [[C_1]], i1 [[C_2]], i1 false, !annotation !0
|
|
; CHECK-NEXT: br i1 [[OR_COND]], label [[CONT1:%.*]], label [[TRAP:%.*]], !annotation !0
|
|
; CHECK: trap: ; preds = %entry
|
|
; CHECK-NEXT: call void @fn1()
|
|
; CHECK-NEXT: unreachable
|
|
; CHECK: cont1: ; preds = %entry
|
|
; CHECK-NEXT: call void @fn2()
|
|
; CHECK-NEXT: ret i32 0
|
|
;
|
|
entry:
|
|
%c.1 = icmp ult ptr %a, %b, !annotation !0
|
|
br i1 %c.1, label %cont, label %trap, !annotation !0
|
|
|
|
cont: ; preds = %entry
|
|
%c.2 = icmp uge ptr %c, %d, !annotation !0
|
|
br i1 %c.2, label %cont1, label %trap, !annotation !0
|
|
|
|
trap: ; preds = %cont, %entry
|
|
call void @fn1()
|
|
unreachable
|
|
|
|
cont1: ; preds = %cont
|
|
call void @fn2()
|
|
ret i32 0
|
|
}
|
|
|
|
; The branch in %cont has !annotation metadata. Make sure generated OR
|
|
; has !annotation metadata.
|
|
define i32 @test_preserve_or(ptr %a, ptr %b, ptr %c, ptr %d) {
|
|
; CHECK-LABEL: define {{.*}} @test_preserve_or({{.*}}
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[C_1:%.*]] = icmp uge ptr [[A:%.*]], [[B:%.*]], !annotation !0
|
|
; CHECK-NEXT: [[C_2:%.*]] = icmp uge ptr [[C:%.*]], [[D:%.*]], !annotation !0
|
|
; CHECK-NEXT: [[OR_COND:%.*]] = select i1 [[C_1]], i1 true, i1 [[C_2]], !annotation !0
|
|
; CHECK-NEXT: br i1 [[OR_COND]], label [[TRAP:%.*]], label [[CONT1:%.*]], !annotation !0
|
|
; CHECK: trap: ; preds = %entry
|
|
; CHECK-NEXT: call void @fn1()
|
|
; CHECK-NEXT: unreachable
|
|
; CHECK: cont1: ; preds = %entry
|
|
; CHECK-NEXT: call void @fn2()
|
|
; CHECK-NEXT: ret i32 0
|
|
;
|
|
entry:
|
|
%c.1 = icmp ult ptr %a, %b, !annotation !0
|
|
br i1 %c.1, label %cont, label %trap, !annotation !0
|
|
|
|
cont: ; preds = %entry
|
|
%c.2 = icmp uge ptr %c, %d, !annotation !0
|
|
br i1 %c.2, label %trap, label %cont1, !annotation !0
|
|
|
|
trap: ; preds = %cont, %entry
|
|
call void @fn1()
|
|
unreachable
|
|
|
|
cont1: ; preds = %cont
|
|
call void @fn2()
|
|
ret i32 0
|
|
}
|
|
|
|
; The branch in %cont has !annotation metadata. Make sure generated negation
|
|
; and OR have !annotation metadata.
|
|
define i32 @test_preserve_or_not(ptr %a, ptr %b, ptr %c, ptr %d) {
|
|
; CHECK-LABEL: define {{.*}} @test_preserve_or_not({{.*}}
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[C_1:%.*]] = icmp ult ptr [[A:%.*]], [[B:%.*]], !annotation !0
|
|
; CHECK-NEXT: [[C_2:%.*]] = xor i1 [[C_1]], true
|
|
; CHECK-NEXT: [[C_2_NOT:%.*]] = xor i1 [[C_2]], true, !annotation !0
|
|
; CHECK-NEXT: [[C_3:%.*]] = icmp uge ptr [[C:%.*]], [[D:%.*]], !annotation !0
|
|
; CHECK-NEXT: [[OR_COND:%.*]] = select i1 [[C_2_NOT]], i1 true, i1 [[C_3]], !annotation !0
|
|
; CHECK-NEXT: br i1 [[OR_COND]], label [[TRAP:%.*]], label [[CONT1:%.*]], !annotation !0
|
|
; CHECK: trap: ; preds = %entry
|
|
; CHECK-NEXT: call void @fn1()
|
|
; CHECK-NEXT: unreachable
|
|
; CHECK: cont1: ; preds = %entry
|
|
; CHECK-NEXT: call void @fn2()
|
|
; CHECK-NEXT: ret i32 0
|
|
;
|
|
entry:
|
|
%c.1 = icmp ult ptr %a, %b, !annotation !0
|
|
%c.2 = xor i1 %c.1, true
|
|
br i1 %c.2, label %cont, label %trap, !annotation !0
|
|
|
|
cont: ; preds = %entry
|
|
%c.3 = icmp uge ptr %c, %d, !annotation !0
|
|
br i1 %c.3, label %trap, label %cont1, !annotation !0
|
|
|
|
trap: ; preds = %cont, %entry
|
|
call void @fn1()
|
|
unreachable
|
|
|
|
cont1: ; preds = %cont
|
|
call void @fn2()
|
|
ret i32 0
|
|
}
|
|
|
|
|
|
; The branch in %cont has no !annotation metadata. Make sure generated negation
|
|
; and OR do not have !annotation metadata.
|
|
define i32 @test_or_not_no_annotation(ptr %a, ptr %b, ptr %c, ptr %d) {
|
|
; CHECK-LABEL: define {{.*}} @test_or_not_no_annotation({{.*}}
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[C_1:%.*]] = icmp ult ptr [[A:%.*]], [[B:%.*]], !annotation !0
|
|
; CHECK-NEXT: [[C_2:%.*]] = xor i1 [[C_1]], true
|
|
; CHECK-NEXT: [[C_2_NOT:%.*]] = xor i1 [[C_2]], true
|
|
; CHECK-NEXT: [[C_3:%.*]] = icmp uge ptr [[C:%.*]], [[D:%.*]], !annotation !0
|
|
; CHECK-NEXT: [[OR_COND:%.*]] = select i1 [[C_2_NOT]], i1 true, i1 [[C_3]]
|
|
; CHECK-NEXT: br i1 [[OR_COND]], label [[TRAP:%.*]], label [[CONT1:%.*]], !annotation !0
|
|
; CHECK: trap: ; preds = %entry
|
|
; CHECK-NEXT: call void @fn1()
|
|
; CHECK-NEXT: unreachable
|
|
; CHECK: cont1: ; preds = %entry
|
|
; CHECK-NEXT: call void @fn2()
|
|
; CHECK-NEXT: ret i32 0
|
|
;
|
|
entry:
|
|
%c.1 = icmp ult ptr %a, %b, !annotation !0
|
|
%c.2 = xor i1 %c.1, true
|
|
br i1 %c.2, label %cont, label %trap, !annotation !0
|
|
|
|
cont: ; preds = %entry
|
|
%c.3 = icmp uge ptr %c, %d, !annotation !0
|
|
br i1 %c.3, label %trap, label %cont1
|
|
|
|
trap: ; preds = %cont, %entry
|
|
call void @fn1()
|
|
unreachable
|
|
|
|
cont1: ; preds = %cont
|
|
call void @fn2()
|
|
ret i32 0
|
|
}
|
|
|
|
declare void @fn1()
|
|
declare void @fn2()
|
|
|
|
!0 = !{!"foo"}
|