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
35 lines
1.4 KiB
LLVM
35 lines
1.4 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3
|
|
; RUN: opt -O1 -S < %s | FileCheck %s
|
|
|
|
define i32 @testa(i32 %mul) {
|
|
; CHECK-LABEL: define range(i32 -65536, 32768) i32 @testa(
|
|
; CHECK-SAME: i32 [[MUL:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
|
|
; CHECK-NEXT: [[SHR:%.*]] = ashr i32 [[MUL]], 15
|
|
; CHECK-NEXT: [[SPEC_SELECT_I:%.*]] = tail call i32 @llvm.smin.i32(i32 [[SHR]], i32 32767)
|
|
; CHECK-NEXT: ret i32 [[SPEC_SELECT_I]]
|
|
;
|
|
%shr = ashr i32 %mul, 15
|
|
%cmp4.i = icmp sgt i32 %shr, 32767
|
|
%switch.i = icmp ult i1 %cmp4.i, true
|
|
%spec.select.i = select i1 %switch.i, i32 %shr, i32 32767
|
|
ret i32 %spec.select.i
|
|
}
|
|
|
|
define i32 @testb(i32 %mul) {
|
|
; CHECK-LABEL: define range(i32 -128, 128) i32 @testb(
|
|
; CHECK-SAME: i32 [[MUL:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
; CHECK-NEXT: [[SHR102:%.*]] = ashr i32 [[MUL]], 7
|
|
; CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.smax.i32(i32 [[SHR102]], i32 -128)
|
|
; CHECK-NEXT: [[SPEC_SELECT_I:%.*]] = tail call i32 @llvm.smin.i32(i32 [[TMP1]], i32 127)
|
|
; CHECK-NEXT: ret i32 [[SPEC_SELECT_I]]
|
|
;
|
|
%shr102 = ashr i32 %mul, 7
|
|
%cmp4.i = icmp sgt i32 %shr102, 127
|
|
%cmp6.i = icmp slt i32 %shr102, -128
|
|
%retval.0.i = select i1 %cmp4.i, i32 127, i32 -128
|
|
%cleanup.dest.slot.0.i = select i1 %cmp4.i, i1 true, i1 %cmp6.i
|
|
%switch.i = icmp ult i1 %cleanup.dest.slot.0.i, true
|
|
%spec.select.i = select i1 %switch.i, i32 %shr102, i32 %retval.0.i
|
|
ret i32 %spec.select.i
|
|
}
|