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
164 lines
5.8 KiB
LLVM
164 lines
5.8 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc --mtriple=loongarch32 --mattr=+32s,+lasx < %s | FileCheck %s
|
|
; RUN: llc --mtriple=loongarch64 --mattr=+lasx < %s | FileCheck %s
|
|
|
|
define void @mulhs_v32i8(ptr %res, ptr %a0, ptr %a1) nounwind {
|
|
; CHECK-LABEL: mulhs_v32i8:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: xvld $xr0, $a1, 0
|
|
; CHECK-NEXT: xvld $xr1, $a2, 0
|
|
; CHECK-NEXT: xvmuh.b $xr0, $xr0, $xr1
|
|
; CHECK-NEXT: xvst $xr0, $a0, 0
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%v0 = load <32 x i8>, ptr %a0
|
|
%v1 = load <32 x i8>, ptr %a1
|
|
%v0s = sext <32 x i8> %v0 to <32 x i16>
|
|
%v1s = sext <32 x i8> %v1 to <32 x i16>
|
|
%m = mul <32 x i16> %v0s, %v1s
|
|
%s = ashr <32 x i16> %m, <i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8>
|
|
%v2 = trunc <32 x i16> %s to <32 x i8>
|
|
store <32 x i8> %v2, ptr %res
|
|
ret void
|
|
}
|
|
|
|
define void @mulhu_v32i8(ptr %res, ptr %a0, ptr %a1) nounwind {
|
|
; CHECK-LABEL: mulhu_v32i8:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: xvld $xr0, $a1, 0
|
|
; CHECK-NEXT: xvld $xr1, $a2, 0
|
|
; CHECK-NEXT: xvmuh.bu $xr0, $xr0, $xr1
|
|
; CHECK-NEXT: xvst $xr0, $a0, 0
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%v0 = load <32 x i8>, ptr %a0
|
|
%v1 = load <32 x i8>, ptr %a1
|
|
%v0z = zext <32 x i8> %v0 to <32 x i16>
|
|
%v1z = zext <32 x i8> %v1 to <32 x i16>
|
|
%m = mul <32 x i16> %v0z, %v1z
|
|
%s = lshr <32 x i16> %m, <i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8>
|
|
%v2 = trunc <32 x i16> %s to <32 x i8>
|
|
store <32 x i8> %v2, ptr %res
|
|
ret void
|
|
}
|
|
|
|
define void @mulhs_v16i16(ptr %res, ptr %a0, ptr %a1) nounwind {
|
|
; CHECK-LABEL: mulhs_v16i16:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: xvld $xr0, $a1, 0
|
|
; CHECK-NEXT: xvld $xr1, $a2, 0
|
|
; CHECK-NEXT: xvmuh.h $xr0, $xr0, $xr1
|
|
; CHECK-NEXT: xvst $xr0, $a0, 0
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%v0 = load <16 x i16>, ptr %a0
|
|
%v1 = load <16 x i16>, ptr %a1
|
|
%v0s = sext <16 x i16> %v0 to <16 x i32>
|
|
%v1s = sext <16 x i16> %v1 to <16 x i32>
|
|
%m = mul <16 x i32> %v0s, %v1s
|
|
%s = ashr <16 x i32> %m, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
|
|
%v2 = trunc <16 x i32> %s to <16 x i16>
|
|
store <16 x i16> %v2, ptr %res
|
|
ret void
|
|
}
|
|
|
|
define void @mulhu_v16i16(ptr %res, ptr %a0, ptr %a1) nounwind {
|
|
; CHECK-LABEL: mulhu_v16i16:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: xvld $xr0, $a1, 0
|
|
; CHECK-NEXT: xvld $xr1, $a2, 0
|
|
; CHECK-NEXT: xvmuh.hu $xr0, $xr0, $xr1
|
|
; CHECK-NEXT: xvst $xr0, $a0, 0
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%v0 = load <16 x i16>, ptr %a0
|
|
%v1 = load <16 x i16>, ptr %a1
|
|
%v0z = zext <16 x i16> %v0 to <16 x i32>
|
|
%v1z = zext <16 x i16> %v1 to <16 x i32>
|
|
%m = mul <16 x i32> %v0z, %v1z
|
|
%s = lshr <16 x i32> %m, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
|
|
%v2 = trunc <16 x i32> %s to <16 x i16>
|
|
store <16 x i16> %v2, ptr %res
|
|
ret void
|
|
}
|
|
|
|
define void @mulhs_v8i32(ptr %res, ptr %a0, ptr %a1) nounwind {
|
|
; CHECK-LABEL: mulhs_v8i32:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: xvld $xr0, $a1, 0
|
|
; CHECK-NEXT: xvld $xr1, $a2, 0
|
|
; CHECK-NEXT: xvmuh.w $xr0, $xr0, $xr1
|
|
; CHECK-NEXT: xvst $xr0, $a0, 0
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%v0 = load <8 x i32>, ptr %a0
|
|
%v1 = load <8 x i32>, ptr %a1
|
|
%v0s = sext <8 x i32> %v0 to <8 x i64>
|
|
%v1s = sext <8 x i32> %v1 to <8 x i64>
|
|
%m = mul <8 x i64> %v0s, %v1s
|
|
%s = ashr <8 x i64> %m, <i64 32, i64 32, i64 32, i64 32, i64 32, i64 32, i64 32, i64 32>
|
|
%v2 = trunc <8 x i64> %s to <8 x i32>
|
|
store <8 x i32> %v2, ptr %res
|
|
ret void
|
|
}
|
|
|
|
define void @mulhu_v8i32(ptr %res, ptr %a0, ptr %a1) nounwind {
|
|
; CHECK-LABEL: mulhu_v8i32:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: xvld $xr0, $a1, 0
|
|
; CHECK-NEXT: xvld $xr1, $a2, 0
|
|
; CHECK-NEXT: xvmuh.wu $xr0, $xr0, $xr1
|
|
; CHECK-NEXT: xvst $xr0, $a0, 0
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%v0 = load <8 x i32>, ptr %a0
|
|
%v1 = load <8 x i32>, ptr %a1
|
|
%v0z = zext <8 x i32> %v0 to <8 x i64>
|
|
%v1z = zext <8 x i32> %v1 to <8 x i64>
|
|
%m = mul <8 x i64> %v0z, %v1z
|
|
%s = lshr <8 x i64> %m, <i64 32, i64 32, i64 32, i64 32, i64 32, i64 32, i64 32, i64 32>
|
|
%v2 = trunc <8 x i64> %s to <8 x i32>
|
|
store <8 x i32> %v2, ptr %res
|
|
ret void
|
|
}
|
|
|
|
define void @mulhs_v4i64(ptr %res, ptr %a0, ptr %a1) nounwind {
|
|
; CHECK-LABEL: mulhs_v4i64:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: xvld $xr0, $a1, 0
|
|
; CHECK-NEXT: xvld $xr1, $a2, 0
|
|
; CHECK-NEXT: xvmuh.d $xr0, $xr0, $xr1
|
|
; CHECK-NEXT: xvst $xr0, $a0, 0
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%v0 = load <4 x i64>, ptr %a0
|
|
%v1 = load <4 x i64>, ptr %a1
|
|
%v0s = sext <4 x i64> %v0 to <4 x i128>
|
|
%v1s = sext <4 x i64> %v1 to <4 x i128>
|
|
%m = mul <4 x i128> %v0s, %v1s
|
|
%s = ashr <4 x i128> %m, <i128 64, i128 64, i128 64, i128 64>
|
|
%v2 = trunc <4 x i128> %s to <4 x i64>
|
|
store <4 x i64> %v2, ptr %res
|
|
ret void
|
|
}
|
|
|
|
define void @mulhu_v4i64(ptr %res, ptr %a0, ptr %a1) nounwind {
|
|
; CHECK-LABEL: mulhu_v4i64:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: xvld $xr0, $a1, 0
|
|
; CHECK-NEXT: xvld $xr1, $a2, 0
|
|
; CHECK-NEXT: xvmuh.du $xr0, $xr0, $xr1
|
|
; CHECK-NEXT: xvst $xr0, $a0, 0
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%v0 = load <4 x i64>, ptr %a0
|
|
%v1 = load <4 x i64>, ptr %a1
|
|
%v0z = zext <4 x i64> %v0 to <4 x i128>
|
|
%v1z = zext <4 x i64> %v1 to <4 x i128>
|
|
%m = mul <4 x i128> %v0z, %v1z
|
|
%s = lshr <4 x i128> %m, <i128 64, i128 64, i128 64, i128 64>
|
|
%v2 = trunc <4 x i128> %s to <4 x i64>
|
|
store <4 x i64> %v2, ptr %res
|
|
ret void
|
|
}
|