Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/AArch64/GlobalISel/select-splat-vector.ll
T
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

90 lines
3.1 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
; RUN: llc < %s -mtriple aarch64 -mattr=+sve -aarch64-enable-gisel-sve=1 | FileCheck %s --check-prefixes=CHECK,CHECK-SDAG
; RUN: llc < %s -mtriple aarch64 -mattr=+sve -aarch64-enable-gisel-sve=1 -use-constant-int-for-scalable-splat | FileCheck %s --check-prefixes=CHECK,CHECK-SDAG
; RUN: llc < %s -mtriple aarch64 -mattr=+sve -global-isel -aarch64-enable-gisel-sve=1 | FileCheck %s --check-prefixes=CHECK,CHECK-GS
; RUN: llc < %s -mtriple aarch64 -mattr=+sve -global-isel -aarch64-enable-gisel-sve=1 -use-constant-int-for-scalable-splat | FileCheck %s --check-prefixes=CHECK,CHECK-GS
;; add
define <vscale x 2 x i64> @addnxv2i64(<vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
; CHECK-SDAG-LABEL: addnxv2i64:
; CHECK-SDAG: // %bb.0: // %entry
; CHECK-SDAG-NEXT: add z0.d, z0.d, #9 // =0x9
; CHECK-SDAG-NEXT: ret
;
; CHECK-GS-LABEL: addnxv2i64:
; CHECK-GS: // %bb.0: // %entry
; CHECK-GS-NEXT: mov w8, #9 // =0x9
; CHECK-GS-NEXT: mov z1.d, x8
; CHECK-GS-NEXT: add z0.d, z0.d, z1.d
; CHECK-GS-NEXT: ret
entry:
%c = add <vscale x 2 x i64> %a, splat (i64 9)
ret <vscale x 2 x i64> %c
}
define <vscale x 2 x i64> @splarnxv2i64(<vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
; CHECK-SDAG-LABEL: splarnxv2i64:
; CHECK-SDAG: // %bb.0: // %entry
; CHECK-SDAG-NEXT: mov z0.d, #9 // =0x9
; CHECK-SDAG-NEXT: ret
;
; CHECK-GS-LABEL: splarnxv2i64:
; CHECK-GS: // %bb.0: // %entry
; CHECK-GS-NEXT: mov w8, #9 // =0x9
; CHECK-GS-NEXT: mov z0.d, x8
; CHECK-GS-NEXT: ret
entry:
ret <vscale x 2 x i64> splat (i64 9)
}
define <vscale x 4 x i32> @addnxv4i32(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
; CHECK-SDAG-LABEL: addnxv4i32:
; CHECK-SDAG: // %bb.0: // %entry
; CHECK-SDAG-NEXT: add z0.s, z0.s, #9 // =0x9
; CHECK-SDAG-NEXT: ret
;
; CHECK-GS-LABEL: addnxv4i32:
; CHECK-GS: // %bb.0: // %entry
; CHECK-GS-NEXT: mov w8, #9 // =0x9
; CHECK-GS-NEXT: mov z1.s, w8
; CHECK-GS-NEXT: add z0.s, z0.s, z1.s
; CHECK-GS-NEXT: ret
entry:
%c = add <vscale x 4 x i32> %a, splat (i32 9)
ret <vscale x 4 x i32> %c
}
define <vscale x 4 x i32> @splatnxv4i32(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
; CHECK-SDAG-LABEL: splatnxv4i32:
; CHECK-SDAG: // %bb.0: // %entry
; CHECK-SDAG-NEXT: mov z0.s, #9 // =0x9
; CHECK-SDAG-NEXT: ret
;
; CHECK-GS-LABEL: splatnxv4i32:
; CHECK-GS: // %bb.0: // %entry
; CHECK-GS-NEXT: mov w8, #9 // =0x9
; CHECK-GS-NEXT: mov z0.s, w8
; CHECK-GS-NEXT: ret
entry:
ret <vscale x 4 x i32> splat (i32 9)
}
define <vscale x 4 x float> @splatnxv4f32() {
; CHECK-SDAG-LABEL: splatnxv4f32:
; CHECK-SDAG: // %bb.0: // %entry
; CHECK-SDAG-NEXT: fmov z0.s, #1.00000000
; CHECK-SDAG-NEXT: ret
;
; CHECK-GS-LABEL: splatnxv4f32:
; CHECK-GS: // %bb.0: // %entry
; CHECK-GS-NEXT: fmov s0, #1.00000000
; CHECK-GS-NEXT: fmov w8, s0
; CHECK-GS-NEXT: mov z0.s, w8
; CHECK-GS-NEXT: ret
entry:
ret <vscale x 4 x float> splat (float 1.0)
}
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
; CHECK: {{.*}}