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
165 lines
3.9 KiB
LLVM
165 lines
3.9 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s
|
|
|
|
define i32 @ori32i32_eq(i32 %x, i32 %y) {
|
|
; CHECK-LABEL: ori32i32_eq:
|
|
; CHECK: // %bb.0:
|
|
; CHECK-NEXT: and w8, w0, #0x1
|
|
; CHECK-NEXT: cmp w1, #0
|
|
; CHECK-NEXT: csinc w0, w8, wzr, ne
|
|
; CHECK-NEXT: ret
|
|
%xa = and i32 %x, 1
|
|
%c = icmp eq i32 %y, 0
|
|
%cz = zext i1 %c to i32
|
|
%a = or i32 %xa, %cz
|
|
ret i32 %a
|
|
}
|
|
|
|
define i32 @ori32_eq_c(i32 %x, i32 %y) {
|
|
; CHECK-LABEL: ori32_eq_c:
|
|
; CHECK: // %bb.0:
|
|
; CHECK-NEXT: and w8, w0, #0x1
|
|
; CHECK-NEXT: cmp w1, #0
|
|
; CHECK-NEXT: csinc w0, w8, wzr, ne
|
|
; CHECK-NEXT: ret
|
|
%xa = and i32 %x, 1
|
|
%c = icmp eq i32 %y, 0
|
|
%cz = zext i1 %c to i32
|
|
%a = or i32 %cz, %xa
|
|
ret i32 %a
|
|
}
|
|
|
|
define i32 @ori32i64_eq(i32 %x, i64 %y) {
|
|
; CHECK-LABEL: ori32i64_eq:
|
|
; CHECK: // %bb.0:
|
|
; CHECK-NEXT: and w8, w0, #0x1
|
|
; CHECK-NEXT: cmp x1, #0
|
|
; CHECK-NEXT: csinc w0, w8, wzr, ne
|
|
; CHECK-NEXT: ret
|
|
%xa = and i32 %x, 1
|
|
%c = icmp eq i64 %y, 0
|
|
%cz = zext i1 %c to i32
|
|
%a = or i32 %xa, %cz
|
|
ret i32 %a
|
|
}
|
|
|
|
define i32 @ori32_sgt(i32 %x, i32 %y) {
|
|
; CHECK-LABEL: ori32_sgt:
|
|
; CHECK: // %bb.0:
|
|
; CHECK-NEXT: and w8, w0, #0x1
|
|
; CHECK-NEXT: cmp w1, #0
|
|
; CHECK-NEXT: csinc w0, w8, wzr, le
|
|
; CHECK-NEXT: ret
|
|
%xa = and i32 %x, 1
|
|
%c = icmp sgt i32 %y, 0
|
|
%cz = zext i1 %c to i32
|
|
%a = or i32 %xa, %cz
|
|
ret i32 %a
|
|
}
|
|
|
|
; Negative test - too many demanded bits
|
|
define i32 @ori32_toomanybits(i32 %x, i32 %y) {
|
|
; CHECK-LABEL: ori32_toomanybits:
|
|
; CHECK: // %bb.0:
|
|
; CHECK-NEXT: cmp w1, #0
|
|
; CHECK-NEXT: and w8, w0, #0x3
|
|
; CHECK-NEXT: cset w9, eq
|
|
; CHECK-NEXT: orr w0, w8, w9
|
|
; CHECK-NEXT: ret
|
|
%xa = and i32 %x, 3
|
|
%c = icmp eq i32 %y, 0
|
|
%cz = zext i1 %c to i32
|
|
%a = or i32 %xa, %cz
|
|
ret i32 %a
|
|
}
|
|
|
|
define i32 @andi32_ne(i8 %x, i8 %y) {
|
|
; CHECK-LABEL: andi32_ne:
|
|
; CHECK: // %bb.0:
|
|
; CHECK-NEXT: tst w0, #0xff
|
|
; CHECK-NEXT: cset w8, eq
|
|
; CHECK-NEXT: tst w1, #0xff
|
|
; CHECK-NEXT: csel w0, wzr, w8, eq
|
|
; CHECK-NEXT: ret
|
|
%xc = icmp eq i8 %x, 0
|
|
%xa = zext i1 %xc to i32
|
|
%c = icmp ne i8 %y, 0
|
|
%cz = zext i1 %c to i32
|
|
%a = and i32 %xa, %cz
|
|
ret i32 %a
|
|
}
|
|
|
|
define i32 @andi32_sgt(i8 %x, i8 %y) {
|
|
; CHECK-LABEL: andi32_sgt:
|
|
; CHECK: // %bb.0:
|
|
; CHECK-NEXT: sxtb w8, w1
|
|
; CHECK-NEXT: tst w0, #0xff
|
|
; CHECK-NEXT: ccmp w8, #0, #4, eq
|
|
; CHECK-NEXT: cset w0, gt
|
|
; CHECK-NEXT: ret
|
|
%xc = icmp eq i8 %x, 0
|
|
%xa = zext i1 %xc to i32
|
|
%c = icmp sgt i8 %y, 0
|
|
%cz = zext i1 %c to i32
|
|
%a = and i32 %xa, %cz
|
|
ret i32 %a
|
|
}
|
|
|
|
define i64 @ori64i32_eq(i64 %x, i32 %y) {
|
|
; CHECK-LABEL: ori64i32_eq:
|
|
; CHECK: // %bb.0:
|
|
; CHECK-NEXT: and x8, x0, #0x1
|
|
; CHECK-NEXT: cmp w1, #0
|
|
; CHECK-NEXT: csinc x0, x8, xzr, ne
|
|
; CHECK-NEXT: ret
|
|
%xa = and i64 %x, 1
|
|
%c = icmp eq i32 %y, 0
|
|
%cz = zext i1 %c to i64
|
|
%a = or i64 %xa, %cz
|
|
ret i64 %a
|
|
}
|
|
|
|
define i64 @ori64i64_eq(i64 %x, i64 %y) {
|
|
; CHECK-LABEL: ori64i64_eq:
|
|
; CHECK: // %bb.0:
|
|
; CHECK-NEXT: and x8, x0, #0x1
|
|
; CHECK-NEXT: cmp x1, #0
|
|
; CHECK-NEXT: csinc x0, x8, xzr, ne
|
|
; CHECK-NEXT: ret
|
|
%xa = and i64 %x, 1
|
|
%c = icmp eq i64 %y, 0
|
|
%cz = zext i1 %c to i64
|
|
%a = or i64 %xa, %cz
|
|
ret i64 %a
|
|
}
|
|
|
|
define i64 @ori64_eq_c(i64 %x, i32 %y) {
|
|
; CHECK-LABEL: ori64_eq_c:
|
|
; CHECK: // %bb.0:
|
|
; CHECK-NEXT: and x8, x0, #0x1
|
|
; CHECK-NEXT: cmp w1, #0
|
|
; CHECK-NEXT: csinc x0, x8, xzr, ne
|
|
; CHECK-NEXT: ret
|
|
%xa = and i64 %x, 1
|
|
%c = icmp eq i32 %y, 0
|
|
%cz = zext i1 %c to i64
|
|
%a = or i64 %cz, %xa
|
|
ret i64 %a
|
|
}
|
|
|
|
define i64 @andi64_ne(i8 %x, i8 %y) {
|
|
; CHECK-LABEL: andi64_ne:
|
|
; CHECK: // %bb.0:
|
|
; CHECK-NEXT: tst w0, #0xff
|
|
; CHECK-NEXT: cset w8, eq
|
|
; CHECK-NEXT: tst w1, #0xff
|
|
; CHECK-NEXT: csel w0, wzr, w8, eq
|
|
; CHECK-NEXT: ret
|
|
%xc = icmp eq i8 %x, 0
|
|
%xa = zext i1 %xc to i64
|
|
%c = icmp ne i8 %y, 0
|
|
%cz = zext i1 %c to i64
|
|
%a = and i64 %xa, %cz
|
|
ret i64 %a
|
|
}
|