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
85 lines
2.6 KiB
LLVM
85 lines
2.6 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
|
|
; Test insertions of byte-swapped memory values into a nonzero index of an undef.
|
|
;
|
|
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z15 | FileCheck %s
|
|
|
|
declare i16 @llvm.bswap.i16(i16)
|
|
declare i32 @llvm.bswap.i32(i32)
|
|
declare i64 @llvm.bswap.i64(i64)
|
|
declare <8 x i16> @llvm.bswap.v8i16(<8 x i16>)
|
|
declare <4 x i32> @llvm.bswap.v4i32(<4 x i32>)
|
|
declare <2 x i64> @llvm.bswap.v2i64(<2 x i64>)
|
|
|
|
; Test v8i16 insertion into an undef, with an arbitrary index.
|
|
define <8 x i16> @f1(ptr %ptr) {
|
|
; CHECK-LABEL: f1:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: vlbrreph %v24, 0(%r2)
|
|
; CHECK-NEXT: br %r14
|
|
%val = load i16, ptr %ptr
|
|
%swap = call i16 @llvm.bswap.i16(i16 %val)
|
|
%ret = insertelement <8 x i16> undef, i16 %swap, i32 5
|
|
ret <8 x i16> %ret
|
|
}
|
|
|
|
; Test v8i16 insertion into an undef, using a vector bswap.
|
|
define <8 x i16> @f2(ptr %ptr) {
|
|
; CHECK-LABEL: f2:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: vlbrreph %v24, 0(%r2)
|
|
; CHECK-NEXT: br %r14
|
|
%val = load i16, ptr %ptr
|
|
%insert = insertelement <8 x i16> undef, i16 %val, i32 5
|
|
%ret = call <8 x i16> @llvm.bswap.v8i16(<8 x i16> %insert)
|
|
ret <8 x i16> %ret
|
|
}
|
|
|
|
; Test v4i32 insertion into an undef, with an arbitrary index.
|
|
define <4 x i32> @f3(ptr %ptr) {
|
|
; CHECK-LABEL: f3:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: vlbrrepf %v24, 0(%r2)
|
|
; CHECK-NEXT: br %r14
|
|
%val = load i32, ptr %ptr
|
|
%swap = call i32 @llvm.bswap.i32(i32 %val)
|
|
%ret = insertelement <4 x i32> undef, i32 %swap, i32 2
|
|
ret <4 x i32> %ret
|
|
}
|
|
|
|
; Test v4i32 insertion into an undef, using a vector bswap.
|
|
define <4 x i32> @f4(ptr %ptr) {
|
|
; CHECK-LABEL: f4:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: vlbrrepf %v24, 0(%r2)
|
|
; CHECK-NEXT: br %r14
|
|
%val = load i32, ptr %ptr
|
|
%insert = insertelement <4 x i32> undef, i32 %val, i32 2
|
|
%ret = call <4 x i32> @llvm.bswap.v4i32(<4 x i32> %insert)
|
|
ret <4 x i32> %ret
|
|
}
|
|
|
|
; Test v2i64 insertion into an undef, with an arbitrary index.
|
|
define <2 x i64> @f5(ptr %ptr) {
|
|
; CHECK-LABEL: f5:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: vlbrrepg %v24, 0(%r2)
|
|
; CHECK-NEXT: br %r14
|
|
%val = load i64, ptr %ptr
|
|
%swap = call i64 @llvm.bswap.i64(i64 %val)
|
|
%ret = insertelement <2 x i64> undef, i64 %swap, i32 1
|
|
ret <2 x i64> %ret
|
|
}
|
|
|
|
; Test v2i64 insertion into an undef, using a vector bwap.
|
|
define <2 x i64> @f6(ptr %ptr) {
|
|
; CHECK-LABEL: f6:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: vlbrrepg %v24, 0(%r2)
|
|
; CHECK-NEXT: br %r14
|
|
%val = load i64, ptr %ptr
|
|
%insert = insertelement <2 x i64> undef, i64 %val, i32 1
|
|
%ret = call <2 x i64> @llvm.bswap.v2i64(<2 x i64> %insert)
|
|
ret <2 x i64> %ret
|
|
}
|
|
|