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

76 lines
1.5 KiB
LLVM

; RUN: llc -mtriple=hexagon < %s | FileCheck %s
target triple = "hexagon"
; CHECK-LABEL: ua
; CHECK: extractu(r0,#26,#0)
define i32 @ua(i32 %x) local_unnamed_addr #0 {
entry:
%shl = and i32 %x, 67108863
ret i32 %shl
}
; CHECK-LABEL: ub
; CHECK: extractu(r0,#16,#4)
define i32 @ub(i32 %x) local_unnamed_addr #0 {
entry:
%0 = lshr i32 %x, 4
%shr = and i32 %0, 65535
ret i32 %shr
}
; CHECK-LABEL: uc
; CHECK: extractu(r0,#24,#0)
define i32 @uc(i32 %x) local_unnamed_addr #0 {
entry:
%shl = and i32 %x, 16777215
ret i32 %shl
}
; CHECK-LABEL: ud
; CHECK: extractu(r0,#16,#8)
define i32 @ud(i32 %x) local_unnamed_addr #0 {
entry:
%bf.lshr = lshr i32 %x, 8
%bf.clear = and i32 %bf.lshr, 65535
ret i32 %bf.clear
}
; CHECK-LABEL: sa
; CHECK: extract(r0,#26,#0)
define i32 @sa(i32 %x) local_unnamed_addr #0 {
entry:
%shl = shl i32 %x, 6
%shr = ashr exact i32 %shl, 6
ret i32 %shr
}
; CHECK-LABEL: sb
; CHECK: extract(r0,#16,#4)
define i32 @sb(i32 %x) local_unnamed_addr #0 {
entry:
%shl = shl i32 %x, 12
%shr = ashr i32 %shl, 16
ret i32 %shr
}
; CHECK-LABEL: sc
; CHECK: extract(r0,#24,#0)
define i32 @sc(i32 %x) local_unnamed_addr #0 {
entry:
%shl = shl i32 %x, 8
%shr = ashr exact i32 %shl, 8
ret i32 %shr
}
; CHECK-LABEL: sd
; CHECK: extract(r0,#16,#8)
define i32 @sd(i32 %x) local_unnamed_addr #0 {
entry:
%bf.shl = shl i32 %x, 8
%bf.ashr = ashr i32 %bf.shl, 16
ret i32 %bf.ashr
}
attributes #0 = { noinline norecurse nounwind readnone "target-cpu"="hexagonv60" "target-features"="-hvx,-long-calls" }