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
69 lines
2.1 KiB
LLVM
69 lines
2.1 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -mtriple=riscv64 -mattr=+zbc -verify-machineinstrs < %s \
|
|
; RUN: | FileCheck %s -check-prefix=RV64ZBC
|
|
|
|
define i64 @clmul64r(i64 %a, i64 %b) nounwind {
|
|
; RV64ZBC-LABEL: clmul64r:
|
|
; RV64ZBC: # %bb.0:
|
|
; RV64ZBC-NEXT: clmulr a0, a0, a1
|
|
; RV64ZBC-NEXT: ret
|
|
%tmp = call i64 @llvm.riscv.clmulr.i64(i64 %a, i64 %b)
|
|
ret i64 %tmp
|
|
}
|
|
|
|
define signext i32 @clmul32r(i32 signext %a, i32 signext %b) nounwind {
|
|
; RV64ZBC-LABEL: clmul32r:
|
|
; RV64ZBC: # %bb.0:
|
|
; RV64ZBC-NEXT: slli a1, a1, 32
|
|
; RV64ZBC-NEXT: slli a0, a0, 32
|
|
; RV64ZBC-NEXT: clmulr a0, a0, a1
|
|
; RV64ZBC-NEXT: srai a0, a0, 32
|
|
; RV64ZBC-NEXT: ret
|
|
%tmp = call i32 @llvm.riscv.clmulr.i32(i32 %a, i32 %b)
|
|
ret i32 %tmp
|
|
}
|
|
|
|
; FIXME: We could avoid the slli instructions by using clmul+srli+sext.w since
|
|
; the inputs are zero extended.
|
|
define signext i32 @clmul32r_zext(i32 zeroext %a, i32 zeroext %b) nounwind {
|
|
; RV64ZBC-LABEL: clmul32r_zext:
|
|
; RV64ZBC: # %bb.0:
|
|
; RV64ZBC-NEXT: slli a1, a1, 32
|
|
; RV64ZBC-NEXT: slli a0, a0, 32
|
|
; RV64ZBC-NEXT: clmulr a0, a0, a1
|
|
; RV64ZBC-NEXT: srai a0, a0, 32
|
|
; RV64ZBC-NEXT: ret
|
|
%tmp = call i32 @llvm.riscv.clmulr.i32(i32 %a, i32 %b)
|
|
ret i32 %tmp
|
|
}
|
|
|
|
define i64 @llvm_clmulr_i64(i64 %a, i64 %b) nounwind {
|
|
; RV64ZBC-LABEL: llvm_clmulr_i64:
|
|
; RV64ZBC: # %bb.0:
|
|
; RV64ZBC-NEXT: clmulr a0, a0, a1
|
|
; RV64ZBC-NEXT: ret
|
|
%tmp1 = zext i64 %a to i128
|
|
%tmp2 = zext i64 %b to i128
|
|
%tmp3 = call i128 @llvm.clmul.i128(i128 %tmp1, i128 %tmp2)
|
|
%tmp4 = lshr i128 %tmp3, 63
|
|
%tmp5 = trunc i128 %tmp4 to i64
|
|
ret i64 %tmp5
|
|
}
|
|
|
|
define signext i32 @llvm_clmulr_i32(i32 signext %a, i32 signext %b) nounwind {
|
|
; RV64ZBC-LABEL: llvm_clmulr_i32:
|
|
; RV64ZBC: # %bb.0:
|
|
; RV64ZBC-NEXT: slli a1, a1, 32
|
|
; RV64ZBC-NEXT: slli a0, a0, 32
|
|
; RV64ZBC-NEXT: clmulh a0, a0, a1
|
|
; RV64ZBC-NEXT: srli a0, a0, 31
|
|
; RV64ZBC-NEXT: sext.w a0, a0
|
|
; RV64ZBC-NEXT: ret
|
|
%tmp1 = zext i32 %a to i64
|
|
%tmp2 = zext i32 %b to i64
|
|
%tmp3 = call i64 @llvm.clmul.i64(i64 %tmp1, i64 %tmp2)
|
|
%tmp4 = lshr i64 %tmp3, 31
|
|
%tmp5 = trunc i64 %tmp4 to i32
|
|
ret i32 %tmp5
|
|
}
|