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
101 lines
2.9 KiB
LLVM
101 lines
2.9 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
|
|
|
|
; Bitcast between i64 and v8i8/v4i16/v2i32 on RV32 must be a register-level
|
|
; no-op so that paired-register arithmetic patterns match after the bitcast.
|
|
|
|
define i64 @bitcast_roundtrip_v8i8(i64 %a) {
|
|
; CHECK-RV32-LABEL: bitcast_roundtrip_v8i8:
|
|
; CHECK-RV32: # %bb.0:
|
|
; CHECK-RV32-NEXT: ret
|
|
;
|
|
; CHECK-RV64-LABEL: bitcast_roundtrip_v8i8:
|
|
; CHECK-RV64: # %bb.0:
|
|
; CHECK-RV64-NEXT: ret
|
|
%v = bitcast i64 %a to <8 x i8>
|
|
%r = bitcast <8 x i8> %v to i64
|
|
ret i64 %r
|
|
}
|
|
|
|
define i64 @bitcast_roundtrip_v4i16(i64 %a) {
|
|
; CHECK-RV32-LABEL: bitcast_roundtrip_v4i16:
|
|
; CHECK-RV32: # %bb.0:
|
|
; CHECK-RV32-NEXT: ret
|
|
;
|
|
; CHECK-RV64-LABEL: bitcast_roundtrip_v4i16:
|
|
; CHECK-RV64: # %bb.0:
|
|
; CHECK-RV64-NEXT: ret
|
|
%v = bitcast i64 %a to <4 x i16>
|
|
%r = bitcast <4 x i16> %v to i64
|
|
ret i64 %r
|
|
}
|
|
|
|
define i64 @bitcast_roundtrip_v2i32(i64 %a) {
|
|
; CHECK-RV32-LABEL: bitcast_roundtrip_v2i32:
|
|
; CHECK-RV32: # %bb.0:
|
|
; CHECK-RV32-NEXT: ret
|
|
;
|
|
; CHECK-RV64-LABEL: bitcast_roundtrip_v2i32:
|
|
; CHECK-RV64: # %bb.0:
|
|
; CHECK-RV64-NEXT: ret
|
|
%v = bitcast i64 %a to <2 x i32>
|
|
%r = bitcast <2 x i32> %v to i64
|
|
ret i64 %r
|
|
}
|
|
|
|
define i64 @add_v8i8_via_bitcast(i64 %a, i64 %b) {
|
|
; CHECK-RV32-LABEL: add_v8i8_via_bitcast:
|
|
; CHECK-RV32: # %bb.0:
|
|
; CHECK-RV32-NEXT: padd.db a0, a0, a2
|
|
; CHECK-RV32-NEXT: ret
|
|
;
|
|
; CHECK-RV64-LABEL: add_v8i8_via_bitcast:
|
|
; CHECK-RV64: # %bb.0:
|
|
; CHECK-RV64-NEXT: padd.b a0, a0, a1
|
|
; CHECK-RV64-NEXT: ret
|
|
%va = bitcast i64 %a to <8 x i8>
|
|
%vb = bitcast i64 %b to <8 x i8>
|
|
%r = add <8 x i8> %va, %vb
|
|
%ret = bitcast <8 x i8> %r to i64
|
|
ret i64 %ret
|
|
}
|
|
|
|
define i64 @add_v4i16_via_bitcast(i64 %a, i64 %b) {
|
|
; CHECK-RV32-LABEL: add_v4i16_via_bitcast:
|
|
; CHECK-RV32: # %bb.0:
|
|
; CHECK-RV32-NEXT: padd.dh a0, a0, a2
|
|
; CHECK-RV32-NEXT: ret
|
|
;
|
|
; CHECK-RV64-LABEL: add_v4i16_via_bitcast:
|
|
; CHECK-RV64: # %bb.0:
|
|
; CHECK-RV64-NEXT: padd.h a0, a0, a1
|
|
; CHECK-RV64-NEXT: ret
|
|
%va = bitcast i64 %a to <4 x i16>
|
|
%vb = bitcast i64 %b to <4 x i16>
|
|
%r = add <4 x i16> %va, %vb
|
|
%ret = bitcast <4 x i16> %r to i64
|
|
ret i64 %ret
|
|
}
|
|
|
|
define i64 @add_v2i32_via_bitcast(i64 %a, i64 %b) {
|
|
; CHECK-RV32-LABEL: add_v2i32_via_bitcast:
|
|
; CHECK-RV32: # %bb.0:
|
|
; CHECK-RV32-NEXT: padd.dw a0, a0, a2
|
|
; CHECK-RV32-NEXT: ret
|
|
;
|
|
; CHECK-RV64-LABEL: add_v2i32_via_bitcast:
|
|
; CHECK-RV64: # %bb.0:
|
|
; CHECK-RV64-NEXT: padd.w a0, a0, a1
|
|
; CHECK-RV64-NEXT: ret
|
|
%va = bitcast i64 %a to <2 x i32>
|
|
%vb = bitcast i64 %b to <2 x i32>
|
|
%r = add <2 x i32> %va, %vb
|
|
%ret = bitcast <2 x i32> %r to i64
|
|
ret i64 %ret
|
|
}
|