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
151 lines
3.7 KiB
LLVM
151 lines
3.7 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt -S -passes=instcombine < %s | FileCheck %s
|
|
|
|
define i1 @sdiv_by_zero_indirect_is_poison(i1 %c, i1 %x, i1 %y) {
|
|
; CHECK-LABEL: @sdiv_by_zero_indirect_is_poison(
|
|
; CHECK-NEXT: br i1 [[C:%.*]], label [[TRUE:%.*]], label [[FALSE:%.*]]
|
|
; CHECK: true:
|
|
; CHECK-NEXT: br label [[DONE:%.*]]
|
|
; CHECK: false:
|
|
; CHECK-NEXT: br label [[DONE]]
|
|
; CHECK: done:
|
|
; CHECK-NEXT: ret i1 poison
|
|
;
|
|
br i1 %c, label %true, label %false
|
|
true:
|
|
%y_true = and i1 %y, 0
|
|
br label %done
|
|
false:
|
|
%y_false = and i1 %y, 0
|
|
br label %done
|
|
done:
|
|
%yy = phi i1 [ %y_false, %false ], [ %y_true, %true ]
|
|
%r = sdiv i1 %x, %yy
|
|
ret i1 %r
|
|
}
|
|
|
|
define i1 @udiv_by_zero_indirect_is_poison(i1 %c, i1 %x, i1 %y) {
|
|
; CHECK-LABEL: @udiv_by_zero_indirect_is_poison(
|
|
; CHECK-NEXT: br i1 [[C:%.*]], label [[TRUE:%.*]], label [[FALSE:%.*]]
|
|
; CHECK: true:
|
|
; CHECK-NEXT: br label [[DONE:%.*]]
|
|
; CHECK: false:
|
|
; CHECK-NEXT: br label [[DONE]]
|
|
; CHECK: done:
|
|
; CHECK-NEXT: ret i1 poison
|
|
;
|
|
br i1 %c, label %true, label %false
|
|
true:
|
|
%y_true = and i1 %y, 0
|
|
br label %done
|
|
false:
|
|
%y_false = and i1 %y, 0
|
|
br label %done
|
|
done:
|
|
%yy = phi i1 [ %y_false, %false ], [ %y_true, %true ]
|
|
%r = udiv i1 %x, %yy
|
|
ret i1 %r
|
|
}
|
|
|
|
define i1 @srem_by_zero_indirect_is_poison(i1 %c, i1 %x, i1 %y) {
|
|
; CHECK-LABEL: @srem_by_zero_indirect_is_poison(
|
|
; CHECK-NEXT: br i1 [[C:%.*]], label [[TRUE:%.*]], label [[FALSE:%.*]]
|
|
; CHECK: true:
|
|
; CHECK-NEXT: br label [[DONE:%.*]]
|
|
; CHECK: false:
|
|
; CHECK-NEXT: br label [[DONE]]
|
|
; CHECK: done:
|
|
; CHECK-NEXT: ret i1 poison
|
|
;
|
|
br i1 %c, label %true, label %false
|
|
true:
|
|
%y_true = and i1 %y, 0
|
|
br label %done
|
|
false:
|
|
%y_false = and i1 %y, 0
|
|
br label %done
|
|
done:
|
|
%yy = phi i1 [ %y_false, %false ], [ %y_true, %true ]
|
|
%r = srem i1 %x, %yy
|
|
ret i1 %r
|
|
}
|
|
|
|
define i1 @urem_by_zero_indirect_is_poison(i1 %c, i1 %x, i1 %y) {
|
|
; CHECK-LABEL: @urem_by_zero_indirect_is_poison(
|
|
; CHECK-NEXT: br i1 [[C:%.*]], label [[TRUE:%.*]], label [[FALSE:%.*]]
|
|
; CHECK: true:
|
|
; CHECK-NEXT: br label [[DONE:%.*]]
|
|
; CHECK: false:
|
|
; CHECK-NEXT: br label [[DONE]]
|
|
; CHECK: done:
|
|
; CHECK-NEXT: ret i1 poison
|
|
;
|
|
br i1 %c, label %true, label %false
|
|
true:
|
|
%y_true = and i1 %y, 0
|
|
br label %done
|
|
false:
|
|
%y_false = and i1 %y, 0
|
|
br label %done
|
|
done:
|
|
%yy = phi i1 [ %y_false, %false ], [ %y_true, %true ]
|
|
%r = urem i1 %x, %yy
|
|
ret i1 %r
|
|
}
|
|
|
|
define i1 @sdiv_i1_is_op0(i1 %x, i1 %y) {
|
|
; CHECK-LABEL: @sdiv_i1_is_op0(
|
|
; CHECK-NEXT: ret i1 [[X:%.*]]
|
|
;
|
|
%r = sdiv i1 %x, %y
|
|
ret i1 %r
|
|
}
|
|
|
|
define i1 @udiv_i1_is_op0(i1 %x, i1 %y) {
|
|
; CHECK-LABEL: @udiv_i1_is_op0(
|
|
; CHECK-NEXT: ret i1 [[X:%.*]]
|
|
;
|
|
%r = udiv i1 %x, %y
|
|
ret i1 %r
|
|
}
|
|
|
|
define i1 @srem_i1_is_zero(i1 %x, i1 %y) {
|
|
; CHECK-LABEL: @srem_i1_is_zero(
|
|
; CHECK-NEXT: ret i1 false
|
|
;
|
|
%r = srem i1 %x, %y
|
|
ret i1 %r
|
|
}
|
|
|
|
define i1 @urem_i1_is_zero(i1 %x, i1 %y) {
|
|
; CHECK-LABEL: @urem_i1_is_zero(
|
|
; CHECK-NEXT: ret i1 false
|
|
;
|
|
%r = urem i1 %x, %y
|
|
ret i1 %r
|
|
}
|
|
|
|
declare void @llvm.assume(i1 noundef)
|
|
|
|
define i1 @pt62607() {
|
|
; CHECK-LABEL: @pt62607(
|
|
; CHECK-NEXT: entry_1:
|
|
; CHECK-NEXT: br label [[LOOP_5:%.*]]
|
|
; CHECK: loop_5:
|
|
; CHECK-NEXT: br i1 poison, label [[LOOP_5]], label [[LOOP_EXIT_8:%.*]]
|
|
; CHECK: loop_exit_8:
|
|
; CHECK-NEXT: ret i1 false
|
|
;
|
|
entry_1:
|
|
%val_i1_38 = trunc i8 109 to i1
|
|
br label %loop_5
|
|
loop_5: ; preds = %loop_5, %entry_1
|
|
%loop_cnt_i1_26.0 = phi i1 [ false, %entry_1 ], [ %val_i1_55, %loop_5 ]
|
|
%val_i1_55 = add i1 %loop_cnt_i1_26.0, true
|
|
call void @llvm.assume(i1 %val_i1_55)
|
|
%val_i1_67 = udiv i1 %val_i1_38, %loop_cnt_i1_26.0
|
|
br i1 %val_i1_67, label %loop_5, label %loop_exit_8
|
|
loop_exit_8: ; preds = %loop_5
|
|
ret i1 false
|
|
}
|