brintos

brintos / llvm-project-archived public Read only

0
0
Text · 7.2 KiB · a9ce31b Raw
194 lines · c
1// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 52// RUN: %clang_cc1        -triple aarch64-none-linux-gnu -target-feature +neon -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -p mem2reg | FileCheck %s3// RUN: %clang_cc1 -x c++ -triple aarch64-none-linux-gnu -target-feature +neon -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -p mem2reg | FileCheck %s -check-prefix CHECK-CXX4 5// RUN: %clang_cc1        -triple aarch64-none-linux-gnu -target-feature +neon -disable-O0-optnone -Werror -Wall -S -o /dev/null %s6 7// REQUIRES: aarch64-registered-target8 9#include <arm_neon.h>10 11// Bitcast between FP8 Neon vectors12// CHECK-LABEL: define dso_local <8 x i8> @test_f8_f8(13// CHECK-SAME: <8 x i8> [[X:%.*]]) #[[ATTR0:[0-9]+]] {14// CHECK-NEXT:  [[ENTRY:.*:]]15// CHECK-NEXT:    ret <8 x i8> [[X]]16//17// CHECK-CXX-LABEL: define dso_local <8 x i8> @_Z10test_f8_f813__Mfloat8x8_t(18// CHECK-CXX-SAME: <8 x i8> [[X:%.*]]) #[[ATTR0:[0-9]+]] {19// CHECK-CXX-NEXT:  [[ENTRY:.*:]]20// CHECK-CXX-NEXT:    ret <8 x i8> [[X]]21//22mfloat8x8_t test_f8_f8(mfloat8x8_t x) {23    return (mfloat8x8_t) x;24}25 26// CHECK-LABEL: define dso_local <16 x i8> @testq_f8_f8(27// CHECK-SAME: <16 x i8> [[X:%.*]]) #[[ATTR0]] {28// CHECK-NEXT:  [[ENTRY:.*:]]29// CHECK-NEXT:    ret <16 x i8> [[X]]30//31// CHECK-CXX-LABEL: define dso_local <16 x i8> @_Z11testq_f8_f814__Mfloat8x16_t(32// CHECK-CXX-SAME: <16 x i8> [[X:%.*]]) #[[ATTR0]] {33// CHECK-CXX-NEXT:  [[ENTRY:.*:]]34// CHECK-CXX-NEXT:    ret <16 x i8> [[X]]35//36mfloat8x16_t testq_f8_f8(mfloat8x16_t x) {37    return (mfloat8x16_t) x;38}39 40// Bitcast between FP8 and int8 Neon vectors41// CHECK-LABEL: define dso_local <8 x i8> @test_f8_s8(42// CHECK-SAME: <8 x i8> noundef [[X:%.*]]) #[[ATTR0]] {43// CHECK-NEXT:  [[ENTRY:.*:]]44// CHECK-NEXT:    ret <8 x i8> [[X]]45//46// CHECK-CXX-LABEL: define dso_local <8 x i8> @_Z10test_f8_s810__Int8x8_t(47// CHECK-CXX-SAME: <8 x i8> noundef [[X:%.*]]) #[[ATTR0]] {48// CHECK-CXX-NEXT:  [[ENTRY:.*:]]49// CHECK-CXX-NEXT:    ret <8 x i8> [[X]]50//51mfloat8x8_t test_f8_s8(int8x8_t x) {52    return (mfloat8x8_t) x;53}54 55// CHECK-LABEL: define dso_local <8 x i8> @test_s8_f8(56// CHECK-SAME: <8 x i8> [[X:%.*]]) #[[ATTR0]] {57// CHECK-NEXT:  [[ENTRY:.*:]]58// CHECK-NEXT:    ret <8 x i8> [[X]]59//60// CHECK-CXX-LABEL: define dso_local noundef <8 x i8> @_Z10test_s8_f813__Mfloat8x8_t(61// CHECK-CXX-SAME: <8 x i8> [[X:%.*]]) #[[ATTR0]] {62// CHECK-CXX-NEXT:  [[ENTRY:.*:]]63// CHECK-CXX-NEXT:    ret <8 x i8> [[X]]64//65int8x8_t test_s8_f8(mfloat8x8_t x) {66    return (int8x8_t) x;67}68 69// CHECK-LABEL: define dso_local <16 x i8> @testq_f8_s8(70// CHECK-SAME: <16 x i8> noundef [[X:%.*]]) #[[ATTR0]] {71// CHECK-NEXT:  [[ENTRY:.*:]]72// CHECK-NEXT:    ret <16 x i8> [[X]]73//74// CHECK-CXX-LABEL: define dso_local <16 x i8> @_Z11testq_f8_s811__Int8x16_t(75// CHECK-CXX-SAME: <16 x i8> noundef [[X:%.*]]) #[[ATTR0]] {76// CHECK-CXX-NEXT:  [[ENTRY:.*:]]77// CHECK-CXX-NEXT:    ret <16 x i8> [[X]]78//79mfloat8x16_t testq_f8_s8(int8x16_t x) {80    return (mfloat8x16_t) x;81}82 83// CHECK-LABEL: define dso_local <16 x i8> @testq_s8_f8(84// CHECK-SAME: <16 x i8> [[X:%.*]]) #[[ATTR0]] {85// CHECK-NEXT:  [[ENTRY:.*:]]86// CHECK-NEXT:    ret <16 x i8> [[X]]87//88// CHECK-CXX-LABEL: define dso_local noundef <16 x i8> @_Z11testq_s8_f814__Mfloat8x16_t(89// CHECK-CXX-SAME: <16 x i8> [[X:%.*]]) #[[ATTR0]] {90// CHECK-CXX-NEXT:  [[ENTRY:.*:]]91// CHECK-CXX-NEXT:    ret <16 x i8> [[X]]92//93int8x16_t testq_s8_f8(mfloat8x16_t x) {94    return (int8x16_t) x;95}96 97// Bitcast between FP8 and float32 Neon vectors98// CHECK-LABEL: define dso_local <8 x i8> @test_f8_f32(99// CHECK-SAME: <2 x float> noundef [[X:%.*]]) #[[ATTR0]] {100// CHECK-NEXT:  [[ENTRY:.*:]]101// CHECK-NEXT:    [[TMP0:%.*]] = bitcast <2 x float> [[X]] to <8 x i8>102// CHECK-NEXT:    ret <8 x i8> [[TMP0]]103//104// CHECK-CXX-LABEL: define dso_local <8 x i8> @_Z11test_f8_f3213__Float32x2_t(105// CHECK-CXX-SAME: <2 x float> noundef [[X:%.*]]) #[[ATTR0]] {106// CHECK-CXX-NEXT:  [[ENTRY:.*:]]107// CHECK-CXX-NEXT:    [[TMP0:%.*]] = bitcast <2 x float> [[X]] to <8 x i8>108// CHECK-CXX-NEXT:    ret <8 x i8> [[TMP0]]109//110mfloat8x8_t test_f8_f32(float32x2_t x) {111    return (mfloat8x8_t) x;112}113 114// CHECK-LABEL: define dso_local <2 x float> @test_f32_f8(115// CHECK-SAME: <8 x i8> [[X:%.*]]) #[[ATTR0]] {116// CHECK-NEXT:  [[ENTRY:.*:]]117// CHECK-NEXT:    [[TMP0:%.*]] = bitcast <8 x i8> [[X]] to <2 x float>118// CHECK-NEXT:    ret <2 x float> [[TMP0]]119//120// CHECK-CXX-LABEL: define dso_local noundef <2 x float> @_Z11test_f32_f813__Mfloat8x8_t(121// CHECK-CXX-SAME: <8 x i8> [[X:%.*]]) #[[ATTR0]] {122// CHECK-CXX-NEXT:  [[ENTRY:.*:]]123// CHECK-CXX-NEXT:    [[TMP0:%.*]] = bitcast <8 x i8> [[X]] to <2 x float>124// CHECK-CXX-NEXT:    ret <2 x float> [[TMP0]]125//126float32x2_t test_f32_f8(mfloat8x8_t x) {127    return (float32x2_t) x;128}129 130// CHECK-LABEL: define dso_local <16 x i8> @testq_f8_f32(131// CHECK-SAME: <4 x float> noundef [[X:%.*]]) #[[ATTR0]] {132// CHECK-NEXT:  [[ENTRY:.*:]]133// CHECK-NEXT:    [[TMP0:%.*]] = bitcast <4 x float> [[X]] to <16 x i8>134// CHECK-NEXT:    ret <16 x i8> [[TMP0]]135//136// CHECK-CXX-LABEL: define dso_local <16 x i8> @_Z12testq_f8_f3213__Float32x4_t(137// CHECK-CXX-SAME: <4 x float> noundef [[X:%.*]]) #[[ATTR0]] {138// CHECK-CXX-NEXT:  [[ENTRY:.*:]]139// CHECK-CXX-NEXT:    [[TMP0:%.*]] = bitcast <4 x float> [[X]] to <16 x i8>140// CHECK-CXX-NEXT:    ret <16 x i8> [[TMP0]]141//142mfloat8x16_t testq_f8_f32(float32x4_t x) {143    return (mfloat8x16_t) x;144}145 146// CHECK-LABEL: define dso_local <4 x float> @testq_f32_f8(147// CHECK-SAME: <16 x i8> [[X:%.*]]) #[[ATTR0]] {148// CHECK-NEXT:  [[ENTRY:.*:]]149// CHECK-NEXT:    [[TMP0:%.*]] = bitcast <16 x i8> [[X]] to <4 x float>150// CHECK-NEXT:    ret <4 x float> [[TMP0]]151//152// CHECK-CXX-LABEL: define dso_local noundef <4 x float> @_Z12testq_f32_f814__Mfloat8x16_t(153// CHECK-CXX-SAME: <16 x i8> [[X:%.*]]) #[[ATTR0]] {154// CHECK-CXX-NEXT:  [[ENTRY:.*:]]155// CHECK-CXX-NEXT:    [[TMP0:%.*]] = bitcast <16 x i8> [[X]] to <4 x float>156// CHECK-CXX-NEXT:    ret <4 x float> [[TMP0]]157//158float32x4_t testq_f32_f8(mfloat8x16_t x) {159    return (float32x4_t) x;160}161 162// Bitcast between FP8 and poly128_t (which is integral)163// CHECK-LABEL: define dso_local <16 x i8> @testq_f8_p128(164// CHECK-SAME: i128 noundef [[X:%.*]]) #[[ATTR0]] {165// CHECK-NEXT:  [[ENTRY:.*:]]166// CHECK-NEXT:    [[TMP0:%.*]] = bitcast i128 [[X]] to <16 x i8>167// CHECK-NEXT:    ret <16 x i8> [[TMP0]]168//169// CHECK-CXX-LABEL: define dso_local <16 x i8> @_Z13testq_f8_p128o(170// CHECK-CXX-SAME: i128 noundef [[X:%.*]]) #[[ATTR0]] {171// CHECK-CXX-NEXT:  [[ENTRY:.*:]]172// CHECK-CXX-NEXT:    [[TMP0:%.*]] = bitcast i128 [[X]] to <16 x i8>173// CHECK-CXX-NEXT:    ret <16 x i8> [[TMP0]]174//175mfloat8x16_t testq_f8_p128(poly128_t x) {176    return (mfloat8x16_t) x;177}178 179// CHECK-LABEL: define dso_local i128 @testq_p128_f8(180// CHECK-SAME: <16 x i8> [[X:%.*]]) #[[ATTR0]] {181// CHECK-NEXT:  [[ENTRY:.*:]]182// CHECK-NEXT:    [[TMP0:%.*]] = bitcast <16 x i8> [[X]] to i128183// CHECK-NEXT:    ret i128 [[TMP0]]184//185// CHECK-CXX-LABEL: define dso_local noundef i128 @_Z13testq_p128_f814__Mfloat8x16_t(186// CHECK-CXX-SAME: <16 x i8> [[X:%.*]]) #[[ATTR0]] {187// CHECK-CXX-NEXT:  [[ENTRY:.*:]]188// CHECK-CXX-NEXT:    [[TMP0:%.*]] = bitcast <16 x i8> [[X]] to i128189// CHECK-CXX-NEXT:    ret i128 [[TMP0]]190//191poly128_t testq_p128_f8(mfloat8x16_t x) {192    return (poly128_t) x;193}194