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
70 lines
2.2 KiB
LLVM
70 lines
2.2 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
|
|
; RUN: opt < %s -passes=instcombine -S | FileCheck %s
|
|
|
|
define i1 @test_imply_not1(i32 %depth) {
|
|
; CHECK-LABEL: define i1 @test_imply_not1(
|
|
; CHECK-SAME: i32 [[DEPTH:%.*]]) {
|
|
; CHECK-NEXT: [[CMP1_NOT1:%.*]] = icmp eq i32 [[DEPTH]], 16
|
|
; CHECK-NEXT: call void @use(i1 [[CMP1_NOT1]])
|
|
; CHECK-NEXT: [[CMP2:%.*]] = icmp slt i32 [[DEPTH]], 8
|
|
; CHECK-NEXT: call void @use(i1 [[CMP2]])
|
|
; CHECK-NEXT: br i1 [[CMP1_NOT1]], label [[IF_ELSE:%.*]], label [[IF_THEN:%.*]]
|
|
; CHECK: if.then:
|
|
; CHECK-NEXT: call void @func1()
|
|
; CHECK-NEXT: unreachable
|
|
; CHECK: if.else:
|
|
; CHECK-NEXT: call void @func2()
|
|
; CHECK-NEXT: unreachable
|
|
;
|
|
%cmp1 = icmp eq i32 %depth, 16
|
|
call void @use(i1 %cmp1)
|
|
%cmp2 = icmp slt i32 %depth, 8
|
|
call void @use(i1 %cmp2)
|
|
%cmp.not = xor i1 %cmp1, true
|
|
%brmerge = or i1 %cmp2, %cmp.not
|
|
br i1 %brmerge, label %if.then, label %if.else
|
|
if.then:
|
|
call void @func1()
|
|
unreachable
|
|
|
|
if.else:
|
|
call void @func2()
|
|
unreachable
|
|
}
|
|
|
|
define i1 @test_imply_not2(i32 %a, i1 %cmp2) {
|
|
; CHECK-LABEL: define i1 @test_imply_not2(
|
|
; CHECK-SAME: i32 [[A:%.*]], i1 [[CMP2:%.*]]) {
|
|
; CHECK-NEXT: [[CMP1:%.*]] = icmp ne i32 [[A]], 0
|
|
; CHECK-NEXT: [[BRMERGE:%.*]] = select i1 [[CMP1]], i1 true, i1 [[CMP2]]
|
|
; CHECK-NEXT: ret i1 [[BRMERGE]]
|
|
;
|
|
%cmp1 = icmp eq i32 %a, 0
|
|
%or.cond = select i1 %cmp1, i1 %cmp2, i1 false
|
|
%cmp.not = xor i1 %cmp1, true
|
|
%brmerge = or i1 %or.cond, %cmp.not
|
|
ret i1 %brmerge
|
|
}
|
|
|
|
define i1 @test_imply_not3(i32 %a, i32 %b, i1 %cond) {
|
|
; CHECK-LABEL: define i1 @test_imply_not3(
|
|
; CHECK-SAME: i32 [[A:%.*]], i32 [[B:%.*]], i1 [[COND:%.*]]) {
|
|
; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i32 [[A]], [[B]]
|
|
; CHECK-NEXT: call void @use(i1 [[CMP1]])
|
|
; CHECK-NEXT: [[CMP2:%.*]] = icmp slt i32 [[A]], [[B]]
|
|
; CHECK-NEXT: [[AND:%.*]] = select i1 [[CMP2]], i1 [[COND]], i1 false
|
|
; CHECK-NEXT: ret i1 [[AND]]
|
|
;
|
|
%cmp1 = icmp eq i32 %a, %b
|
|
call void @use(i1 %cmp1)
|
|
%cmp2 = icmp slt i32 %a, %b
|
|
%cmp.not = xor i1 %cmp1, true
|
|
%sel = select i1 %cmp.not, i1 %cond, i1 false
|
|
%and = and i1 %cmp2, %sel
|
|
ret i1 %and
|
|
}
|
|
|
|
declare void @func1()
|
|
declare void @func2()
|
|
declare void @use(i1)
|