Files
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

279 lines
11 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc -mattr=+sve2 < %s | FileCheck %s -check-prefixes=CHECK,SVE
; RUN: llc -mattr=+sve2p2 < %s | FileCheck %s -check-prefix CHECK-2p2
; RUN: llc -mattr=+sve,+sme2p2 < %s | FileCheck %s -check-prefix CHECK-2p2
; RUN: llc -mattr=+sme2 -force-streaming < %s | FileCheck %s -check-prefixes=CHECK,STREAMING-SVE
; RUN: llc -mattr=+sme2p2 -force-streaming < %s | FileCheck %s -check-prefix CHECK-2p2
; RUN: llc -mattr=+sme,+sve2p2 -force-streaming < %s | FileCheck %s -check-prefix CHECK-2p2
target triple = "aarch64-linux"
define <vscale x 8 x i16> @test_svlogb_f16_x_1(<vscale x 8 x i1> %pg, <vscale x 8 x half> %x) {
; CHECK-LABEL: test_svlogb_f16_x_1:
; CHECK: // %bb.0: // %entry
; CHECK-NEXT: flogb z0.h, p0/m, z0.h
; CHECK-NEXT: ret
;
; CHECK-2p2-LABEL: test_svlogb_f16_x_1:
; CHECK-2p2: // %bb.0: // %entry
; CHECK-2p2-NEXT: flogb z0.h, p0/z, z0.h
; CHECK-2p2-NEXT: ret
entry:
%0 = tail call <vscale x 8 x i16> @llvm.aarch64.sve.flogb.nxv8f16(<vscale x 8 x i16> poison, <vscale x 8 x i1> %pg, <vscale x 8 x half> %x)
ret <vscale x 8 x i16> %0
}
define <vscale x 8 x i16> @test_svlogb_f16_x_2(<vscale x 8 x i1> %pg, double %z0, <vscale x 8 x half> %x) {
; CHECK-LABEL: test_svlogb_f16_x_2:
; CHECK: // %bb.0: // %entry
; CHECK-NEXT: flogb z0.h, p0/m, z1.h
; CHECK-NEXT: ret
;
; CHECK-2p2-LABEL: test_svlogb_f16_x_2:
; CHECK-2p2: // %bb.0: // %entry
; CHECK-2p2-NEXT: flogb z0.h, p0/z, z1.h
; CHECK-2p2-NEXT: ret
entry:
%0 = tail call <vscale x 8 x i16> @llvm.aarch64.sve.flogb.nxv8f16(<vscale x 8 x i16> poison, <vscale x 8 x i1> %pg, <vscale x 8 x half> %x)
ret <vscale x 8 x i16> %0
}
define <vscale x 8 x i16> @test_svlogb_f16_z(<vscale x 8 x i1> %pg, double %z0, <vscale x 8 x half> %x) {
; SVE-LABEL: test_svlogb_f16_z:
; SVE: // %bb.0: // %entry
; SVE-NEXT: movi v0.2d, #0000000000000000
; SVE-NEXT: flogb z0.h, p0/m, z1.h
; SVE-NEXT: ret
;
; CHECK-2p2-LABEL: test_svlogb_f16_z:
; CHECK-2p2: // %bb.0: // %entry
; CHECK-2p2-NEXT: flogb z0.h, p0/z, z1.h
; CHECK-2p2-NEXT: ret
;
; STREAMING-SVE-LABEL: test_svlogb_f16_z:
; STREAMING-SVE: // %bb.0: // %entry
; STREAMING-SVE-NEXT: mov z0.h, #0 // =0x0
; STREAMING-SVE-NEXT: flogb z0.h, p0/m, z1.h
; STREAMING-SVE-NEXT: ret
entry:
%0 = tail call <vscale x 8 x i16> @llvm.aarch64.sve.flogb.nxv8f16(<vscale x 8 x i16> zeroinitializer, <vscale x 8 x i1> %pg, <vscale x 8 x half> %x)
ret <vscale x 8 x i16> %0
}
define <vscale x 4 x i32> @test_svlogb_f32_x_1(<vscale x 4 x i1> %pg, <vscale x 4 x float> %x) {
; CHECK-LABEL: test_svlogb_f32_x_1:
; CHECK: // %bb.0: // %entry
; CHECK-NEXT: flogb z0.s, p0/m, z0.s
; CHECK-NEXT: ret
;
; CHECK-2p2-LABEL: test_svlogb_f32_x_1:
; CHECK-2p2: // %bb.0: // %entry
; CHECK-2p2-NEXT: flogb z0.s, p0/z, z0.s
; CHECK-2p2-NEXT: ret
entry:
%0 = tail call <vscale x 4 x i32> @llvm.aarch64.sve.flogb.nxv4f32(<vscale x 4 x i32> poison, <vscale x 4 x i1> %pg, <vscale x 4 x float> %x)
ret <vscale x 4 x i32> %0
}
define <vscale x 4 x i32> @test_svlogb_f32_x_2(<vscale x 4 x i1> %pg, double %z0, <vscale x 4 x float> %x) {
; CHECK-LABEL: test_svlogb_f32_x_2:
; CHECK: // %bb.0: // %entry
; CHECK-NEXT: flogb z0.s, p0/m, z1.s
; CHECK-NEXT: ret
;
; CHECK-2p2-LABEL: test_svlogb_f32_x_2:
; CHECK-2p2: // %bb.0: // %entry
; CHECK-2p2-NEXT: flogb z0.s, p0/z, z1.s
; CHECK-2p2-NEXT: ret
entry:
%0 = tail call <vscale x 4 x i32> @llvm.aarch64.sve.flogb.nxv4f32(<vscale x 4 x i32> poison, <vscale x 4 x i1> %pg, <vscale x 4 x float> %x)
ret <vscale x 4 x i32> %0
}
define <vscale x 4 x i32> @test_svlogb_f32_z(<vscale x 4 x i1> %pg, double %z0, <vscale x 4 x float> %x) {
; SVE-LABEL: test_svlogb_f32_z:
; SVE: // %bb.0: // %entry
; SVE-NEXT: movi v0.2d, #0000000000000000
; SVE-NEXT: flogb z0.s, p0/m, z1.s
; SVE-NEXT: ret
;
; CHECK-2p2-LABEL: test_svlogb_f32_z:
; CHECK-2p2: // %bb.0: // %entry
; CHECK-2p2-NEXT: flogb z0.s, p0/z, z1.s
; CHECK-2p2-NEXT: ret
;
; STREAMING-SVE-LABEL: test_svlogb_f32_z:
; STREAMING-SVE: // %bb.0: // %entry
; STREAMING-SVE-NEXT: mov z0.s, #0 // =0x0
; STREAMING-SVE-NEXT: flogb z0.s, p0/m, z1.s
; STREAMING-SVE-NEXT: ret
entry:
%0 = tail call <vscale x 4 x i32> @llvm.aarch64.sve.flogb.nxv4f32(<vscale x 4 x i32> zeroinitializer, <vscale x 4 x i1> %pg, <vscale x 4 x float> %x)
ret <vscale x 4 x i32> %0
}
define <vscale x 2 x i64> @test_svlogb_f64_x_1(<vscale x 2 x i1> %pg, <vscale x 2 x double> %x) {
; CHECK-LABEL: test_svlogb_f64_x_1:
; CHECK: // %bb.0: // %entry
; CHECK-NEXT: flogb z0.d, p0/m, z0.d
; CHECK-NEXT: ret
;
; CHECK-2p2-LABEL: test_svlogb_f64_x_1:
; CHECK-2p2: // %bb.0: // %entry
; CHECK-2p2-NEXT: flogb z0.d, p0/z, z0.d
; CHECK-2p2-NEXT: ret
entry:
%0 = tail call <vscale x 2 x i64> @llvm.aarch64.sve.flogb.nxv2f64(<vscale x 2 x i64> poison, <vscale x 2 x i1> %pg, <vscale x 2 x double> %x)
ret <vscale x 2 x i64> %0
}
define <vscale x 2 x i64> @test_svlogb_f64_x_2(<vscale x 2 x i1> %pg, double %z0, <vscale x 2 x double> %x) {
; CHECK-LABEL: test_svlogb_f64_x_2:
; CHECK: // %bb.0: // %entry
; CHECK-NEXT: flogb z0.d, p0/m, z1.d
; CHECK-NEXT: ret
;
; CHECK-2p2-LABEL: test_svlogb_f64_x_2:
; CHECK-2p2: // %bb.0: // %entry
; CHECK-2p2-NEXT: flogb z0.d, p0/z, z1.d
; CHECK-2p2-NEXT: ret
entry:
%0 = tail call <vscale x 2 x i64> @llvm.aarch64.sve.flogb.nxv2f64(<vscale x 2 x i64> poison, <vscale x 2 x i1> %pg, <vscale x 2 x double> %x)
ret <vscale x 2 x i64> %0
}
define <vscale x 2 x i64> @test_svlogb_f64_z(<vscale x 2 x i1> %pg, double %z0, <vscale x 2 x double> %x) {
; SVE-LABEL: test_svlogb_f64_z:
; SVE: // %bb.0: // %entry
; SVE-NEXT: movi v0.2d, #0000000000000000
; SVE-NEXT: flogb z0.d, p0/m, z1.d
; SVE-NEXT: ret
;
; CHECK-2p2-LABEL: test_svlogb_f64_z:
; CHECK-2p2: // %bb.0: // %entry
; CHECK-2p2-NEXT: flogb z0.d, p0/z, z1.d
; CHECK-2p2-NEXT: ret
;
; STREAMING-SVE-LABEL: test_svlogb_f64_z:
; STREAMING-SVE: // %bb.0: // %entry
; STREAMING-SVE-NEXT: mov z0.d, #0 // =0x0
; STREAMING-SVE-NEXT: flogb z0.d, p0/m, z1.d
; STREAMING-SVE-NEXT: ret
entry:
%0 = tail call <vscale x 2 x i64> @llvm.aarch64.sve.flogb.nxv2f64(<vscale x 2 x i64> zeroinitializer, <vscale x 2 x i1> %pg, <vscale x 2 x double> %x)
ret <vscale x 2 x i64> %0
}
define <vscale x 8 x i16> @test_svlogb_nxv8f16_ptrue_u(double %z0, <vscale x 8 x half> %x) {
; CHECK-LABEL: test_svlogb_nxv8f16_ptrue_u:
; CHECK: // %bb.0: // %entry
; CHECK-NEXT: ptrue p0.h
; CHECK-NEXT: flogb z0.h, p0/m, z1.h
; CHECK-NEXT: ret
;
; CHECK-2p2-LABEL: test_svlogb_nxv8f16_ptrue_u:
; CHECK-2p2: // %bb.0: // %entry
; CHECK-2p2-NEXT: ptrue p0.h
; CHECK-2p2-NEXT: flogb z0.h, p0/z, z1.h
; CHECK-2p2-NEXT: ret
entry:
%pg = call <vscale x 8 x i1> @llvm.aarch64.sve.ptrue.nxv8i1(i32 31)
%0 = tail call <vscale x 8 x i16> @llvm.aarch64.sve.flogb.nxv8f16(<vscale x 8 x i16> poison, <vscale x 8 x i1> %pg, <vscale x 8 x half> %x)
ret <vscale x 8 x i16> %0
}
define <vscale x 8 x i16> @test_svlogb_nxv8f16_ptrue(double %z0, <vscale x 8 x i16> %x, <vscale x 8 x half> %y) {
; CHECK-LABEL: test_svlogb_nxv8f16_ptrue:
; CHECK: // %bb.0: // %entry
; CHECK-NEXT: mov z0.d, z1.d
; CHECK-NEXT: ptrue p0.h
; CHECK-NEXT: flogb z0.h, p0/m, z2.h
; CHECK-NEXT: ret
;
; CHECK-2p2-LABEL: test_svlogb_nxv8f16_ptrue:
; CHECK-2p2: // %bb.0: // %entry
; CHECK-2p2-NEXT: ptrue p0.h
; CHECK-2p2-NEXT: flogb z0.h, p0/z, z2.h
; CHECK-2p2-NEXT: ret
entry:
%pg = call <vscale x 8 x i1> @llvm.aarch64.sve.ptrue.nxv8i1(i32 31)
%0 = tail call <vscale x 8 x i16> @llvm.aarch64.sve.flogb.nxv8f16(<vscale x 8 x i16> %x, <vscale x 8 x i1> %pg, <vscale x 8 x half> %y)
ret <vscale x 8 x i16> %0
}
define <vscale x 4 x i32> @test_svlogb_nxv4f32_ptrue_u(double %z0, <vscale x 4 x float> %x) {
; CHECK-LABEL: test_svlogb_nxv4f32_ptrue_u:
; CHECK: // %bb.0: // %entry
; CHECK-NEXT: ptrue p0.s
; CHECK-NEXT: flogb z0.s, p0/m, z1.s
; CHECK-NEXT: ret
;
; CHECK-2p2-LABEL: test_svlogb_nxv4f32_ptrue_u:
; CHECK-2p2: // %bb.0: // %entry
; CHECK-2p2-NEXT: ptrue p0.s
; CHECK-2p2-NEXT: flogb z0.s, p0/z, z1.s
; CHECK-2p2-NEXT: ret
entry:
%pg = call <vscale x 4 x i1> @llvm.aarch64.sve.ptrue.nxv4i1(i32 31)
%0 = tail call <vscale x 4 x i32> @llvm.aarch64.sve.flogb.nxv4f32(<vscale x 4 x i32> poison, <vscale x 4 x i1> %pg, <vscale x 4 x float> %x)
ret <vscale x 4 x i32> %0
}
define <vscale x 4 x i32> @test_svlogb_nxv4f32_ptrue(double %z0, <vscale x 4 x i32> %x, <vscale x 4 x float> %y) {
; CHECK-LABEL: test_svlogb_nxv4f32_ptrue:
; CHECK: // %bb.0: // %entry
; CHECK-NEXT: mov z0.d, z1.d
; CHECK-NEXT: ptrue p0.s
; CHECK-NEXT: flogb z0.s, p0/m, z2.s
; CHECK-NEXT: ret
;
; CHECK-2p2-LABEL: test_svlogb_nxv4f32_ptrue:
; CHECK-2p2: // %bb.0: // %entry
; CHECK-2p2-NEXT: ptrue p0.s
; CHECK-2p2-NEXT: flogb z0.s, p0/z, z2.s
; CHECK-2p2-NEXT: ret
entry:
%pg = call <vscale x 4 x i1> @llvm.aarch64.sve.ptrue.nxv4i1(i32 31)
%0 = tail call <vscale x 4 x i32> @llvm.aarch64.sve.flogb.nxv4f32(<vscale x 4 x i32> %x, <vscale x 4 x i1> %pg, <vscale x 4 x float> %y)
ret <vscale x 4 x i32> %0
}
define <vscale x 2 x i64> @test_svlogb_nxv2f64_ptrue_u(double %z0, <vscale x 2 x double> %x) {
; CHECK-LABEL: test_svlogb_nxv2f64_ptrue_u:
; CHECK: // %bb.0: // %entry
; CHECK-NEXT: ptrue p0.d
; CHECK-NEXT: flogb z0.d, p0/m, z1.d
; CHECK-NEXT: ret
;
; CHECK-2p2-LABEL: test_svlogb_nxv2f64_ptrue_u:
; CHECK-2p2: // %bb.0: // %entry
; CHECK-2p2-NEXT: ptrue p0.d
; CHECK-2p2-NEXT: flogb z0.d, p0/z, z1.d
; CHECK-2p2-NEXT: ret
entry:
%pg = call <vscale x 2 x i1> @llvm.aarch64.sve.ptrue.nxv2i1(i32 31)
%0 = tail call <vscale x 2 x i64> @llvm.aarch64.sve.flogb.nxv2f64(<vscale x 2 x i64> poison, <vscale x 2 x i1> %pg, <vscale x 2 x double> %x)
ret <vscale x 2 x i64> %0
}
define <vscale x 2 x i64> @test_svlogb_nxv2f64_ptrue(double %z0, <vscale x 2 x i64> %x, <vscale x 2 x double> %y) {
; CHECK-LABEL: test_svlogb_nxv2f64_ptrue:
; CHECK: // %bb.0: // %entry
; CHECK-NEXT: mov z0.d, z1.d
; CHECK-NEXT: ptrue p0.d
; CHECK-NEXT: flogb z0.d, p0/m, z2.d
; CHECK-NEXT: ret
;
; CHECK-2p2-LABEL: test_svlogb_nxv2f64_ptrue:
; CHECK-2p2: // %bb.0: // %entry
; CHECK-2p2-NEXT: ptrue p0.d
; CHECK-2p2-NEXT: flogb z0.d, p0/z, z2.d
; CHECK-2p2-NEXT: ret
entry:
%pg = call <vscale x 2 x i1> @llvm.aarch64.sve.ptrue.nxv2i1(i32 31)
%0 = tail call <vscale x 2 x i64> @llvm.aarch64.sve.flogb.nxv2f64(<vscale x 2 x i64> %x, <vscale x 2 x i1> %pg, <vscale x 2 x double> %y)
ret <vscale x 2 x i64> %0
}