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
78 lines
2.7 KiB
LLVM
78 lines
2.7 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -mtriple=riscv32 -mattr=+experimental-p,+m,+zbb \
|
|
; RUN: -verify-machineinstrs < %s | \
|
|
; RUN: FileCheck --check-prefixes=CHECK-RV32 %s
|
|
; RUN: llc -mtriple=riscv64 -mattr=+experimental-p,+m,+zbb \
|
|
; RUN: -verify-machineinstrs < %s | \
|
|
; RUN: FileCheck --check-prefixes=CHECK-RV64 %s
|
|
|
|
; Regression test: combinePExtTruncate must not crash when the operand of a
|
|
; narrowing shift is not a MUL/SUB (e.g. a plain function argument).
|
|
|
|
define i32 @trunc_lshr_v2i32_to_v2i16(i64 %a.coerce) {
|
|
; CHECK-RV32-LABEL: trunc_lshr_v2i32_to_v2i16:
|
|
; CHECK-RV32: # %bb.0:
|
|
; CHECK-RV32-NEXT: psrli.dw a0, a0, 8
|
|
; CHECK-RV32-NEXT: pack a0, a0, a1
|
|
; CHECK-RV32-NEXT: ret
|
|
;
|
|
; CHECK-RV64-LABEL: trunc_lshr_v2i32_to_v2i16:
|
|
; CHECK-RV64: # %bb.0:
|
|
; CHECK-RV64-NEXT: psrli.w a0, a0, 8
|
|
; CHECK-RV64-NEXT: srli a1, a0, 32
|
|
; CHECK-RV64-NEXT: ppaire.h a0, a0, a1
|
|
; CHECK-RV64-NEXT: ret
|
|
%v = bitcast i64 %a.coerce to <2 x i32>
|
|
%shr = lshr <2 x i32> %v, splat (i32 8)
|
|
%conv = trunc <2 x i32> %shr to <2 x i16>
|
|
%ret = bitcast <2 x i16> %conv to i32
|
|
ret i32 %ret
|
|
}
|
|
|
|
define i32 @trunc_ashr_v2i32_to_v2i16(i64 %a.coerce) {
|
|
; CHECK-RV32-LABEL: trunc_ashr_v2i32_to_v2i16:
|
|
; CHECK-RV32: # %bb.0:
|
|
; CHECK-RV32-NEXT: psrli.dw a0, a0, 8
|
|
; CHECK-RV32-NEXT: pack a0, a0, a1
|
|
; CHECK-RV32-NEXT: ret
|
|
;
|
|
; CHECK-RV64-LABEL: trunc_ashr_v2i32_to_v2i16:
|
|
; CHECK-RV64: # %bb.0:
|
|
; CHECK-RV64-NEXT: psrli.w a0, a0, 8
|
|
; CHECK-RV64-NEXT: srli a1, a0, 32
|
|
; CHECK-RV64-NEXT: ppaire.h a0, a0, a1
|
|
; CHECK-RV64-NEXT: ret
|
|
%v = bitcast i64 %a.coerce to <2 x i32>
|
|
%shr = ashr <2 x i32> %v, splat (i32 8)
|
|
%conv = trunc <2 x i32> %shr to <2 x i16>
|
|
%ret = bitcast <2 x i16> %conv to i32
|
|
ret i32 %ret
|
|
}
|
|
|
|
define i32 @trunc_lshr_v4i16_to_v4i8(i64 %a.coerce) {
|
|
; CHECK-RV32-LABEL: trunc_lshr_v4i16_to_v4i8:
|
|
; CHECK-RV32: # %bb.0:
|
|
; CHECK-RV32-NEXT: psrli.dh a0, a0, 4
|
|
; CHECK-RV32-NEXT: srli a3, a1, 16
|
|
; CHECK-RV32-NEXT: srli a2, a0, 16
|
|
; CHECK-RV32-NEXT: ppaire.db a0, a0, a2
|
|
; CHECK-RV32-NEXT: pack a0, a0, a1
|
|
; CHECK-RV32-NEXT: ret
|
|
;
|
|
; CHECK-RV64-LABEL: trunc_lshr_v4i16_to_v4i8:
|
|
; CHECK-RV64: # %bb.0:
|
|
; CHECK-RV64-NEXT: psrli.h a0, a0, 4
|
|
; CHECK-RV64-NEXT: srli a1, a0, 48
|
|
; CHECK-RV64-NEXT: srli a2, a0, 32
|
|
; CHECK-RV64-NEXT: ppaire.b a1, a2, a1
|
|
; CHECK-RV64-NEXT: srli a2, a0, 16
|
|
; CHECK-RV64-NEXT: ppaire.b a0, a0, a2
|
|
; CHECK-RV64-NEXT: ppaire.h a0, a0, a1
|
|
; CHECK-RV64-NEXT: ret
|
|
%v = bitcast i64 %a.coerce to <4 x i16>
|
|
%shr = lshr <4 x i16> %v, splat (i16 4)
|
|
%conv = trunc <4 x i16> %shr to <4 x i8>
|
|
%ret = bitcast <4 x i8> %conv to i32
|
|
ret i32 %ret
|
|
}
|