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
65 lines
1.8 KiB
LLVM
65 lines
1.8 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
|
|
|
|
; These tests are for Integer BitWidth <= 64 && BitWidth % 2 != 0.
|
|
;; A | ~A == -1
|
|
define i23 @test1(i23 %A) {
|
|
; CHECK-LABEL: define i23 @test1(
|
|
; CHECK-SAME: i23 [[A:%.*]]) {
|
|
; CHECK-NEXT: ret i23 -1
|
|
;
|
|
%NotA = xor i23 -1, %A
|
|
%B = or i23 %A, %NotA
|
|
ret i23 %B
|
|
}
|
|
|
|
;; If we have: ((V + N) & C1) | (V & C2)
|
|
;; .. and C2 = ~C1 and C2 is 0+1+ and (N & C2) == 0
|
|
;; replace with V+N.
|
|
define i39 @test2(i39 %V, i39 %M) {
|
|
; CHECK-LABEL: define i39 @test2(
|
|
; CHECK-SAME: i39 [[V:%.*]], i39 [[M:%.*]]) {
|
|
; CHECK-NEXT: [[N:%.*]] = and i39 [[M]], -274877906944
|
|
; CHECK-NEXT: [[A:%.*]] = add i39 [[V]], [[N]]
|
|
; CHECK-NEXT: ret i39 [[A]]
|
|
;
|
|
%C1 = xor i39 274877906943, -1 ;; C2 = 274877906943
|
|
%N = and i39 %M, 274877906944
|
|
%A = add i39 %V, %N
|
|
%B = and i39 %A, %C1
|
|
%D = and i39 %V, 274877906943
|
|
%R = or i39 %B, %D
|
|
ret i39 %R
|
|
}
|
|
|
|
; These tests are for Integer BitWidth > 64 && BitWidth <= 1024.
|
|
;; A | ~A == -1
|
|
define i1023 @test4(i1023 %A) {
|
|
; CHECK-LABEL: define i1023 @test4(
|
|
; CHECK-SAME: i1023 [[A:%.*]]) {
|
|
; CHECK-NEXT: ret i1023 -1
|
|
;
|
|
%NotA = xor i1023 -1, %A
|
|
%B = or i1023 %A, %NotA
|
|
ret i1023 %B
|
|
}
|
|
|
|
;; If we have: ((V + N) & C1) | (V & C2)
|
|
;; .. and C2 = ~C1 and C2 is 0+1+ and (N & C2) == 0
|
|
;; replace with V+N.
|
|
define i399 @test5(i399 %V, i399 %M) {
|
|
; CHECK-LABEL: define i399 @test5(
|
|
; CHECK-SAME: i399 [[V:%.*]], i399 [[M:%.*]]) {
|
|
; CHECK-NEXT: [[N:%.*]] = and i399 [[M]], 18446742974197923840
|
|
; CHECK-NEXT: [[A:%.*]] = add i399 [[V]], [[N]]
|
|
; CHECK-NEXT: ret i399 [[A]]
|
|
;
|
|
%C1 = xor i399 274877906943, -1 ;; C2 = 274877906943
|
|
%N = and i399 %M, 18446742974197923840
|
|
%A = add i399 %V, %N
|
|
%B = and i399 %A, %C1
|
|
%D = and i399 %V, 274877906943
|
|
%R = or i399 %B, %D
|
|
ret i399 %R
|
|
}
|