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
127 lines
4.5 KiB
LLVM
127 lines
4.5 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
|
|
; RUN: llc < %s -mtriple aarch64-unknown-unknown -aarch64-neon-syntax=apple -asm-verbose=false | FileCheck %s
|
|
|
|
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
|
|
|
|
; Test the (concat_vectors (bitcast (scalar)), ..) pattern.
|
|
|
|
define <8 x i8> @test_concat_scalar_v2i8_to_v8i8_dup(i32 %x) #0 {
|
|
; CHECK-LABEL: test_concat_scalar_v2i8_to_v8i8_dup:
|
|
; CHECK: dup.4h v0, w0
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%t = trunc i32 %x to i16
|
|
%0 = bitcast i16 %t to <2 x i8>
|
|
%1 = shufflevector <2 x i8> %0, <2 x i8> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
|
|
ret <8 x i8> %1
|
|
}
|
|
|
|
define <8 x i8> @test_concat_scalar_v4i8_to_v8i8_dup(i32 %x) #0 {
|
|
; CHECK-LABEL: test_concat_scalar_v4i8_to_v8i8_dup:
|
|
; CHECK: dup.2s v0, w0
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%0 = bitcast i32 %x to <4 x i8>
|
|
%1 = shufflevector <4 x i8> %0, <4 x i8> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
|
|
ret <8 x i8> %1
|
|
}
|
|
|
|
define <8 x i16> @test_concat_scalar_v2i16_to_v8i16_dup(i32 %x) #0 {
|
|
; CHECK-LABEL: test_concat_scalar_v2i16_to_v8i16_dup:
|
|
; CHECK: dup.4s v0, w0
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%0 = bitcast i32 %x to <2 x i16>
|
|
%1 = shufflevector <2 x i16> %0, <2 x i16> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 2, i32 0, i32 1, i32 0, i32 1>
|
|
ret <8 x i16> %1
|
|
}
|
|
|
|
define <8 x i8> @test_concat_scalars_2x_v2i8_to_v8i8(i32 %x, i32 %y) #0 {
|
|
; CHECK-LABEL: test_concat_scalars_2x_v2i8_to_v8i8:
|
|
; CHECK: fmov s0, w0
|
|
; CHECK-NEXT: mov.h v0[1], w1
|
|
; CHECK-NEXT: mov.h v0[3], w1
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%tx = trunc i32 %x to i16
|
|
%ty = trunc i32 %y to i16
|
|
%bx = bitcast i16 %tx to <2 x i8>
|
|
%by = bitcast i16 %ty to <2 x i8>
|
|
%r = shufflevector <2 x i8> %bx, <2 x i8> %by, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 2, i32 3>
|
|
ret <8 x i8> %r
|
|
}
|
|
|
|
define <8 x i8> @test_concat_scalars_2x_v4i8_to_v8i8_dup(i32 %x, i32 %y) #0 {
|
|
; CHECK-LABEL: test_concat_scalars_2x_v4i8_to_v8i8_dup:
|
|
; CHECK: fmov s0, w1
|
|
; CHECK-NEXT: mov.s v0[1], w0
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%bx = bitcast i32 %x to <4 x i8>
|
|
%by = bitcast i32 %y to <4 x i8>
|
|
%r = shufflevector <4 x i8> %bx, <4 x i8> %by, <8 x i32> <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
|
|
ret <8 x i8> %r
|
|
}
|
|
|
|
define <8 x i16> @test_concat_scalars_2x_v2i16_to_v8i16_dup(i32 %x, i32 %y) #0 {
|
|
; CHECK-LABEL: test_concat_scalars_2x_v2i16_to_v8i16_dup:
|
|
; CHECK: fmov s0, w0
|
|
; CHECK-NEXT: mov.s v0[1], w1
|
|
; CHECK-NEXT: mov.s v0[2], w1
|
|
; CHECK-NEXT: mov.s v0[3], w0
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%bx = bitcast i32 %x to <2 x i16>
|
|
%by = bitcast i32 %y to <2 x i16>
|
|
%r = shufflevector <2 x i16> %bx, <2 x i16> %by, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 2, i32 3, i32 0, i32 1>
|
|
ret <8 x i16> %r
|
|
}
|
|
|
|
; Also make sure we minimize bitcasts.
|
|
|
|
; This is a pretty artificial testcase: make sure we bitcast to floating-point
|
|
; if any of the scalars is floating-point.
|
|
define <8 x i8> @test_concat_scalars_mixed_2x_v2i8_to_v8i8(float %dummy, i32 %x, half %y) #0 {
|
|
; CHECK-LABEL: test_concat_scalars_mixed_2x_v2i8_to_v8i8:
|
|
; CHECK: fmov s2, w0
|
|
; CHECK-NEXT: mov.16b v0, v2
|
|
; CHECK-NEXT: mov.h v0[1], v1[0]
|
|
; CHECK-NEXT: mov.h v0[2], v2[0]
|
|
; CHECK-NEXT: mov.h v0[3], v1[0]
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%t = trunc i32 %x to i16
|
|
%0 = bitcast i16 %t to <2 x i8>
|
|
%y0 = bitcast half %y to <2 x i8>
|
|
%1 = shufflevector <2 x i8> %0, <2 x i8> %y0, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
|
|
ret <8 x i8> %1
|
|
}
|
|
|
|
define <2 x float> @test_concat_scalars_fp_2x_v2i8_to_v8i8(float %dummy, half %x, half %y) #0 {
|
|
; CHECK-LABEL: test_concat_scalars_fp_2x_v2i8_to_v8i8:
|
|
; CHECK: mov.16b v0, v1
|
|
; CHECK-NEXT: mov.h v0[1], v2[0]
|
|
; CHECK-NEXT: mov.h v0[2], v1[0]
|
|
; CHECK-NEXT: mov.h v0[3], v2[0]
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%0 = bitcast half %x to <2 x i8>
|
|
%y0 = bitcast half %y to <2 x i8>
|
|
%1 = shufflevector <2 x i8> %0, <2 x i8> %y0, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
|
|
%2 = bitcast <8 x i8> %1 to <2 x float>
|
|
ret <2 x float> %2
|
|
}
|
|
|
|
define <4 x float> @test_concat_scalar_fp_v2i16_to_v16i8_dup(float %x) #0 {
|
|
; CHECK-LABEL: test_concat_scalar_fp_v2i16_to_v16i8_dup:
|
|
; CHECK: dup.4s v0, v0[0]
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%0 = bitcast float %x to <2 x i16>
|
|
%1 = shufflevector <2 x i16> %0, <2 x i16> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 2, i32 0, i32 1, i32 0, i32 1>
|
|
%2 = bitcast <8 x i16> %1 to <4 x float>
|
|
ret <4 x float> %2
|
|
}
|
|
|
|
attributes #0 = { nounwind }
|