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
45 lines
1.4 KiB
LLVM
45 lines
1.4 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: opt < %s -passes=sccp -S | FileCheck %s
|
|
|
|
define i32 @test1(i1 %C) {
|
|
; CHECK-LABEL: define i32 @test1(
|
|
; CHECK-SAME: i1 [[C:%.*]]) {
|
|
; CHECK-NEXT: ret i32 0
|
|
;
|
|
%X = select i1 %C, i32 0, i32 0
|
|
ret i32 %X
|
|
}
|
|
|
|
define i32 @test2(i1 %C) {
|
|
; CHECK-LABEL: define i32 @test2(
|
|
; CHECK-SAME: i1 [[C:%.*]]) {
|
|
; CHECK-NEXT: ret i32 0
|
|
;
|
|
%X = select i1 %C, i32 0, i32 undef
|
|
ret i32 %X
|
|
}
|
|
|
|
define i1 @f2(i32 %x, i1 %cmp) {
|
|
; CHECK-LABEL: define i1 @f2(
|
|
; CHECK-SAME: i32 [[X:%.*]], i1 [[CMP:%.*]]) {
|
|
; CHECK-NEXT: [[SEL_1:%.*]] = select i1 [[CMP]], i32 [[X]], i32 10
|
|
; CHECK-NEXT: [[C_1:%.*]] = icmp sgt i32 [[SEL_1]], 300
|
|
; CHECK-NEXT: [[C_2:%.*]] = icmp sgt i32 [[SEL_1]], 100
|
|
; CHECK-NEXT: [[C_3:%.*]] = icmp eq i32 [[SEL_1]], 50
|
|
; CHECK-NEXT: [[C_4:%.*]] = icmp slt i32 [[SEL_1]], 9
|
|
; CHECK-NEXT: [[RES_1:%.*]] = add i1 [[C_1]], [[C_2]]
|
|
; CHECK-NEXT: [[RES_2:%.*]] = add i1 [[RES_1]], [[C_3]]
|
|
; CHECK-NEXT: [[RES_3:%.*]] = add i1 [[RES_2]], [[C_4]]
|
|
; CHECK-NEXT: ret i1 [[RES_3]]
|
|
;
|
|
%sel.1 = select i1 %cmp, i32 %x, i32 10
|
|
%c.1 = icmp sgt i32 %sel.1, 300
|
|
%c.2 = icmp sgt i32 %sel.1, 100
|
|
%c.3 = icmp eq i32 %sel.1, 50
|
|
%c.4 = icmp slt i32 %sel.1, 9
|
|
%res.1 = add i1 %c.1, %c.2
|
|
%res.2 = add i1 %res.1, %c.3
|
|
%res.3 = add i1 %res.2, %c.4
|
|
ret i1 %res.3
|
|
}
|