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
93 lines
4.7 KiB
LLVM
93 lines
4.7 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve,+sme -O3 < %s -o - | FileCheck %s --check-prefixes=CHECK
|
|
|
|
; Tests consecutive stores of @llvm.aarch64.sve.faddv. Within SDAG faddv is
|
|
; lowered as a FADDV + EXTRACT_VECTOR_ELT (of lane 0). Stores of extracts can
|
|
; be matched by DAGCombiner::mergeConsecutiveStores(), which we want to avoid in
|
|
; some cases as it can lead to worse codegen.
|
|
|
|
; TODO: A single `stp s0, s1, [x0]` may be preferred here.
|
|
define void @consecutive_stores_pair(ptr %dest0, <vscale x 4 x float> %vec0, <vscale x 4 x float> %vec1) {
|
|
; CHECK-LABEL: consecutive_stores_pair:
|
|
; CHECK: // %bb.0:
|
|
; CHECK-NEXT: ptrue p0.s
|
|
; CHECK-NEXT: faddv s0, p0, z0.s
|
|
; CHECK-NEXT: faddv s1, p0, z1.s
|
|
; CHECK-NEXT: mov v0.s[1], v1.s[0]
|
|
; CHECK-NEXT: str d0, [x0]
|
|
; CHECK-NEXT: ret
|
|
%dest1 = getelementptr inbounds i8, ptr %dest0, i64 4
|
|
%reduce0 = call float @llvm.aarch64.sve.faddv.nxv4f32(<vscale x 4 x i1> splat(i1 true), <vscale x 4 x float> %vec0)
|
|
%reduce1 = call float @llvm.aarch64.sve.faddv.nxv4f32(<vscale x 4 x i1> splat(i1 true), <vscale x 4 x float> %vec1)
|
|
store float %reduce0, ptr %dest0, align 4
|
|
store float %reduce1, ptr %dest1, align 4
|
|
ret void
|
|
}
|
|
|
|
define void @consecutive_stores_quadruple(ptr %dest0, <vscale x 4 x float> %vec0, <vscale x 4 x float> %vec1, <vscale x 4 x float> %vec2, <vscale x 4 x float> %vec3) {
|
|
; CHECK-LABEL: consecutive_stores_quadruple:
|
|
; CHECK: // %bb.0:
|
|
; CHECK-NEXT: ptrue p0.s
|
|
; CHECK-NEXT: faddv s0, p0, z0.s
|
|
; CHECK-NEXT: faddv s1, p0, z1.s
|
|
; CHECK-NEXT: faddv s2, p0, z2.s
|
|
; CHECK-NEXT: mov v0.s[1], v1.s[0]
|
|
; CHECK-NEXT: faddv s3, p0, z3.s
|
|
; CHECK-NEXT: mov v2.s[1], v3.s[0]
|
|
; CHECK-NEXT: stp d0, d2, [x0]
|
|
; CHECK-NEXT: ret
|
|
%dest1 = getelementptr inbounds i8, ptr %dest0, i64 4
|
|
%dest2 = getelementptr inbounds i8, ptr %dest1, i64 4
|
|
%dest3 = getelementptr inbounds i8, ptr %dest2, i64 4
|
|
%reduce0 = call float @llvm.aarch64.sve.faddv.nxv4f32(<vscale x 4 x i1> splat(i1 true), <vscale x 4 x float> %vec0)
|
|
%reduce1 = call float @llvm.aarch64.sve.faddv.nxv4f32(<vscale x 4 x i1> splat(i1 true), <vscale x 4 x float> %vec1)
|
|
%reduce2 = call float @llvm.aarch64.sve.faddv.nxv4f32(<vscale x 4 x i1> splat(i1 true), <vscale x 4 x float> %vec2)
|
|
%reduce3 = call float @llvm.aarch64.sve.faddv.nxv4f32(<vscale x 4 x i1> splat(i1 true), <vscale x 4 x float> %vec3)
|
|
store float %reduce0, ptr %dest0, align 4
|
|
store float %reduce1, ptr %dest1, align 4
|
|
store float %reduce2, ptr %dest2, align 4
|
|
store float %reduce3, ptr %dest3, align 4
|
|
ret void
|
|
}
|
|
|
|
define void @consecutive_stores_pair_streaming_function(ptr %dest0, <vscale x 4 x float> %vec0, <vscale x 4 x float> %vec1) "aarch64_pstate_sm_enabled" {
|
|
; CHECK-LABEL: consecutive_stores_pair_streaming_function:
|
|
; CHECK: // %bb.0:
|
|
; CHECK-NEXT: ptrue p0.s
|
|
; CHECK-NEXT: faddv s0, p0, z0.s
|
|
; CHECK-NEXT: faddv s1, p0, z1.s
|
|
; CHECK-NEXT: stp s0, s1, [x0]
|
|
; CHECK-NEXT: ret
|
|
%dest1 = getelementptr inbounds i8, ptr %dest0, i64 4
|
|
%reduce0 = call float @llvm.aarch64.sve.faddv.nxv4f32(<vscale x 4 x i1> splat(i1 true), <vscale x 4 x float> %vec0)
|
|
%reduce1 = call float @llvm.aarch64.sve.faddv.nxv4f32(<vscale x 4 x i1> splat(i1 true), <vscale x 4 x float> %vec1)
|
|
store float %reduce0, ptr %dest0, align 4
|
|
store float %reduce1, ptr %dest1, align 4
|
|
ret void
|
|
}
|
|
|
|
define void @consecutive_stores_quadruple_streaming_function(ptr %dest0, <vscale x 4 x float> %vec0, <vscale x 4 x float> %vec1, <vscale x 4 x float> %vec2, <vscale x 4 x float> %vec3) "aarch64_pstate_sm_enabled" {
|
|
; CHECK-LABEL: consecutive_stores_quadruple_streaming_function:
|
|
; CHECK: // %bb.0:
|
|
; CHECK-NEXT: ptrue p0.s
|
|
; CHECK-NEXT: faddv s0, p0, z0.s
|
|
; CHECK-NEXT: faddv s1, p0, z1.s
|
|
; CHECK-NEXT: faddv s2, p0, z2.s
|
|
; CHECK-NEXT: stp s0, s1, [x0]
|
|
; CHECK-NEXT: faddv s3, p0, z3.s
|
|
; CHECK-NEXT: stp s2, s3, [x0, #8]
|
|
; CHECK-NEXT: ret
|
|
%dest1 = getelementptr inbounds i8, ptr %dest0, i64 4
|
|
%dest2 = getelementptr inbounds i8, ptr %dest1, i64 4
|
|
%dest3 = getelementptr inbounds i8, ptr %dest2, i64 4
|
|
%reduce0 = call float @llvm.aarch64.sve.faddv.nxv4f32(<vscale x 4 x i1> splat(i1 true), <vscale x 4 x float> %vec0)
|
|
%reduce1 = call float @llvm.aarch64.sve.faddv.nxv4f32(<vscale x 4 x i1> splat(i1 true), <vscale x 4 x float> %vec1)
|
|
%reduce2 = call float @llvm.aarch64.sve.faddv.nxv4f32(<vscale x 4 x i1> splat(i1 true), <vscale x 4 x float> %vec2)
|
|
%reduce3 = call float @llvm.aarch64.sve.faddv.nxv4f32(<vscale x 4 x i1> splat(i1 true), <vscale x 4 x float> %vec3)
|
|
store float %reduce0, ptr %dest0, align 4
|
|
store float %reduce1, ptr %dest1, align 4
|
|
store float %reduce2, ptr %dest2, align 4
|
|
store float %reduce3, ptr %dest3, align 4
|
|
ret void
|
|
}
|