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
414 lines
22 KiB
C
414 lines
22 KiB
C
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5
|
|
// RUN: %clang_cc1 -triple aarch64 -target-feature +neon -target-feature +bf16 \
|
|
// RUN: -disable-O0-optnone -emit-llvm -o - %s \
|
|
// RUN: | opt -S -passes=mem2reg,sroa \
|
|
// RUN: | FileCheck %s
|
|
|
|
// REQUIRES: aarch64-registered-target
|
|
|
|
#include <arm_neon.h>
|
|
|
|
// CHECK-LABEL: define dso_local <4 x bfloat> @test_vreinterpret_bf16_s8(
|
|
// CHECK-SAME: <8 x i8> noundef [[A:%.*]]) #[[ATTR0:[0-9]+]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x i8> [[A]] to <4 x i16>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <4 x bfloat>
|
|
// CHECK-NEXT: ret <4 x bfloat> [[TMP1]]
|
|
//
|
|
bfloat16x4_t test_vreinterpret_bf16_s8(int8x8_t a) { return vreinterpret_bf16_s8(a); }
|
|
// CHECK-LABEL: define dso_local <4 x bfloat> @test_vreinterpret_bf16_s16(
|
|
// CHECK-SAME: <4 x i16> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x i16> [[A]] to <4 x bfloat>
|
|
// CHECK-NEXT: ret <4 x bfloat> [[TMP0]]
|
|
//
|
|
bfloat16x4_t test_vreinterpret_bf16_s16(int16x4_t a) { return vreinterpret_bf16_s16(a); }
|
|
// CHECK-LABEL: define dso_local <4 x bfloat> @test_vreinterpret_bf16_s32(
|
|
// CHECK-SAME: <2 x i32> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <2 x i32> [[A]] to <4 x bfloat>
|
|
// CHECK-NEXT: ret <4 x bfloat> [[TMP0]]
|
|
//
|
|
bfloat16x4_t test_vreinterpret_bf16_s32(int32x2_t a) { return vreinterpret_bf16_s32(a); }
|
|
// CHECK-LABEL: define dso_local <4 x bfloat> @test_vreinterpret_bf16_f32(
|
|
// CHECK-SAME: <2 x float> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <2 x float> [[A]] to <2 x i32>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <2 x i32> [[TMP0]] to <4 x bfloat>
|
|
// CHECK-NEXT: ret <4 x bfloat> [[TMP1]]
|
|
//
|
|
bfloat16x4_t test_vreinterpret_bf16_f32(float32x2_t a) { return vreinterpret_bf16_f32(a); }
|
|
// CHECK-LABEL: define dso_local <4 x bfloat> @test_vreinterpret_bf16_u8(
|
|
// CHECK-SAME: <8 x i8> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x i8> [[A]] to <4 x i16>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <4 x bfloat>
|
|
// CHECK-NEXT: ret <4 x bfloat> [[TMP1]]
|
|
//
|
|
bfloat16x4_t test_vreinterpret_bf16_u8(uint8x8_t a) { return vreinterpret_bf16_u8(a); }
|
|
// CHECK-LABEL: define dso_local <4 x bfloat> @test_vreinterpret_bf16_u16(
|
|
// CHECK-SAME: <4 x i16> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x i16> [[A]] to <4 x bfloat>
|
|
// CHECK-NEXT: ret <4 x bfloat> [[TMP0]]
|
|
//
|
|
bfloat16x4_t test_vreinterpret_bf16_u16(uint16x4_t a) { return vreinterpret_bf16_u16(a); }
|
|
// CHECK-LABEL: define dso_local <4 x bfloat> @test_vreinterpret_bf16_u32(
|
|
// CHECK-SAME: <2 x i32> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <2 x i32> [[A]] to <4 x bfloat>
|
|
// CHECK-NEXT: ret <4 x bfloat> [[TMP0]]
|
|
//
|
|
bfloat16x4_t test_vreinterpret_bf16_u32(uint32x2_t a) { return vreinterpret_bf16_u32(a); }
|
|
// CHECK-LABEL: define dso_local <4 x bfloat> @test_vreinterpret_bf16_p8(
|
|
// CHECK-SAME: <8 x i8> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x i8> [[A]] to <4 x i16>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <4 x bfloat>
|
|
// CHECK-NEXT: ret <4 x bfloat> [[TMP1]]
|
|
//
|
|
bfloat16x4_t test_vreinterpret_bf16_p8(poly8x8_t a) { return vreinterpret_bf16_p8(a); }
|
|
// CHECK-LABEL: define dso_local <4 x bfloat> @test_vreinterpret_bf16_p16(
|
|
// CHECK-SAME: <4 x i16> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x i16> [[A]] to <4 x bfloat>
|
|
// CHECK-NEXT: ret <4 x bfloat> [[TMP0]]
|
|
//
|
|
bfloat16x4_t test_vreinterpret_bf16_p16(poly16x4_t a) { return vreinterpret_bf16_p16(a); }
|
|
// CHECK-LABEL: define dso_local <4 x bfloat> @test_vreinterpret_bf16_u64(
|
|
// CHECK-SAME: <1 x i64> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <1 x i64> [[A]] to <4 x bfloat>
|
|
// CHECK-NEXT: ret <4 x bfloat> [[TMP0]]
|
|
//
|
|
bfloat16x4_t test_vreinterpret_bf16_u64(uint64x1_t a) { return vreinterpret_bf16_u64(a); }
|
|
// CHECK-LABEL: define dso_local <4 x bfloat> @test_vreinterpret_bf16_s64(
|
|
// CHECK-SAME: <1 x i64> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <1 x i64> [[A]] to <4 x bfloat>
|
|
// CHECK-NEXT: ret <4 x bfloat> [[TMP0]]
|
|
//
|
|
bfloat16x4_t test_vreinterpret_bf16_s64(int64x1_t a) { return vreinterpret_bf16_s64(a); }
|
|
// CHECK-LABEL: define dso_local <8 x bfloat> @test_vreinterpretq_bf16_s8(
|
|
// CHECK-SAME: <16 x i8> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <16 x i8> [[A]] to <8 x i16>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <8 x bfloat>
|
|
// CHECK-NEXT: ret <8 x bfloat> [[TMP1]]
|
|
//
|
|
bfloat16x8_t test_vreinterpretq_bf16_s8(int8x16_t a) { return vreinterpretq_bf16_s8(a); }
|
|
// CHECK-LABEL: define dso_local <8 x bfloat> @test_vreinterpretq_bf16_s16(
|
|
// CHECK-SAME: <8 x i16> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x i16> [[A]] to <8 x bfloat>
|
|
// CHECK-NEXT: ret <8 x bfloat> [[TMP0]]
|
|
//
|
|
bfloat16x8_t test_vreinterpretq_bf16_s16(int16x8_t a) { return vreinterpretq_bf16_s16(a); }
|
|
// CHECK-LABEL: define dso_local <8 x bfloat> @test_vreinterpretq_bf16_s32(
|
|
// CHECK-SAME: <4 x i32> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x i32> [[A]] to <8 x bfloat>
|
|
// CHECK-NEXT: ret <8 x bfloat> [[TMP0]]
|
|
//
|
|
bfloat16x8_t test_vreinterpretq_bf16_s32(int32x4_t a) { return vreinterpretq_bf16_s32(a); }
|
|
// CHECK-LABEL: define dso_local <8 x bfloat> @test_vreinterpretq_bf16_f32(
|
|
// CHECK-SAME: <4 x float> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x float> [[A]] to <4 x i32>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i32> [[TMP0]] to <8 x bfloat>
|
|
// CHECK-NEXT: ret <8 x bfloat> [[TMP1]]
|
|
//
|
|
bfloat16x8_t test_vreinterpretq_bf16_f32(float32x4_t a) { return vreinterpretq_bf16_f32(a); }
|
|
// CHECK-LABEL: define dso_local <8 x bfloat> @test_vreinterpretq_bf16_u8(
|
|
// CHECK-SAME: <16 x i8> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <16 x i8> [[A]] to <8 x i16>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <8 x bfloat>
|
|
// CHECK-NEXT: ret <8 x bfloat> [[TMP1]]
|
|
//
|
|
bfloat16x8_t test_vreinterpretq_bf16_u8(uint8x16_t a) { return vreinterpretq_bf16_u8(a); }
|
|
// CHECK-LABEL: define dso_local <8 x bfloat> @test_vreinterpretq_bf16_u16(
|
|
// CHECK-SAME: <8 x i16> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x i16> [[A]] to <8 x bfloat>
|
|
// CHECK-NEXT: ret <8 x bfloat> [[TMP0]]
|
|
//
|
|
bfloat16x8_t test_vreinterpretq_bf16_u16(uint16x8_t a) { return vreinterpretq_bf16_u16(a); }
|
|
// CHECK-LABEL: define dso_local <8 x bfloat> @test_vreinterpretq_bf16_u32(
|
|
// CHECK-SAME: <4 x i32> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x i32> [[A]] to <8 x bfloat>
|
|
// CHECK-NEXT: ret <8 x bfloat> [[TMP0]]
|
|
//
|
|
bfloat16x8_t test_vreinterpretq_bf16_u32(uint32x4_t a) { return vreinterpretq_bf16_u32(a); }
|
|
// CHECK-LABEL: define dso_local <8 x bfloat> @test_vreinterpretq_bf16_p8(
|
|
// CHECK-SAME: <16 x i8> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <16 x i8> [[A]] to <8 x i16>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <8 x bfloat>
|
|
// CHECK-NEXT: ret <8 x bfloat> [[TMP1]]
|
|
//
|
|
bfloat16x8_t test_vreinterpretq_bf16_p8(poly8x16_t a) { return vreinterpretq_bf16_p8(a); }
|
|
// CHECK-LABEL: define dso_local <8 x bfloat> @test_vreinterpretq_bf16_p16(
|
|
// CHECK-SAME: <8 x i16> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x i16> [[A]] to <8 x bfloat>
|
|
// CHECK-NEXT: ret <8 x bfloat> [[TMP0]]
|
|
//
|
|
bfloat16x8_t test_vreinterpretq_bf16_p16(poly16x8_t a) { return vreinterpretq_bf16_p16(a); }
|
|
// CHECK-LABEL: define dso_local <8 x bfloat> @test_vreinterpretq_bf16_u64(
|
|
// CHECK-SAME: <2 x i64> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <2 x i64> [[A]] to <8 x bfloat>
|
|
// CHECK-NEXT: ret <8 x bfloat> [[TMP0]]
|
|
//
|
|
bfloat16x8_t test_vreinterpretq_bf16_u64(uint64x2_t a) { return vreinterpretq_bf16_u64(a); }
|
|
// CHECK-LABEL: define dso_local <8 x bfloat> @test_vreinterpretq_bf16_s64(
|
|
// CHECK-SAME: <2 x i64> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <2 x i64> [[A]] to <8 x bfloat>
|
|
// CHECK-NEXT: ret <8 x bfloat> [[TMP0]]
|
|
//
|
|
bfloat16x8_t test_vreinterpretq_bf16_s64(int64x2_t a) { return vreinterpretq_bf16_s64(a); }
|
|
// CHECK-LABEL: define dso_local <4 x bfloat> @test_vreinterpret_bf16_p64(
|
|
// CHECK-SAME: <1 x i64> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <1 x i64> [[A]] to <4 x bfloat>
|
|
// CHECK-NEXT: ret <4 x bfloat> [[TMP0]]
|
|
//
|
|
bfloat16x4_t test_vreinterpret_bf16_p64(poly64x1_t a) { return vreinterpret_bf16_p64(a); }
|
|
// CHECK-LABEL: define dso_local <8 x bfloat> @test_vreinterpretq_bf16_p64(
|
|
// CHECK-SAME: <2 x i64> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <2 x i64> [[A]] to <8 x bfloat>
|
|
// CHECK-NEXT: ret <8 x bfloat> [[TMP0]]
|
|
//
|
|
bfloat16x8_t test_vreinterpretq_bf16_p64(poly64x2_t a) { return vreinterpretq_bf16_p64(a); }
|
|
// CHECK-LABEL: define dso_local <8 x bfloat> @test_vreinterpretq_bf16_p128(
|
|
// CHECK-SAME: i128 noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast i128 [[A]] to <8 x bfloat>
|
|
// CHECK-NEXT: ret <8 x bfloat> [[TMP0]]
|
|
//
|
|
bfloat16x8_t test_vreinterpretq_bf16_p128(poly128_t a) { return vreinterpretq_bf16_p128(a); }
|
|
// CHECK-LABEL: define dso_local <4 x bfloat> @test_vreinterpret_bf16_f64(
|
|
// CHECK-SAME: <1 x double> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <1 x double> [[A]] to i64
|
|
// CHECK-NEXT: [[__P0_ADDR_I_SROA_0_0_VEC_INSERT:%.*]] = insertelement <1 x i64> undef, i64 [[TMP0]], i32 0
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <1 x i64> [[__P0_ADDR_I_SROA_0_0_VEC_INSERT]] to <4 x bfloat>
|
|
// CHECK-NEXT: ret <4 x bfloat> [[TMP1]]
|
|
//
|
|
bfloat16x4_t test_vreinterpret_bf16_f64(float64x1_t a) { return vreinterpret_bf16_f64(a); }
|
|
// CHECK-LABEL: define dso_local <8 x bfloat> @test_vreinterpretq_bf16_f64(
|
|
// CHECK-SAME: <2 x double> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <2 x double> [[A]] to <2 x i64>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <2 x i64> [[TMP0]] to <8 x bfloat>
|
|
// CHECK-NEXT: ret <8 x bfloat> [[TMP1]]
|
|
//
|
|
bfloat16x8_t test_vreinterpretq_bf16_f64(float64x2_t a) { return vreinterpretq_bf16_f64(a); }
|
|
// CHECK-LABEL: define dso_local <8 x i8> @test_vreinterpret_s8_bf16(
|
|
// CHECK-SAME: <4 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x bfloat> [[A]] to <4 x i16>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>
|
|
// CHECK-NEXT: ret <8 x i8> [[TMP1]]
|
|
//
|
|
int8x8_t test_vreinterpret_s8_bf16(bfloat16x4_t a) { return vreinterpret_s8_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <4 x i16> @test_vreinterpret_s16_bf16(
|
|
// CHECK-SAME: <4 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x bfloat> [[A]] to <4 x i16>
|
|
// CHECK-NEXT: ret <4 x i16> [[TMP0]]
|
|
//
|
|
int16x4_t test_vreinterpret_s16_bf16(bfloat16x4_t a) { return vreinterpret_s16_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <2 x i32> @test_vreinterpret_s32_bf16(
|
|
// CHECK-SAME: <4 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x bfloat> [[A]] to <2 x i32>
|
|
// CHECK-NEXT: ret <2 x i32> [[TMP0]]
|
|
//
|
|
int32x2_t test_vreinterpret_s32_bf16(bfloat16x4_t a) { return vreinterpret_s32_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <2 x float> @test_vreinterpret_f32_bf16(
|
|
// CHECK-SAME: <4 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x bfloat> [[A]] to <2 x i32>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <2 x i32> [[TMP0]] to <2 x float>
|
|
// CHECK-NEXT: ret <2 x float> [[TMP1]]
|
|
//
|
|
float32x2_t test_vreinterpret_f32_bf16(bfloat16x4_t a) { return vreinterpret_f32_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <8 x i8> @test_vreinterpret_u8_bf16(
|
|
// CHECK-SAME: <4 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x bfloat> [[A]] to <4 x i16>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>
|
|
// CHECK-NEXT: ret <8 x i8> [[TMP1]]
|
|
//
|
|
uint8x8_t test_vreinterpret_u8_bf16(bfloat16x4_t a) { return vreinterpret_u8_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <4 x i16> @test_vreinterpret_u16_bf16(
|
|
// CHECK-SAME: <4 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x bfloat> [[A]] to <4 x i16>
|
|
// CHECK-NEXT: ret <4 x i16> [[TMP0]]
|
|
//
|
|
uint16x4_t test_vreinterpret_u16_bf16(bfloat16x4_t a) { return vreinterpret_u16_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <2 x i32> @test_vreinterpret_u32_bf16(
|
|
// CHECK-SAME: <4 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x bfloat> [[A]] to <2 x i32>
|
|
// CHECK-NEXT: ret <2 x i32> [[TMP0]]
|
|
//
|
|
uint32x2_t test_vreinterpret_u32_bf16(bfloat16x4_t a) { return vreinterpret_u32_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <8 x i8> @test_vreinterpret_p8_bf16(
|
|
// CHECK-SAME: <4 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x bfloat> [[A]] to <4 x i16>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>
|
|
// CHECK-NEXT: ret <8 x i8> [[TMP1]]
|
|
//
|
|
poly8x8_t test_vreinterpret_p8_bf16(bfloat16x4_t a) { return vreinterpret_p8_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <4 x i16> @test_vreinterpret_p16_bf16(
|
|
// CHECK-SAME: <4 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x bfloat> [[A]] to <4 x i16>
|
|
// CHECK-NEXT: ret <4 x i16> [[TMP0]]
|
|
//
|
|
poly16x4_t test_vreinterpret_p16_bf16(bfloat16x4_t a) { return vreinterpret_p16_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <1 x i64> @test_vreinterpret_u64_bf16(
|
|
// CHECK-SAME: <4 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x bfloat> [[A]] to i64
|
|
// CHECK-NEXT: [[__P0_ADDR_I_SROA_0_0_VEC_INSERT:%.*]] = insertelement <1 x i64> undef, i64 [[TMP0]], i32 0
|
|
// CHECK-NEXT: ret <1 x i64> [[__P0_ADDR_I_SROA_0_0_VEC_INSERT]]
|
|
//
|
|
uint64x1_t test_vreinterpret_u64_bf16(bfloat16x4_t a) { return vreinterpret_u64_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <1 x i64> @test_vreinterpret_s64_bf16(
|
|
// CHECK-SAME: <4 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x bfloat> [[A]] to i64
|
|
// CHECK-NEXT: [[__P0_ADDR_I_SROA_0_0_VEC_INSERT:%.*]] = insertelement <1 x i64> undef, i64 [[TMP0]], i32 0
|
|
// CHECK-NEXT: ret <1 x i64> [[__P0_ADDR_I_SROA_0_0_VEC_INSERT]]
|
|
//
|
|
int64x1_t test_vreinterpret_s64_bf16(bfloat16x4_t a) { return vreinterpret_s64_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <1 x i64> @test_vreinterpret_p64_bf16(
|
|
// CHECK-SAME: <4 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x bfloat> [[A]] to i64
|
|
// CHECK-NEXT: [[__P0_ADDR_I_SROA_0_0_VEC_INSERT:%.*]] = insertelement <1 x i64> undef, i64 [[TMP0]], i32 0
|
|
// CHECK-NEXT: ret <1 x i64> [[__P0_ADDR_I_SROA_0_0_VEC_INSERT]]
|
|
//
|
|
poly64x1_t test_vreinterpret_p64_bf16(bfloat16x4_t a) { return vreinterpret_p64_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <16 x i8> @test_vreinterpretq_s8_bf16(
|
|
// CHECK-SAME: <8 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x bfloat> [[A]] to <8 x i16>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>
|
|
// CHECK-NEXT: ret <16 x i8> [[TMP1]]
|
|
//
|
|
int8x16_t test_vreinterpretq_s8_bf16(bfloat16x8_t a) { return vreinterpretq_s8_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <8 x i16> @test_vreinterpretq_s16_bf16(
|
|
// CHECK-SAME: <8 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x bfloat> [[A]] to <8 x i16>
|
|
// CHECK-NEXT: ret <8 x i16> [[TMP0]]
|
|
//
|
|
int16x8_t test_vreinterpretq_s16_bf16(bfloat16x8_t a) { return vreinterpretq_s16_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <4 x i32> @test_vreinterpretq_s32_bf16(
|
|
// CHECK-SAME: <8 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x bfloat> [[A]] to <4 x i32>
|
|
// CHECK-NEXT: ret <4 x i32> [[TMP0]]
|
|
//
|
|
int32x4_t test_vreinterpretq_s32_bf16(bfloat16x8_t a) { return vreinterpretq_s32_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <4 x float> @test_vreinterpretq_f32_bf16(
|
|
// CHECK-SAME: <8 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x bfloat> [[A]] to <4 x i32>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i32> [[TMP0]] to <4 x float>
|
|
// CHECK-NEXT: ret <4 x float> [[TMP1]]
|
|
//
|
|
float32x4_t test_vreinterpretq_f32_bf16(bfloat16x8_t a) { return vreinterpretq_f32_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <16 x i8> @test_vreinterpretq_u8_bf16(
|
|
// CHECK-SAME: <8 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x bfloat> [[A]] to <8 x i16>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>
|
|
// CHECK-NEXT: ret <16 x i8> [[TMP1]]
|
|
//
|
|
uint8x16_t test_vreinterpretq_u8_bf16(bfloat16x8_t a) { return vreinterpretq_u8_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <8 x i16> @test_vreinterpretq_u16_bf16(
|
|
// CHECK-SAME: <8 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x bfloat> [[A]] to <8 x i16>
|
|
// CHECK-NEXT: ret <8 x i16> [[TMP0]]
|
|
//
|
|
uint16x8_t test_vreinterpretq_u16_bf16(bfloat16x8_t a) { return vreinterpretq_u16_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <4 x i32> @test_vreinterpretq_u32_bf16(
|
|
// CHECK-SAME: <8 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x bfloat> [[A]] to <4 x i32>
|
|
// CHECK-NEXT: ret <4 x i32> [[TMP0]]
|
|
//
|
|
uint32x4_t test_vreinterpretq_u32_bf16(bfloat16x8_t a) { return vreinterpretq_u32_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <16 x i8> @test_vreinterpretq_p8_bf16(
|
|
// CHECK-SAME: <8 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x bfloat> [[A]] to <8 x i16>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>
|
|
// CHECK-NEXT: ret <16 x i8> [[TMP1]]
|
|
//
|
|
poly8x16_t test_vreinterpretq_p8_bf16(bfloat16x8_t a) { return vreinterpretq_p8_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <8 x i16> @test_vreinterpretq_p16_bf16(
|
|
// CHECK-SAME: <8 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x bfloat> [[A]] to <8 x i16>
|
|
// CHECK-NEXT: ret <8 x i16> [[TMP0]]
|
|
//
|
|
poly16x8_t test_vreinterpretq_p16_bf16(bfloat16x8_t a) { return vreinterpretq_p16_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <2 x i64> @test_vreinterpretq_u64_bf16(
|
|
// CHECK-SAME: <8 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x bfloat> [[A]] to <2 x i64>
|
|
// CHECK-NEXT: ret <2 x i64> [[TMP0]]
|
|
//
|
|
uint64x2_t test_vreinterpretq_u64_bf16(bfloat16x8_t a) { return vreinterpretq_u64_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <2 x i64> @test_vreinterpretq_s64_bf16(
|
|
// CHECK-SAME: <8 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x bfloat> [[A]] to <2 x i64>
|
|
// CHECK-NEXT: ret <2 x i64> [[TMP0]]
|
|
//
|
|
int64x2_t test_vreinterpretq_s64_bf16(bfloat16x8_t a) { return vreinterpretq_s64_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <2 x i64> @test_vreinterpretq_p64_bf16(
|
|
// CHECK-SAME: <8 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x bfloat> [[A]] to <2 x i64>
|
|
// CHECK-NEXT: ret <2 x i64> [[TMP0]]
|
|
//
|
|
poly64x2_t test_vreinterpretq_p64_bf16(bfloat16x8_t a) { return vreinterpretq_p64_bf16(a); }
|
|
// CHECK-LABEL: define dso_local i128 @test_vreinterpretq_p128_bf16(
|
|
// CHECK-SAME: <8 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x bfloat> [[A]] to i128
|
|
// CHECK-NEXT: ret i128 [[TMP0]]
|
|
//
|
|
poly128_t test_vreinterpretq_p128_bf16(bfloat16x8_t a) { return vreinterpretq_p128_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <1 x double> @test_vreinterpret_f64_bf16(
|
|
// CHECK-SAME: <4 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x bfloat> [[A]] to i64
|
|
// CHECK-NEXT: [[__P0_ADDR_I_SROA_0_0_VEC_INSERT:%.*]] = insertelement <1 x i64> undef, i64 [[TMP0]], i32 0
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <1 x i64> [[__P0_ADDR_I_SROA_0_0_VEC_INSERT]] to <1 x double>
|
|
// CHECK-NEXT: ret <1 x double> [[TMP1]]
|
|
//
|
|
float64x1_t test_vreinterpret_f64_bf16(bfloat16x4_t a) { return vreinterpret_f64_bf16(a); }
|
|
// CHECK-LABEL: define dso_local <2 x double> @test_vreinterpretq_f64_bf16(
|
|
// CHECK-SAME: <8 x bfloat> noundef [[A:%.*]]) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x bfloat> [[A]] to <2 x i64>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <2 x i64> [[TMP0]] to <2 x double>
|
|
// CHECK-NEXT: ret <2 x double> [[TMP1]]
|
|
//
|
|
float64x2_t test_vreinterpretq_f64_bf16(bfloat16x8_t a) { return vreinterpretq_f64_bf16(a); }
|