Files
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

84 lines
2.3 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=armv6-eabi %s -o - | FileCheck %s --check-prefixes=CHECK,ARMV6
; RUN: llc -mtriple=thumbv8.1m.main-arm-none-eabi -mattr=+dsp %s -o - | FileCheck %s --check-prefixes=CHECK,THUMB
define arm_aapcs_vfpcc i32 @usat_lsl(i32 %num){
; CHECK-LABEL: usat_lsl:
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: usat r0, #7, r0, lsl #2
; CHECK-NEXT: bx lr
entry:
%shl = shl i32 %num, 2
%0 = tail call i32 @llvm.arm.usat(i32 %shl, i32 7)
ret i32 %0
}
define arm_aapcs_vfpcc i32 @usat_asr(i32 %num){
; CHECK-LABEL: usat_asr:
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: usat r0, #7, r0, asr #2
; CHECK-NEXT: bx lr
entry:
%shr = ashr i32 %num, 2
%0 = tail call i32 @llvm.arm.usat(i32 %shr, i32 7)
ret i32 %0
}
define arm_aapcs_vfpcc i32 @usat_lsl2(i32 %num){
; ARMV6-LABEL: usat_lsl2:
; ARMV6: @ %bb.0: @ %entry
; ARMV6-NEXT: lsl r0, r0, #15
; ARMV6-NEXT: bic r1, r0, r0, asr #31
; ARMV6-NEXT: mov r0, #255
; ARMV6-NEXT: orr r0, r0, #32512
; ARMV6-NEXT: cmp r1, r0
; ARMV6-NEXT: movlt r0, r1
; ARMV6-NEXT: bx lr
;
; THUMB-LABEL: usat_lsl2:
; THUMB: @ %bb.0: @ %entry
; THUMB-NEXT: lsls r0, r0, #15
; THUMB-NEXT: movw r1, #32767
; THUMB-NEXT: bic.w r0, r0, r0, asr #31
; THUMB-NEXT: cmp r0, r1
; THUMB-NEXT: csel r0, r0, r1, lt
; THUMB-NEXT: bx lr
entry:
%shl = shl nsw i32 %num, 15
%0 = icmp sgt i32 %shl, 0
%1 = select i1 %0, i32 %shl, i32 0
%2 = icmp slt i32 %1, 32767
%3 = select i1 %2, i32 %1, i32 32767
ret i32 %3
}
define arm_aapcs_vfpcc i32 @usat_asr2(i32 %num){
; ARMV6-LABEL: usat_asr2:
; ARMV6: @ %bb.0: @ %entry
; ARMV6-NEXT: asr r1, r0, #15
; ARMV6-NEXT: bic r1, r1, r0, asr #31
; ARMV6-NEXT: mov r0, #255
; ARMV6-NEXT: orr r0, r0, #32512
; ARMV6-NEXT: cmp r1, r0
; ARMV6-NEXT: movlt r0, r1
; ARMV6-NEXT: bx lr
;
; THUMB-LABEL: usat_asr2:
; THUMB: @ %bb.0: @ %entry
; THUMB-NEXT: asrs r1, r0, #15
; THUMB-NEXT: bic.w r0, r1, r0, asr #31
; THUMB-NEXT: movw r1, #32767
; THUMB-NEXT: cmp r0, r1
; THUMB-NEXT: csel r0, r0, r1, lt
; THUMB-NEXT: bx lr
entry:
%shr = ashr i32 %num, 15
%0 = icmp sgt i32 %shr, 0
%1 = select i1 %0, i32 %shr, i32 0
%2 = icmp slt i32 %1, 32767
%3 = select i1 %2, i32 %1, i32 32767
ret i32 %3
}
declare i32 @llvm.arm.usat(i32, i32)