1595 lines · c
1// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 52// RUN: %clang_cc1 -triple armv8.2a-linux-gnu -target-abi apcs-gnu -target-feature +neon -target-feature +fullfp16 \3// RUN: -disable-O0-optnone -emit-llvm -o - %s \4// RUN: | opt -S -passes=mem2reg,sroa \5// RUN: | FileCheck %s6 7// REQUIRES: arm-registered-target8 9#include <arm_neon.h>10 11// CHECK-LABEL: define dso_local <4 x half> @test_vabs_f16(12// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0:[0-9]+]] {13// CHECK-NEXT: [[ENTRY:.*:]]14// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>15// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>16// CHECK-NEXT: [[VABS_I:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>17// CHECK-NEXT: [[VABS1_I:%.*]] = call <4 x half> @llvm.fabs.v4f16(<4 x half> [[VABS_I]])18// CHECK-NEXT: ret <4 x half> [[VABS1_I]]19//20float16x4_t test_vabs_f16(float16x4_t a) {21 return vabs_f16(a);22}23 24// CHECK-LABEL: define dso_local <8 x half> @test_vabsq_f16(25// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {26// CHECK-NEXT: [[ENTRY:.*:]]27// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>28// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>29// CHECK-NEXT: [[VABS_I:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>30// CHECK-NEXT: [[VABS1_I:%.*]] = call <8 x half> @llvm.fabs.v8f16(<8 x half> [[VABS_I]])31// CHECK-NEXT: ret <8 x half> [[VABS1_I]]32//33float16x8_t test_vabsq_f16(float16x8_t a) {34 return vabsq_f16(a);35}36 37// CHECK-LABEL: define dso_local <4 x i16> @test_vceqz_f16(38// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {39// CHECK-NEXT: [[ENTRY:.*:]]40// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>41// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>42// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>43// CHECK-NEXT: [[TMP3:%.*]] = fcmp oeq <4 x half> [[TMP2]], zeroinitializer44// CHECK-NEXT: [[VCEQZ_I:%.*]] = sext <4 x i1> [[TMP3]] to <4 x i16>45// CHECK-NEXT: ret <4 x i16> [[VCEQZ_I]]46//47uint16x4_t test_vceqz_f16(float16x4_t a) {48 return vceqz_f16(a);49}50 51// CHECK-LABEL: define dso_local <8 x i16> @test_vceqzq_f16(52// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {53// CHECK-NEXT: [[ENTRY:.*:]]54// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>55// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>56// CHECK-NEXT: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>57// CHECK-NEXT: [[TMP3:%.*]] = fcmp oeq <8 x half> [[TMP2]], zeroinitializer58// CHECK-NEXT: [[VCEQZ_I:%.*]] = sext <8 x i1> [[TMP3]] to <8 x i16>59// CHECK-NEXT: ret <8 x i16> [[VCEQZ_I]]60//61uint16x8_t test_vceqzq_f16(float16x8_t a) {62 return vceqzq_f16(a);63}64 65// CHECK-LABEL: define dso_local <4 x i16> @test_vcgez_f16(66// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {67// CHECK-NEXT: [[ENTRY:.*:]]68// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>69// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>70// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>71// CHECK-NEXT: [[TMP3:%.*]] = fcmp oge <4 x half> [[TMP2]], zeroinitializer72// CHECK-NEXT: [[VCGEZ_I:%.*]] = sext <4 x i1> [[TMP3]] to <4 x i16>73// CHECK-NEXT: ret <4 x i16> [[VCGEZ_I]]74//75uint16x4_t test_vcgez_f16(float16x4_t a) {76 return vcgez_f16(a);77}78 79// CHECK-LABEL: define dso_local <8 x i16> @test_vcgezq_f16(80// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {81// CHECK-NEXT: [[ENTRY:.*:]]82// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>83// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>84// CHECK-NEXT: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>85// CHECK-NEXT: [[TMP3:%.*]] = fcmp oge <8 x half> [[TMP2]], zeroinitializer86// CHECK-NEXT: [[VCGEZ_I:%.*]] = sext <8 x i1> [[TMP3]] to <8 x i16>87// CHECK-NEXT: ret <8 x i16> [[VCGEZ_I]]88//89uint16x8_t test_vcgezq_f16(float16x8_t a) {90 return vcgezq_f16(a);91}92 93// CHECK-LABEL: define dso_local <4 x i16> @test_vcgtz_f16(94// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {95// CHECK-NEXT: [[ENTRY:.*:]]96// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>97// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>98// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>99// CHECK-NEXT: [[TMP3:%.*]] = fcmp ogt <4 x half> [[TMP2]], zeroinitializer100// CHECK-NEXT: [[VCGTZ_I:%.*]] = sext <4 x i1> [[TMP3]] to <4 x i16>101// CHECK-NEXT: ret <4 x i16> [[VCGTZ_I]]102//103uint16x4_t test_vcgtz_f16(float16x4_t a) {104 return vcgtz_f16(a);105}106 107// CHECK-LABEL: define dso_local <8 x i16> @test_vcgtzq_f16(108// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {109// CHECK-NEXT: [[ENTRY:.*:]]110// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>111// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>112// CHECK-NEXT: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>113// CHECK-NEXT: [[TMP3:%.*]] = fcmp ogt <8 x half> [[TMP2]], zeroinitializer114// CHECK-NEXT: [[VCGTZ_I:%.*]] = sext <8 x i1> [[TMP3]] to <8 x i16>115// CHECK-NEXT: ret <8 x i16> [[VCGTZ_I]]116//117uint16x8_t test_vcgtzq_f16(float16x8_t a) {118 return vcgtzq_f16(a);119}120 121// CHECK-LABEL: define dso_local <4 x i16> @test_vclez_f16(122// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {123// CHECK-NEXT: [[ENTRY:.*:]]124// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>125// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>126// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>127// CHECK-NEXT: [[TMP3:%.*]] = fcmp ole <4 x half> [[TMP2]], zeroinitializer128// CHECK-NEXT: [[VCLEZ_I:%.*]] = sext <4 x i1> [[TMP3]] to <4 x i16>129// CHECK-NEXT: ret <4 x i16> [[VCLEZ_I]]130//131uint16x4_t test_vclez_f16(float16x4_t a) {132 return vclez_f16(a);133}134 135// CHECK-LABEL: define dso_local <8 x i16> @test_vclezq_f16(136// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {137// CHECK-NEXT: [[ENTRY:.*:]]138// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>139// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>140// CHECK-NEXT: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>141// CHECK-NEXT: [[TMP3:%.*]] = fcmp ole <8 x half> [[TMP2]], zeroinitializer142// CHECK-NEXT: [[VCLEZ_I:%.*]] = sext <8 x i1> [[TMP3]] to <8 x i16>143// CHECK-NEXT: ret <8 x i16> [[VCLEZ_I]]144//145uint16x8_t test_vclezq_f16(float16x8_t a) {146 return vclezq_f16(a);147}148 149// CHECK-LABEL: define dso_local <4 x i16> @test_vcltz_f16(150// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {151// CHECK-NEXT: [[ENTRY:.*:]]152// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>153// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>154// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>155// CHECK-NEXT: [[TMP3:%.*]] = fcmp olt <4 x half> [[TMP2]], zeroinitializer156// CHECK-NEXT: [[VCLTZ_I:%.*]] = sext <4 x i1> [[TMP3]] to <4 x i16>157// CHECK-NEXT: ret <4 x i16> [[VCLTZ_I]]158//159uint16x4_t test_vcltz_f16(float16x4_t a) {160 return vcltz_f16(a);161}162 163// CHECK-LABEL: define dso_local <8 x i16> @test_vcltzq_f16(164// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {165// CHECK-NEXT: [[ENTRY:.*:]]166// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>167// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>168// CHECK-NEXT: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>169// CHECK-NEXT: [[TMP3:%.*]] = fcmp olt <8 x half> [[TMP2]], zeroinitializer170// CHECK-NEXT: [[VCLTZ_I:%.*]] = sext <8 x i1> [[TMP3]] to <8 x i16>171// CHECK-NEXT: ret <8 x i16> [[VCLTZ_I]]172//173uint16x8_t test_vcltzq_f16(float16x8_t a) {174 return vcltzq_f16(a);175}176 177// CHECK-LABEL: define dso_local <4 x half> @test_vcvt_f16_s16(178// CHECK-SAME: <4 x i16> noundef [[A:%.*]]) #[[ATTR0]] {179// CHECK-NEXT: [[ENTRY:.*:]]180// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x i16> [[A]] to <8 x i8>181// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i8> [[TMP0]] to <4 x i16>182// CHECK-NEXT: [[VCVT_I:%.*]] = sitofp <4 x i16> [[TMP1]] to <4 x half>183// CHECK-NEXT: ret <4 x half> [[VCVT_I]]184//185float16x4_t test_vcvt_f16_s16 (int16x4_t a) {186 return vcvt_f16_s16(a);187}188 189// CHECK-LABEL: define dso_local <8 x half> @test_vcvtq_f16_s16(190// CHECK-SAME: <8 x i16> noundef [[A:%.*]]) #[[ATTR0]] {191// CHECK-NEXT: [[ENTRY:.*:]]192// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x i16> [[A]] to <16 x i8>193// CHECK-NEXT: [[TMP1:%.*]] = bitcast <16 x i8> [[TMP0]] to <8 x i16>194// CHECK-NEXT: [[VCVT_I:%.*]] = sitofp <8 x i16> [[TMP1]] to <8 x half>195// CHECK-NEXT: ret <8 x half> [[VCVT_I]]196//197float16x8_t test_vcvtq_f16_s16 (int16x8_t a) {198 return vcvtq_f16_s16(a);199}200 201// CHECK-LABEL: define dso_local <4 x half> @test_vcvt_f16_u16(202// CHECK-SAME: <4 x i16> noundef [[A:%.*]]) #[[ATTR0]] {203// CHECK-NEXT: [[ENTRY:.*:]]204// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x i16> [[A]] to <8 x i8>205// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i8> [[TMP0]] to <4 x i16>206// CHECK-NEXT: [[VCVT_I:%.*]] = uitofp <4 x i16> [[TMP1]] to <4 x half>207// CHECK-NEXT: ret <4 x half> [[VCVT_I]]208//209float16x4_t test_vcvt_f16_u16 (uint16x4_t a) {210 return vcvt_f16_u16(a);211}212 213// CHECK-LABEL: define dso_local <8 x half> @test_vcvtq_f16_u16(214// CHECK-SAME: <8 x i16> noundef [[A:%.*]]) #[[ATTR0]] {215// CHECK-NEXT: [[ENTRY:.*:]]216// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x i16> [[A]] to <16 x i8>217// CHECK-NEXT: [[TMP1:%.*]] = bitcast <16 x i8> [[TMP0]] to <8 x i16>218// CHECK-NEXT: [[VCVT_I:%.*]] = uitofp <8 x i16> [[TMP1]] to <8 x half>219// CHECK-NEXT: ret <8 x half> [[VCVT_I]]220//221float16x8_t test_vcvtq_f16_u16 (uint16x8_t a) {222 return vcvtq_f16_u16(a);223}224 225// CHECK-LABEL: define dso_local <4 x i16> @test_vcvt_s16_f16(226// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {227// CHECK-NEXT: [[ENTRY:.*:]]228// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>229// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>230// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>231// CHECK-NEXT: [[VCVT_I:%.*]] = fptosi <4 x half> [[TMP2]] to <4 x i16>232// CHECK-NEXT: ret <4 x i16> [[VCVT_I]]233//234int16x4_t test_vcvt_s16_f16 (float16x4_t a) {235 return vcvt_s16_f16(a);236}237 238// CHECK-LABEL: define dso_local <8 x i16> @test_vcvtq_s16_f16(239// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {240// CHECK-NEXT: [[ENTRY:.*:]]241// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>242// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>243// CHECK-NEXT: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>244// CHECK-NEXT: [[VCVT_I:%.*]] = fptosi <8 x half> [[TMP2]] to <8 x i16>245// CHECK-NEXT: ret <8 x i16> [[VCVT_I]]246//247int16x8_t test_vcvtq_s16_f16 (float16x8_t a) {248 return vcvtq_s16_f16(a);249}250 251// CHECK-LABEL: define dso_local <4 x i16> @test_vcvt_u16_f16(252// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {253// CHECK-NEXT: [[ENTRY:.*:]]254// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>255// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>256// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>257// CHECK-NEXT: [[VCVT_I:%.*]] = fptoui <4 x half> [[TMP2]] to <4 x i16>258// CHECK-NEXT: ret <4 x i16> [[VCVT_I]]259//260int16x4_t test_vcvt_u16_f16 (float16x4_t a) {261 return vcvt_u16_f16(a);262}263 264// CHECK-LABEL: define dso_local <8 x i16> @test_vcvtq_u16_f16(265// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {266// CHECK-NEXT: [[ENTRY:.*:]]267// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>268// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>269// CHECK-NEXT: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>270// CHECK-NEXT: [[VCVT_I:%.*]] = fptoui <8 x half> [[TMP2]] to <8 x i16>271// CHECK-NEXT: ret <8 x i16> [[VCVT_I]]272//273int16x8_t test_vcvtq_u16_f16 (float16x8_t a) {274 return vcvtq_u16_f16(a);275}276 277// CHECK-LABEL: define dso_local <4 x i16> @test_vcvta_s16_f16(278// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {279// CHECK-NEXT: [[ENTRY:.*:]]280// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>281// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>282// CHECK-NEXT: [[VCVTA_S16_F16_I:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>283// CHECK-NEXT: [[VCVTA_S16_F161_I:%.*]] = call <4 x i16> @llvm.arm.neon.vcvtas.v4i16.v4f16(<4 x half> [[VCVTA_S16_F16_I]])284// CHECK-NEXT: ret <4 x i16> [[VCVTA_S16_F161_I]]285//286int16x4_t test_vcvta_s16_f16 (float16x4_t a) {287 return vcvta_s16_f16(a);288}289 290// CHECK-LABEL: define dso_local <4 x i16> @test_vcvta_u16_f16(291// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {292// CHECK-NEXT: [[ENTRY:.*:]]293// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>294// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>295// CHECK-NEXT: [[VCVTA_U16_F16_I:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>296// CHECK-NEXT: [[VCVTA_U16_F161_I:%.*]] = call <4 x i16> @llvm.arm.neon.vcvtau.v4i16.v4f16(<4 x half> [[VCVTA_U16_F16_I]])297// CHECK-NEXT: ret <4 x i16> [[VCVTA_U16_F161_I]]298//299int16x4_t test_vcvta_u16_f16 (float16x4_t a) {300 return vcvta_u16_f16(a);301}302 303// CHECK-LABEL: define dso_local <8 x i16> @test_vcvtaq_s16_f16(304// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {305// CHECK-NEXT: [[ENTRY:.*:]]306// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>307// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>308// CHECK-NEXT: [[VCVTAQ_S16_F16_I:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>309// CHECK-NEXT: [[VCVTAQ_S16_F161_I:%.*]] = call <8 x i16> @llvm.arm.neon.vcvtas.v8i16.v8f16(<8 x half> [[VCVTAQ_S16_F16_I]])310// CHECK-NEXT: ret <8 x i16> [[VCVTAQ_S16_F161_I]]311//312int16x8_t test_vcvtaq_s16_f16 (float16x8_t a) {313 return vcvtaq_s16_f16(a);314}315 316// CHECK-LABEL: define dso_local <4 x i16> @test_vcvtm_s16_f16(317// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {318// CHECK-NEXT: [[ENTRY:.*:]]319// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>320// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>321// CHECK-NEXT: [[VCVTM_S16_F16_I:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>322// CHECK-NEXT: [[VCVTM_S16_F161_I:%.*]] = call <4 x i16> @llvm.arm.neon.vcvtms.v4i16.v4f16(<4 x half> [[VCVTM_S16_F16_I]])323// CHECK-NEXT: ret <4 x i16> [[VCVTM_S16_F161_I]]324//325int16x4_t test_vcvtm_s16_f16 (float16x4_t a) {326 return vcvtm_s16_f16(a);327}328 329// CHECK-LABEL: define dso_local <8 x i16> @test_vcvtmq_s16_f16(330// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {331// CHECK-NEXT: [[ENTRY:.*:]]332// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>333// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>334// CHECK-NEXT: [[VCVTMQ_S16_F16_I:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>335// CHECK-NEXT: [[VCVTMQ_S16_F161_I:%.*]] = call <8 x i16> @llvm.arm.neon.vcvtms.v8i16.v8f16(<8 x half> [[VCVTMQ_S16_F16_I]])336// CHECK-NEXT: ret <8 x i16> [[VCVTMQ_S16_F161_I]]337//338int16x8_t test_vcvtmq_s16_f16 (float16x8_t a) {339 return vcvtmq_s16_f16(a);340}341 342// CHECK-LABEL: define dso_local <4 x i16> @test_vcvtm_u16_f16(343// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {344// CHECK-NEXT: [[ENTRY:.*:]]345// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>346// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>347// CHECK-NEXT: [[VCVTM_U16_F16_I:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>348// CHECK-NEXT: [[VCVTM_U16_F161_I:%.*]] = call <4 x i16> @llvm.arm.neon.vcvtmu.v4i16.v4f16(<4 x half> [[VCVTM_U16_F16_I]])349// CHECK-NEXT: ret <4 x i16> [[VCVTM_U16_F161_I]]350//351uint16x4_t test_vcvtm_u16_f16 (float16x4_t a) {352 return vcvtm_u16_f16(a);353}354 355// CHECK-LABEL: define dso_local <8 x i16> @test_vcvtmq_u16_f16(356// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {357// CHECK-NEXT: [[ENTRY:.*:]]358// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>359// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>360// CHECK-NEXT: [[VCVTMQ_U16_F16_I:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>361// CHECK-NEXT: [[VCVTMQ_U16_F161_I:%.*]] = call <8 x i16> @llvm.arm.neon.vcvtmu.v8i16.v8f16(<8 x half> [[VCVTMQ_U16_F16_I]])362// CHECK-NEXT: ret <8 x i16> [[VCVTMQ_U16_F161_I]]363//364uint16x8_t test_vcvtmq_u16_f16 (float16x8_t a) {365 return vcvtmq_u16_f16(a);366}367 368// CHECK-LABEL: define dso_local <4 x i16> @test_vcvtn_s16_f16(369// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {370// CHECK-NEXT: [[ENTRY:.*:]]371// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>372// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>373// CHECK-NEXT: [[VCVTN_S16_F16_I:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>374// CHECK-NEXT: [[VCVTN_S16_F161_I:%.*]] = call <4 x i16> @llvm.arm.neon.vcvtns.v4i16.v4f16(<4 x half> [[VCVTN_S16_F16_I]])375// CHECK-NEXT: ret <4 x i16> [[VCVTN_S16_F161_I]]376//377int16x4_t test_vcvtn_s16_f16 (float16x4_t a) {378 return vcvtn_s16_f16(a);379}380 381// CHECK-LABEL: define dso_local <8 x i16> @test_vcvtnq_s16_f16(382// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {383// CHECK-NEXT: [[ENTRY:.*:]]384// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>385// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>386// CHECK-NEXT: [[VCVTNQ_S16_F16_I:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>387// CHECK-NEXT: [[VCVTNQ_S16_F161_I:%.*]] = call <8 x i16> @llvm.arm.neon.vcvtns.v8i16.v8f16(<8 x half> [[VCVTNQ_S16_F16_I]])388// CHECK-NEXT: ret <8 x i16> [[VCVTNQ_S16_F161_I]]389//390int16x8_t test_vcvtnq_s16_f16 (float16x8_t a) {391 return vcvtnq_s16_f16(a);392}393 394// CHECK-LABEL: define dso_local <4 x i16> @test_vcvtn_u16_f16(395// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {396// CHECK-NEXT: [[ENTRY:.*:]]397// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>398// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>399// CHECK-NEXT: [[VCVTN_U16_F16_I:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>400// CHECK-NEXT: [[VCVTN_U16_F161_I:%.*]] = call <4 x i16> @llvm.arm.neon.vcvtnu.v4i16.v4f16(<4 x half> [[VCVTN_U16_F16_I]])401// CHECK-NEXT: ret <4 x i16> [[VCVTN_U16_F161_I]]402//403uint16x4_t test_vcvtn_u16_f16 (float16x4_t a) {404 return vcvtn_u16_f16(a);405}406 407// CHECK-LABEL: define dso_local <8 x i16> @test_vcvtnq_u16_f16(408// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {409// CHECK-NEXT: [[ENTRY:.*:]]410// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>411// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>412// CHECK-NEXT: [[VCVTNQ_U16_F16_I:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>413// CHECK-NEXT: [[VCVTNQ_U16_F161_I:%.*]] = call <8 x i16> @llvm.arm.neon.vcvtnu.v8i16.v8f16(<8 x half> [[VCVTNQ_U16_F16_I]])414// CHECK-NEXT: ret <8 x i16> [[VCVTNQ_U16_F161_I]]415//416uint16x8_t test_vcvtnq_u16_f16 (float16x8_t a) {417 return vcvtnq_u16_f16(a);418}419 420// CHECK-LABEL: define dso_local <4 x i16> @test_vcvtp_s16_f16(421// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {422// CHECK-NEXT: [[ENTRY:.*:]]423// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>424// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>425// CHECK-NEXT: [[VCVTP_S16_F16_I:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>426// CHECK-NEXT: [[VCVTP_S16_F161_I:%.*]] = call <4 x i16> @llvm.arm.neon.vcvtps.v4i16.v4f16(<4 x half> [[VCVTP_S16_F16_I]])427// CHECK-NEXT: ret <4 x i16> [[VCVTP_S16_F161_I]]428//429int16x4_t test_vcvtp_s16_f16 (float16x4_t a) {430 return vcvtp_s16_f16(a);431}432 433// CHECK-LABEL: define dso_local <8 x i16> @test_vcvtpq_s16_f16(434// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {435// CHECK-NEXT: [[ENTRY:.*:]]436// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>437// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>438// CHECK-NEXT: [[VCVTPQ_S16_F16_I:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>439// CHECK-NEXT: [[VCVTPQ_S16_F161_I:%.*]] = call <8 x i16> @llvm.arm.neon.vcvtps.v8i16.v8f16(<8 x half> [[VCVTPQ_S16_F16_I]])440// CHECK-NEXT: ret <8 x i16> [[VCVTPQ_S16_F161_I]]441//442int16x8_t test_vcvtpq_s16_f16 (float16x8_t a) {443 return vcvtpq_s16_f16(a);444}445 446// CHECK-LABEL: define dso_local <4 x i16> @test_vcvtp_u16_f16(447// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {448// CHECK-NEXT: [[ENTRY:.*:]]449// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>450// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>451// CHECK-NEXT: [[VCVTP_U16_F16_I:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>452// CHECK-NEXT: [[VCVTP_U16_F161_I:%.*]] = call <4 x i16> @llvm.arm.neon.vcvtpu.v4i16.v4f16(<4 x half> [[VCVTP_U16_F16_I]])453// CHECK-NEXT: ret <4 x i16> [[VCVTP_U16_F161_I]]454//455uint16x4_t test_vcvtp_u16_f16 (float16x4_t a) {456 return vcvtp_u16_f16(a);457}458 459// CHECK-LABEL: define dso_local <8 x i16> @test_vcvtpq_u16_f16(460// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {461// CHECK-NEXT: [[ENTRY:.*:]]462// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>463// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>464// CHECK-NEXT: [[VCVTPQ_U16_F16_I:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>465// CHECK-NEXT: [[VCVTPQ_U16_F161_I:%.*]] = call <8 x i16> @llvm.arm.neon.vcvtpu.v8i16.v8f16(<8 x half> [[VCVTPQ_U16_F16_I]])466// CHECK-NEXT: ret <8 x i16> [[VCVTPQ_U16_F161_I]]467//468uint16x8_t test_vcvtpq_u16_f16 (float16x8_t a) {469 return vcvtpq_u16_f16(a);470}471 472// FIXME: Fix the zero constant when fp16 non-storage-only type becomes available.473// CHECK-LABEL: define dso_local <4 x half> @test_vneg_f16(474// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {475// CHECK-NEXT: [[ENTRY:.*:]]476// CHECK-NEXT: [[FNEG_I:%.*]] = fneg <4 x half> [[A]]477// CHECK-NEXT: ret <4 x half> [[FNEG_I]]478//479float16x4_t test_vneg_f16(float16x4_t a) {480 return vneg_f16(a);481}482 483// CHECK-LABEL: define dso_local <8 x half> @test_vnegq_f16(484// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {485// CHECK-NEXT: [[ENTRY:.*:]]486// CHECK-NEXT: [[FNEG_I:%.*]] = fneg <8 x half> [[A]]487// CHECK-NEXT: ret <8 x half> [[FNEG_I]]488//489float16x8_t test_vnegq_f16(float16x8_t a) {490 return vnegq_f16(a);491}492 493// CHECK-LABEL: define dso_local <4 x half> @test_vrecpe_f16(494// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {495// CHECK-NEXT: [[ENTRY:.*:]]496// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>497// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>498// CHECK-NEXT: [[VRECPE_V_I:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>499// CHECK-NEXT: [[VRECPE_V1_I:%.*]] = call <4 x half> @llvm.arm.neon.vrecpe.v4f16(<4 x half> [[VRECPE_V_I]])500// CHECK-NEXT: ret <4 x half> [[VRECPE_V1_I]]501//502float16x4_t test_vrecpe_f16(float16x4_t a) {503 return vrecpe_f16(a);504}505 506// CHECK-LABEL: define dso_local <8 x half> @test_vrecpeq_f16(507// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {508// CHECK-NEXT: [[ENTRY:.*:]]509// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>510// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>511// CHECK-NEXT: [[VRECPEQ_V_I:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>512// CHECK-NEXT: [[VRECPEQ_V1_I:%.*]] = call <8 x half> @llvm.arm.neon.vrecpe.v8f16(<8 x half> [[VRECPEQ_V_I]])513// CHECK-NEXT: ret <8 x half> [[VRECPEQ_V1_I]]514//515float16x8_t test_vrecpeq_f16(float16x8_t a) {516 return vrecpeq_f16(a);517}518 519// CHECK-LABEL: define dso_local <4 x half> @test_vrnd_f16(520// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {521// CHECK-NEXT: [[ENTRY:.*:]]522// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>523// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>524// CHECK-NEXT: [[VRND_V_I:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>525// CHECK-NEXT: [[VRND_V1_I:%.*]] = call <4 x half> @llvm.trunc.v4f16(<4 x half> [[VRND_V_I]])526// CHECK-NEXT: [[VRND_V2_I:%.*]] = bitcast <4 x half> [[VRND_V1_I]] to <8 x i8>527// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i8> [[VRND_V2_I]] to <4 x i16>528// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP2]] to <4 x half>529// CHECK-NEXT: ret <4 x half> [[TMP3]]530//531float16x4_t test_vrnd_f16(float16x4_t a) {532 return vrnd_f16(a);533}534 535// CHECK-LABEL: define dso_local <8 x half> @test_vrndq_f16(536// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {537// CHECK-NEXT: [[ENTRY:.*:]]538// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>539// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>540// CHECK-NEXT: [[VRNDQ_V_I:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>541// CHECK-NEXT: [[VRNDQ_V1_I:%.*]] = call <8 x half> @llvm.trunc.v8f16(<8 x half> [[VRNDQ_V_I]])542// CHECK-NEXT: [[VRNDQ_V2_I:%.*]] = bitcast <8 x half> [[VRNDQ_V1_I]] to <16 x i8>543// CHECK-NEXT: [[TMP2:%.*]] = bitcast <16 x i8> [[VRNDQ_V2_I]] to <8 x i16>544// CHECK-NEXT: [[TMP3:%.*]] = bitcast <8 x i16> [[TMP2]] to <8 x half>545// CHECK-NEXT: ret <8 x half> [[TMP3]]546//547float16x8_t test_vrndq_f16(float16x8_t a) {548 return vrndq_f16(a);549}550 551// CHECK-LABEL: define dso_local <4 x half> @test_vrnda_f16(552// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {553// CHECK-NEXT: [[ENTRY:.*:]]554// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>555// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>556// CHECK-NEXT: [[VRNDA_V_I:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>557// CHECK-NEXT: [[VRNDA_V1_I:%.*]] = call <4 x half> @llvm.round.v4f16(<4 x half> [[VRNDA_V_I]])558// CHECK-NEXT: [[VRNDA_V2_I:%.*]] = bitcast <4 x half> [[VRNDA_V1_I]] to <8 x i8>559// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i8> [[VRNDA_V2_I]] to <4 x i16>560// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP2]] to <4 x half>561// CHECK-NEXT: ret <4 x half> [[TMP3]]562//563float16x4_t test_vrnda_f16(float16x4_t a) {564 return vrnda_f16(a);565}566 567// CHECK-LABEL: define dso_local <8 x half> @test_vrndaq_f16(568// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {569// CHECK-NEXT: [[ENTRY:.*:]]570// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>571// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>572// CHECK-NEXT: [[VRNDAQ_V_I:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>573// CHECK-NEXT: [[VRNDAQ_V1_I:%.*]] = call <8 x half> @llvm.round.v8f16(<8 x half> [[VRNDAQ_V_I]])574// CHECK-NEXT: [[VRNDAQ_V2_I:%.*]] = bitcast <8 x half> [[VRNDAQ_V1_I]] to <16 x i8>575// CHECK-NEXT: [[TMP2:%.*]] = bitcast <16 x i8> [[VRNDAQ_V2_I]] to <8 x i16>576// CHECK-NEXT: [[TMP3:%.*]] = bitcast <8 x i16> [[TMP2]] to <8 x half>577// CHECK-NEXT: ret <8 x half> [[TMP3]]578//579float16x8_t test_vrndaq_f16(float16x8_t a) {580 return vrndaq_f16(a);581}582 583// CHECK-LABEL: define dso_local <4 x half> @test_vrndm_f16(584// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {585// CHECK-NEXT: [[ENTRY:.*:]]586// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>587// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>588// CHECK-NEXT: [[VRNDM_V_I:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>589// CHECK-NEXT: [[VRNDM_V1_I:%.*]] = call <4 x half> @llvm.floor.v4f16(<4 x half> [[VRNDM_V_I]])590// CHECK-NEXT: [[VRNDM_V2_I:%.*]] = bitcast <4 x half> [[VRNDM_V1_I]] to <8 x i8>591// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i8> [[VRNDM_V2_I]] to <4 x i16>592// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP2]] to <4 x half>593// CHECK-NEXT: ret <4 x half> [[TMP3]]594//595float16x4_t test_vrndm_f16(float16x4_t a) {596 return vrndm_f16(a);597}598 599// CHECK-LABEL: define dso_local <8 x half> @test_vrndmq_f16(600// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {601// CHECK-NEXT: [[ENTRY:.*:]]602// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>603// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>604// CHECK-NEXT: [[VRNDMQ_V_I:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>605// CHECK-NEXT: [[VRNDMQ_V1_I:%.*]] = call <8 x half> @llvm.floor.v8f16(<8 x half> [[VRNDMQ_V_I]])606// CHECK-NEXT: [[VRNDMQ_V2_I:%.*]] = bitcast <8 x half> [[VRNDMQ_V1_I]] to <16 x i8>607// CHECK-NEXT: [[TMP2:%.*]] = bitcast <16 x i8> [[VRNDMQ_V2_I]] to <8 x i16>608// CHECK-NEXT: [[TMP3:%.*]] = bitcast <8 x i16> [[TMP2]] to <8 x half>609// CHECK-NEXT: ret <8 x half> [[TMP3]]610//611float16x8_t test_vrndmq_f16(float16x8_t a) {612 return vrndmq_f16(a);613}614 615// CHECK-LABEL: define dso_local <4 x half> @test_vrndn_f16(616// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {617// CHECK-NEXT: [[ENTRY:.*:]]618// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>619// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>620// CHECK-NEXT: [[VRNDN_V_I:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>621// CHECK-NEXT: [[VRNDN_V1_I:%.*]] = call <4 x half> @llvm.roundeven.v4f16(<4 x half> [[VRNDN_V_I]])622// CHECK-NEXT: [[VRNDN_V2_I:%.*]] = bitcast <4 x half> [[VRNDN_V1_I]] to <8 x i8>623// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i8> [[VRNDN_V2_I]] to <4 x i16>624// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP2]] to <4 x half>625// CHECK-NEXT: ret <4 x half> [[TMP3]]626//627float16x4_t test_vrndn_f16(float16x4_t a) {628 return vrndn_f16(a);629}630 631// CHECK-LABEL: define dso_local <8 x half> @test_vrndnq_f16(632// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {633// CHECK-NEXT: [[ENTRY:.*:]]634// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>635// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>636// CHECK-NEXT: [[VRNDNQ_V_I:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>637// CHECK-NEXT: [[VRNDNQ_V1_I:%.*]] = call <8 x half> @llvm.roundeven.v8f16(<8 x half> [[VRNDNQ_V_I]])638// CHECK-NEXT: [[VRNDNQ_V2_I:%.*]] = bitcast <8 x half> [[VRNDNQ_V1_I]] to <16 x i8>639// CHECK-NEXT: [[TMP2:%.*]] = bitcast <16 x i8> [[VRNDNQ_V2_I]] to <8 x i16>640// CHECK-NEXT: [[TMP3:%.*]] = bitcast <8 x i16> [[TMP2]] to <8 x half>641// CHECK-NEXT: ret <8 x half> [[TMP3]]642//643float16x8_t test_vrndnq_f16(float16x8_t a) {644 return vrndnq_f16(a);645}646 647// CHECK-LABEL: define dso_local <4 x half> @test_vrndp_f16(648// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {649// CHECK-NEXT: [[ENTRY:.*:]]650// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>651// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>652// CHECK-NEXT: [[VRNDP_V_I:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>653// CHECK-NEXT: [[VRNDP_V1_I:%.*]] = call <4 x half> @llvm.ceil.v4f16(<4 x half> [[VRNDP_V_I]])654// CHECK-NEXT: [[VRNDP_V2_I:%.*]] = bitcast <4 x half> [[VRNDP_V1_I]] to <8 x i8>655// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i8> [[VRNDP_V2_I]] to <4 x i16>656// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP2]] to <4 x half>657// CHECK-NEXT: ret <4 x half> [[TMP3]]658//659float16x4_t test_vrndp_f16(float16x4_t a) {660 return vrndp_f16(a);661}662 663// CHECK-LABEL: define dso_local <8 x half> @test_vrndpq_f16(664// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {665// CHECK-NEXT: [[ENTRY:.*:]]666// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>667// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>668// CHECK-NEXT: [[VRNDPQ_V_I:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>669// CHECK-NEXT: [[VRNDPQ_V1_I:%.*]] = call <8 x half> @llvm.ceil.v8f16(<8 x half> [[VRNDPQ_V_I]])670// CHECK-NEXT: [[VRNDPQ_V2_I:%.*]] = bitcast <8 x half> [[VRNDPQ_V1_I]] to <16 x i8>671// CHECK-NEXT: [[TMP2:%.*]] = bitcast <16 x i8> [[VRNDPQ_V2_I]] to <8 x i16>672// CHECK-NEXT: [[TMP3:%.*]] = bitcast <8 x i16> [[TMP2]] to <8 x half>673// CHECK-NEXT: ret <8 x half> [[TMP3]]674//675float16x8_t test_vrndpq_f16(float16x8_t a) {676 return vrndpq_f16(a);677}678 679// CHECK-LABEL: define dso_local <4 x half> @test_vrndx_f16(680// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {681// CHECK-NEXT: [[ENTRY:.*:]]682// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>683// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>684// CHECK-NEXT: [[VRNDX_V_I:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>685// CHECK-NEXT: [[VRNDX_V1_I:%.*]] = call <4 x half> @llvm.rint.v4f16(<4 x half> [[VRNDX_V_I]])686// CHECK-NEXT: [[VRNDX_V2_I:%.*]] = bitcast <4 x half> [[VRNDX_V1_I]] to <8 x i8>687// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i8> [[VRNDX_V2_I]] to <4 x i16>688// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP2]] to <4 x half>689// CHECK-NEXT: ret <4 x half> [[TMP3]]690//691float16x4_t test_vrndx_f16(float16x4_t a) {692 return vrndx_f16(a);693}694 695// CHECK-LABEL: define dso_local <8 x half> @test_vrndxq_f16(696// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {697// CHECK-NEXT: [[ENTRY:.*:]]698// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>699// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>700// CHECK-NEXT: [[VRNDXQ_V_I:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>701// CHECK-NEXT: [[VRNDXQ_V1_I:%.*]] = call <8 x half> @llvm.rint.v8f16(<8 x half> [[VRNDXQ_V_I]])702// CHECK-NEXT: [[VRNDXQ_V2_I:%.*]] = bitcast <8 x half> [[VRNDXQ_V1_I]] to <16 x i8>703// CHECK-NEXT: [[TMP2:%.*]] = bitcast <16 x i8> [[VRNDXQ_V2_I]] to <8 x i16>704// CHECK-NEXT: [[TMP3:%.*]] = bitcast <8 x i16> [[TMP2]] to <8 x half>705// CHECK-NEXT: ret <8 x half> [[TMP3]]706//707float16x8_t test_vrndxq_f16(float16x8_t a) {708 return vrndxq_f16(a);709}710 711// CHECK-LABEL: define dso_local <4 x half> @test_vrsqrte_f16(712// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {713// CHECK-NEXT: [[ENTRY:.*:]]714// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>715// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>716// CHECK-NEXT: [[VRSQRTE_V_I:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>717// CHECK-NEXT: [[VRSQRTE_V1_I:%.*]] = call <4 x half> @llvm.arm.neon.vrsqrte.v4f16(<4 x half> [[VRSQRTE_V_I]])718// CHECK-NEXT: ret <4 x half> [[VRSQRTE_V1_I]]719//720float16x4_t test_vrsqrte_f16(float16x4_t a) {721 return vrsqrte_f16(a);722}723 724// CHECK-LABEL: define dso_local <8 x half> @test_vrsqrteq_f16(725// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {726// CHECK-NEXT: [[ENTRY:.*:]]727// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>728// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>729// CHECK-NEXT: [[VRSQRTEQ_V_I:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>730// CHECK-NEXT: [[VRSQRTEQ_V1_I:%.*]] = call <8 x half> @llvm.arm.neon.vrsqrte.v8f16(<8 x half> [[VRSQRTEQ_V_I]])731// CHECK-NEXT: ret <8 x half> [[VRSQRTEQ_V1_I]]732//733float16x8_t test_vrsqrteq_f16(float16x8_t a) {734 return vrsqrteq_f16(a);735}736 737// CHECK-LABEL: define dso_local <4 x half> @test_vadd_f16(738// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {739// CHECK-NEXT: [[ENTRY:.*:]]740// CHECK-NEXT: [[ADD_I:%.*]] = fadd <4 x half> [[A]], [[B]]741// CHECK-NEXT: ret <4 x half> [[ADD_I]]742//743float16x4_t test_vadd_f16(float16x4_t a, float16x4_t b) {744 return vadd_f16(a, b);745}746 747// CHECK-LABEL: define dso_local <8 x half> @test_vaddq_f16(748// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {749// CHECK-NEXT: [[ENTRY:.*:]]750// CHECK-NEXT: [[ADD_I:%.*]] = fadd <8 x half> [[A]], [[B]]751// CHECK-NEXT: ret <8 x half> [[ADD_I]]752//753float16x8_t test_vaddq_f16(float16x8_t a, float16x8_t b) {754 return vaddq_f16(a, b);755}756 757// CHECK-LABEL: define dso_local <4 x half> @test_vabd_f16(758// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {759// CHECK-NEXT: [[ENTRY:.*:]]760// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>761// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x half> [[B]] to <4 x i16>762// CHECK-NEXT: [[TMP2:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>763// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP1]] to <8 x i8>764// CHECK-NEXT: [[VABD_V_I:%.*]] = bitcast <8 x i8> [[TMP2]] to <4 x half>765// CHECK-NEXT: [[VABD_V1_I:%.*]] = bitcast <8 x i8> [[TMP3]] to <4 x half>766// CHECK-NEXT: [[VABD_V2_I:%.*]] = call <4 x half> @llvm.arm.neon.vabds.v4f16(<4 x half> [[VABD_V_I]], <4 x half> [[VABD_V1_I]])767// CHECK-NEXT: [[VABD_V3_I:%.*]] = bitcast <4 x half> [[VABD_V2_I]] to <8 x i8>768// CHECK-NEXT: [[TMP4:%.*]] = bitcast <8 x i8> [[VABD_V3_I]] to <4 x i16>769// CHECK-NEXT: [[TMP5:%.*]] = bitcast <4 x i16> [[TMP4]] to <4 x half>770// CHECK-NEXT: ret <4 x half> [[TMP5]]771//772float16x4_t test_vabd_f16(float16x4_t a, float16x4_t b) {773 return vabd_f16(a, b);774}775 776// CHECK-LABEL: define dso_local <8 x half> @test_vabdq_f16(777// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {778// CHECK-NEXT: [[ENTRY:.*:]]779// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>780// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x half> [[B]] to <8 x i16>781// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>782// CHECK-NEXT: [[TMP3:%.*]] = bitcast <8 x i16> [[TMP1]] to <16 x i8>783// CHECK-NEXT: [[VABDQ_V_I:%.*]] = bitcast <16 x i8> [[TMP2]] to <8 x half>784// CHECK-NEXT: [[VABDQ_V1_I:%.*]] = bitcast <16 x i8> [[TMP3]] to <8 x half>785// CHECK-NEXT: [[VABDQ_V2_I:%.*]] = call <8 x half> @llvm.arm.neon.vabds.v8f16(<8 x half> [[VABDQ_V_I]], <8 x half> [[VABDQ_V1_I]])786// CHECK-NEXT: [[VABDQ_V3_I:%.*]] = bitcast <8 x half> [[VABDQ_V2_I]] to <16 x i8>787// CHECK-NEXT: [[TMP4:%.*]] = bitcast <16 x i8> [[VABDQ_V3_I]] to <8 x i16>788// CHECK-NEXT: [[TMP5:%.*]] = bitcast <8 x i16> [[TMP4]] to <8 x half>789// CHECK-NEXT: ret <8 x half> [[TMP5]]790//791float16x8_t test_vabdq_f16(float16x8_t a, float16x8_t b) {792 return vabdq_f16(a, b);793}794 795// CHECK-LABEL: define dso_local <4 x i16> @test_vcage_f16(796// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {797// CHECK-NEXT: [[ENTRY:.*:]]798// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>799// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x half> [[B]] to <4 x i16>800// CHECK-NEXT: [[TMP2:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>801// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP1]] to <8 x i8>802// CHECK-NEXT: [[VCAGE_V_I:%.*]] = bitcast <8 x i8> [[TMP2]] to <4 x half>803// CHECK-NEXT: [[VCAGE_V1_I:%.*]] = bitcast <8 x i8> [[TMP3]] to <4 x half>804// CHECK-NEXT: [[VCAGE_V2_I:%.*]] = call <4 x i16> @llvm.arm.neon.vacge.v4i16.v4f16(<4 x half> [[VCAGE_V_I]], <4 x half> [[VCAGE_V1_I]])805// CHECK-NEXT: ret <4 x i16> [[VCAGE_V2_I]]806//807uint16x4_t test_vcage_f16(float16x4_t a, float16x4_t b) {808 return vcage_f16(a, b);809}810 811// CHECK-LABEL: define dso_local <8 x i16> @test_vcageq_f16(812// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {813// CHECK-NEXT: [[ENTRY:.*:]]814// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>815// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x half> [[B]] to <8 x i16>816// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>817// CHECK-NEXT: [[TMP3:%.*]] = bitcast <8 x i16> [[TMP1]] to <16 x i8>818// CHECK-NEXT: [[VCAGEQ_V_I:%.*]] = bitcast <16 x i8> [[TMP2]] to <8 x half>819// CHECK-NEXT: [[VCAGEQ_V1_I:%.*]] = bitcast <16 x i8> [[TMP3]] to <8 x half>820// CHECK-NEXT: [[VCAGEQ_V2_I:%.*]] = call <8 x i16> @llvm.arm.neon.vacge.v8i16.v8f16(<8 x half> [[VCAGEQ_V_I]], <8 x half> [[VCAGEQ_V1_I]])821// CHECK-NEXT: ret <8 x i16> [[VCAGEQ_V2_I]]822//823uint16x8_t test_vcageq_f16(float16x8_t a, float16x8_t b) {824 return vcageq_f16(a, b);825}826 827// CHECK-LABEL: define dso_local <4 x i16> @test_vcagt_f16(828// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {829// CHECK-NEXT: [[ENTRY:.*:]]830// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>831// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x half> [[B]] to <4 x i16>832// CHECK-NEXT: [[TMP2:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>833// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP1]] to <8 x i8>834// CHECK-NEXT: [[VCAGT_V_I:%.*]] = bitcast <8 x i8> [[TMP2]] to <4 x half>835// CHECK-NEXT: [[VCAGT_V1_I:%.*]] = bitcast <8 x i8> [[TMP3]] to <4 x half>836// CHECK-NEXT: [[VCAGT_V2_I:%.*]] = call <4 x i16> @llvm.arm.neon.vacgt.v4i16.v4f16(<4 x half> [[VCAGT_V_I]], <4 x half> [[VCAGT_V1_I]])837// CHECK-NEXT: ret <4 x i16> [[VCAGT_V2_I]]838//839uint16x4_t test_vcagt_f16(float16x4_t a, float16x4_t b) {840 return vcagt_f16(a, b);841}842 843// CHECK-LABEL: define dso_local <8 x i16> @test_vcagtq_f16(844// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {845// CHECK-NEXT: [[ENTRY:.*:]]846// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>847// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x half> [[B]] to <8 x i16>848// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>849// CHECK-NEXT: [[TMP3:%.*]] = bitcast <8 x i16> [[TMP1]] to <16 x i8>850// CHECK-NEXT: [[VCAGTQ_V_I:%.*]] = bitcast <16 x i8> [[TMP2]] to <8 x half>851// CHECK-NEXT: [[VCAGTQ_V1_I:%.*]] = bitcast <16 x i8> [[TMP3]] to <8 x half>852// CHECK-NEXT: [[VCAGTQ_V2_I:%.*]] = call <8 x i16> @llvm.arm.neon.vacgt.v8i16.v8f16(<8 x half> [[VCAGTQ_V_I]], <8 x half> [[VCAGTQ_V1_I]])853// CHECK-NEXT: ret <8 x i16> [[VCAGTQ_V2_I]]854//855uint16x8_t test_vcagtq_f16(float16x8_t a, float16x8_t b) {856 return vcagtq_f16(a, b);857}858 859// CHECK-LABEL: define dso_local <4 x i16> @test_vcale_f16(860// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {861// CHECK-NEXT: [[ENTRY:.*:]]862// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>863// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x half> [[B]] to <4 x i16>864// CHECK-NEXT: [[TMP2:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>865// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP1]] to <8 x i8>866// CHECK-NEXT: [[VCALE_V_I:%.*]] = bitcast <8 x i8> [[TMP3]] to <4 x half>867// CHECK-NEXT: [[VCALE_V1_I:%.*]] = bitcast <8 x i8> [[TMP2]] to <4 x half>868// CHECK-NEXT: [[VCALE_V2_I:%.*]] = call <4 x i16> @llvm.arm.neon.vacge.v4i16.v4f16(<4 x half> [[VCALE_V_I]], <4 x half> [[VCALE_V1_I]])869// CHECK-NEXT: ret <4 x i16> [[VCALE_V2_I]]870//871uint16x4_t test_vcale_f16(float16x4_t a, float16x4_t b) {872 return vcale_f16(a, b);873}874 875// CHECK-LABEL: define dso_local <8 x i16> @test_vcaleq_f16(876// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {877// CHECK-NEXT: [[ENTRY:.*:]]878// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>879// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x half> [[B]] to <8 x i16>880// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>881// CHECK-NEXT: [[TMP3:%.*]] = bitcast <8 x i16> [[TMP1]] to <16 x i8>882// CHECK-NEXT: [[VCALEQ_V_I:%.*]] = bitcast <16 x i8> [[TMP3]] to <8 x half>883// CHECK-NEXT: [[VCALEQ_V1_I:%.*]] = bitcast <16 x i8> [[TMP2]] to <8 x half>884// CHECK-NEXT: [[VCALEQ_V2_I:%.*]] = call <8 x i16> @llvm.arm.neon.vacge.v8i16.v8f16(<8 x half> [[VCALEQ_V_I]], <8 x half> [[VCALEQ_V1_I]])885// CHECK-NEXT: ret <8 x i16> [[VCALEQ_V2_I]]886//887uint16x8_t test_vcaleq_f16(float16x8_t a, float16x8_t b) {888 return vcaleq_f16(a, b);889}890 891// CHECK-LABEL: define dso_local <4 x i16> @test_vcalt_f16(892// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {893// CHECK-NEXT: [[ENTRY:.*:]]894// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>895// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x half> [[B]] to <4 x i16>896// CHECK-NEXT: [[TMP2:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>897// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP1]] to <8 x i8>898// CHECK-NEXT: [[VCALT_V_I:%.*]] = bitcast <8 x i8> [[TMP3]] to <4 x half>899// CHECK-NEXT: [[VCALT_V1_I:%.*]] = bitcast <8 x i8> [[TMP2]] to <4 x half>900// CHECK-NEXT: [[VCALT_V2_I:%.*]] = call <4 x i16> @llvm.arm.neon.vacgt.v4i16.v4f16(<4 x half> [[VCALT_V_I]], <4 x half> [[VCALT_V1_I]])901// CHECK-NEXT: ret <4 x i16> [[VCALT_V2_I]]902//903uint16x4_t test_vcalt_f16(float16x4_t a, float16x4_t b) {904 return vcalt_f16(a, b);905}906 907// CHECK-LABEL: define dso_local <8 x i16> @test_vcaltq_f16(908// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {909// CHECK-NEXT: [[ENTRY:.*:]]910// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>911// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x half> [[B]] to <8 x i16>912// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>913// CHECK-NEXT: [[TMP3:%.*]] = bitcast <8 x i16> [[TMP1]] to <16 x i8>914// CHECK-NEXT: [[VCALTQ_V_I:%.*]] = bitcast <16 x i8> [[TMP3]] to <8 x half>915// CHECK-NEXT: [[VCALTQ_V1_I:%.*]] = bitcast <16 x i8> [[TMP2]] to <8 x half>916// CHECK-NEXT: [[VCALTQ_V2_I:%.*]] = call <8 x i16> @llvm.arm.neon.vacgt.v8i16.v8f16(<8 x half> [[VCALTQ_V_I]], <8 x half> [[VCALTQ_V1_I]])917// CHECK-NEXT: ret <8 x i16> [[VCALTQ_V2_I]]918//919uint16x8_t test_vcaltq_f16(float16x8_t a, float16x8_t b) {920 return vcaltq_f16(a, b);921}922 923// CHECK-LABEL: define dso_local <4 x i16> @test_vceq_f16(924// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {925// CHECK-NEXT: [[ENTRY:.*:]]926// CHECK-NEXT: [[CMP_I:%.*]] = fcmp oeq <4 x half> [[A]], [[B]]927// CHECK-NEXT: [[SEXT_I:%.*]] = sext <4 x i1> [[CMP_I]] to <4 x i16>928// CHECK-NEXT: ret <4 x i16> [[SEXT_I]]929//930uint16x4_t test_vceq_f16(float16x4_t a, float16x4_t b) {931 return vceq_f16(a, b);932}933 934// CHECK-LABEL: define dso_local <8 x i16> @test_vceqq_f16(935// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {936// CHECK-NEXT: [[ENTRY:.*:]]937// CHECK-NEXT: [[CMP_I:%.*]] = fcmp oeq <8 x half> [[A]], [[B]]938// CHECK-NEXT: [[SEXT_I:%.*]] = sext <8 x i1> [[CMP_I]] to <8 x i16>939// CHECK-NEXT: ret <8 x i16> [[SEXT_I]]940//941uint16x8_t test_vceqq_f16(float16x8_t a, float16x8_t b) {942 return vceqq_f16(a, b);943}944 945// CHECK-LABEL: define dso_local <4 x i16> @test_vcge_f16(946// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {947// CHECK-NEXT: [[ENTRY:.*:]]948// CHECK-NEXT: [[CMP_I:%.*]] = fcmp oge <4 x half> [[A]], [[B]]949// CHECK-NEXT: [[SEXT_I:%.*]] = sext <4 x i1> [[CMP_I]] to <4 x i16>950// CHECK-NEXT: ret <4 x i16> [[SEXT_I]]951//952uint16x4_t test_vcge_f16(float16x4_t a, float16x4_t b) {953 return vcge_f16(a, b);954}955 956// CHECK-LABEL: define dso_local <8 x i16> @test_vcgeq_f16(957// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {958// CHECK-NEXT: [[ENTRY:.*:]]959// CHECK-NEXT: [[CMP_I:%.*]] = fcmp oge <8 x half> [[A]], [[B]]960// CHECK-NEXT: [[SEXT_I:%.*]] = sext <8 x i1> [[CMP_I]] to <8 x i16>961// CHECK-NEXT: ret <8 x i16> [[SEXT_I]]962//963uint16x8_t test_vcgeq_f16(float16x8_t a, float16x8_t b) {964 return vcgeq_f16(a, b);965}966 967// CHECK-LABEL: define dso_local <4 x i16> @test_vcgt_f16(968// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {969// CHECK-NEXT: [[ENTRY:.*:]]970// CHECK-NEXT: [[CMP_I:%.*]] = fcmp ogt <4 x half> [[A]], [[B]]971// CHECK-NEXT: [[SEXT_I:%.*]] = sext <4 x i1> [[CMP_I]] to <4 x i16>972// CHECK-NEXT: ret <4 x i16> [[SEXT_I]]973//974uint16x4_t test_vcgt_f16(float16x4_t a, float16x4_t b) {975 return vcgt_f16(a, b);976}977 978// CHECK-LABEL: define dso_local <8 x i16> @test_vcgtq_f16(979// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {980// CHECK-NEXT: [[ENTRY:.*:]]981// CHECK-NEXT: [[CMP_I:%.*]] = fcmp ogt <8 x half> [[A]], [[B]]982// CHECK-NEXT: [[SEXT_I:%.*]] = sext <8 x i1> [[CMP_I]] to <8 x i16>983// CHECK-NEXT: ret <8 x i16> [[SEXT_I]]984//985uint16x8_t test_vcgtq_f16(float16x8_t a, float16x8_t b) {986 return vcgtq_f16(a, b);987}988 989// CHECK-LABEL: define dso_local <4 x i16> @test_vcle_f16(990// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {991// CHECK-NEXT: [[ENTRY:.*:]]992// CHECK-NEXT: [[CMP_I:%.*]] = fcmp ole <4 x half> [[A]], [[B]]993// CHECK-NEXT: [[SEXT_I:%.*]] = sext <4 x i1> [[CMP_I]] to <4 x i16>994// CHECK-NEXT: ret <4 x i16> [[SEXT_I]]995//996uint16x4_t test_vcle_f16(float16x4_t a, float16x4_t b) {997 return vcle_f16(a, b);998}999 1000// CHECK-LABEL: define dso_local <8 x i16> @test_vcleq_f16(1001// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {1002// CHECK-NEXT: [[ENTRY:.*:]]1003// CHECK-NEXT: [[CMP_I:%.*]] = fcmp ole <8 x half> [[A]], [[B]]1004// CHECK-NEXT: [[SEXT_I:%.*]] = sext <8 x i1> [[CMP_I]] to <8 x i16>1005// CHECK-NEXT: ret <8 x i16> [[SEXT_I]]1006//1007uint16x8_t test_vcleq_f16(float16x8_t a, float16x8_t b) {1008 return vcleq_f16(a, b);1009}1010 1011// CHECK-LABEL: define dso_local <4 x i16> @test_vclt_f16(1012// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {1013// CHECK-NEXT: [[ENTRY:.*:]]1014// CHECK-NEXT: [[CMP_I:%.*]] = fcmp olt <4 x half> [[A]], [[B]]1015// CHECK-NEXT: [[SEXT_I:%.*]] = sext <4 x i1> [[CMP_I]] to <4 x i16>1016// CHECK-NEXT: ret <4 x i16> [[SEXT_I]]1017//1018uint16x4_t test_vclt_f16(float16x4_t a, float16x4_t b) {1019 return vclt_f16(a, b);1020}1021 1022// CHECK-LABEL: define dso_local <8 x i16> @test_vcltq_f16(1023// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {1024// CHECK-NEXT: [[ENTRY:.*:]]1025// CHECK-NEXT: [[CMP_I:%.*]] = fcmp olt <8 x half> [[A]], [[B]]1026// CHECK-NEXT: [[SEXT_I:%.*]] = sext <8 x i1> [[CMP_I]] to <8 x i16>1027// CHECK-NEXT: ret <8 x i16> [[SEXT_I]]1028//1029uint16x8_t test_vcltq_f16(float16x8_t a, float16x8_t b) {1030 return vcltq_f16(a, b);1031}1032 1033// CHECK-LABEL: define dso_local <4 x half> @test_vcvt_n_f16_s16(1034// CHECK-SAME: <4 x i16> noundef [[A:%.*]]) #[[ATTR0]] {1035// CHECK-NEXT: [[ENTRY:.*:]]1036// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x i16> [[A]] to <8 x i8>1037// CHECK-NEXT: [[VCVT_N:%.*]] = bitcast <8 x i8> [[TMP0]] to <4 x i16>1038// CHECK-NEXT: [[VCVT_N1:%.*]] = call <4 x half> @llvm.arm.neon.vcvtfxs2fp.v4f16.v4i16(<4 x i16> [[VCVT_N]], i32 2)1039// CHECK-NEXT: ret <4 x half> [[VCVT_N1]]1040//1041float16x4_t test_vcvt_n_f16_s16(int16x4_t a) {1042 return vcvt_n_f16_s16(a, 2);1043}1044 1045// CHECK-LABEL: define dso_local <8 x half> @test_vcvtq_n_f16_s16(1046// CHECK-SAME: <8 x i16> noundef [[A:%.*]]) #[[ATTR0]] {1047// CHECK-NEXT: [[ENTRY:.*:]]1048// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x i16> [[A]] to <16 x i8>1049// CHECK-NEXT: [[VCVT_N:%.*]] = bitcast <16 x i8> [[TMP0]] to <8 x i16>1050// CHECK-NEXT: [[VCVT_N1:%.*]] = call <8 x half> @llvm.arm.neon.vcvtfxs2fp.v8f16.v8i16(<8 x i16> [[VCVT_N]], i32 2)1051// CHECK-NEXT: ret <8 x half> [[VCVT_N1]]1052//1053float16x8_t test_vcvtq_n_f16_s16(int16x8_t a) {1054 return vcvtq_n_f16_s16(a, 2);1055}1056 1057// CHECK-LABEL: define dso_local <4 x half> @test_vcvt_n_f16_u16(1058// CHECK-SAME: <4 x i16> noundef [[A:%.*]]) #[[ATTR0]] {1059// CHECK-NEXT: [[ENTRY:.*:]]1060// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x i16> [[A]] to <8 x i8>1061// CHECK-NEXT: [[VCVT_N:%.*]] = bitcast <8 x i8> [[TMP0]] to <4 x i16>1062// CHECK-NEXT: [[VCVT_N1:%.*]] = call <4 x half> @llvm.arm.neon.vcvtfxu2fp.v4f16.v4i16(<4 x i16> [[VCVT_N]], i32 2)1063// CHECK-NEXT: ret <4 x half> [[VCVT_N1]]1064//1065float16x4_t test_vcvt_n_f16_u16(uint16x4_t a) {1066 return vcvt_n_f16_u16(a, 2);1067}1068 1069// CHECK-LABEL: define dso_local <8 x half> @test_vcvtq_n_f16_u16(1070// CHECK-SAME: <8 x i16> noundef [[A:%.*]]) #[[ATTR0]] {1071// CHECK-NEXT: [[ENTRY:.*:]]1072// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x i16> [[A]] to <16 x i8>1073// CHECK-NEXT: [[VCVT_N:%.*]] = bitcast <16 x i8> [[TMP0]] to <8 x i16>1074// CHECK-NEXT: [[VCVT_N1:%.*]] = call <8 x half> @llvm.arm.neon.vcvtfxu2fp.v8f16.v8i16(<8 x i16> [[VCVT_N]], i32 2)1075// CHECK-NEXT: ret <8 x half> [[VCVT_N1]]1076//1077float16x8_t test_vcvtq_n_f16_u16(uint16x8_t a) {1078 return vcvtq_n_f16_u16(a, 2);1079}1080 1081// CHECK-LABEL: define dso_local <4 x i16> @test_vcvt_n_s16_f16(1082// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {1083// CHECK-NEXT: [[ENTRY:.*:]]1084// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>1085// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>1086// CHECK-NEXT: [[VCVT_N:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>1087// CHECK-NEXT: [[VCVT_N1:%.*]] = call <4 x i16> @llvm.arm.neon.vcvtfp2fxs.v4i16.v4f16(<4 x half> [[VCVT_N]], i32 2)1088// CHECK-NEXT: ret <4 x i16> [[VCVT_N1]]1089//1090int16x4_t test_vcvt_n_s16_f16(float16x4_t a) {1091 return vcvt_n_s16_f16(a, 2);1092}1093 1094// CHECK-LABEL: define dso_local <8 x i16> @test_vcvtq_n_s16_f16(1095// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {1096// CHECK-NEXT: [[ENTRY:.*:]]1097// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>1098// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>1099// CHECK-NEXT: [[VCVT_N:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>1100// CHECK-NEXT: [[VCVT_N1:%.*]] = call <8 x i16> @llvm.arm.neon.vcvtfp2fxs.v8i16.v8f16(<8 x half> [[VCVT_N]], i32 2)1101// CHECK-NEXT: ret <8 x i16> [[VCVT_N1]]1102//1103int16x8_t test_vcvtq_n_s16_f16(float16x8_t a) {1104 return vcvtq_n_s16_f16(a, 2);1105}1106 1107// CHECK-LABEL: define dso_local <4 x i16> @test_vcvt_n_u16_f16(1108// CHECK-SAME: <4 x half> noundef [[A:%.*]]) #[[ATTR0]] {1109// CHECK-NEXT: [[ENTRY:.*:]]1110// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>1111// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>1112// CHECK-NEXT: [[VCVT_N:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>1113// CHECK-NEXT: [[VCVT_N1:%.*]] = call <4 x i16> @llvm.arm.neon.vcvtfp2fxu.v4i16.v4f16(<4 x half> [[VCVT_N]], i32 2)1114// CHECK-NEXT: ret <4 x i16> [[VCVT_N1]]1115//1116uint16x4_t test_vcvt_n_u16_f16(float16x4_t a) {1117 return vcvt_n_u16_f16(a, 2);1118}1119 1120// CHECK-LABEL: define dso_local <8 x i16> @test_vcvtq_n_u16_f16(1121// CHECK-SAME: <8 x half> noundef [[A:%.*]]) #[[ATTR0]] {1122// CHECK-NEXT: [[ENTRY:.*:]]1123// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>1124// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>1125// CHECK-NEXT: [[VCVT_N:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half>1126// CHECK-NEXT: [[VCVT_N1:%.*]] = call <8 x i16> @llvm.arm.neon.vcvtfp2fxu.v8i16.v8f16(<8 x half> [[VCVT_N]], i32 2)1127// CHECK-NEXT: ret <8 x i16> [[VCVT_N1]]1128//1129uint16x8_t test_vcvtq_n_u16_f16(float16x8_t a) {1130 return vcvtq_n_u16_f16(a, 2);1131}1132 1133// CHECK-LABEL: define dso_local <4 x half> @test_vmax_f16(1134// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {1135// CHECK-NEXT: [[ENTRY:.*:]]1136// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>1137// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x half> [[B]] to <4 x i16>1138// CHECK-NEXT: [[TMP2:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>1139// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP1]] to <8 x i8>1140// CHECK-NEXT: [[VMAX_V_I:%.*]] = bitcast <8 x i8> [[TMP2]] to <4 x half>1141// CHECK-NEXT: [[VMAX_V1_I:%.*]] = bitcast <8 x i8> [[TMP3]] to <4 x half>1142// CHECK-NEXT: [[VMAX_V2_I:%.*]] = call <4 x half> @llvm.arm.neon.vmaxs.v4f16(<4 x half> [[VMAX_V_I]], <4 x half> [[VMAX_V1_I]])1143// CHECK-NEXT: [[VMAX_V3_I:%.*]] = bitcast <4 x half> [[VMAX_V2_I]] to <8 x i8>1144// CHECK-NEXT: [[TMP4:%.*]] = bitcast <8 x i8> [[VMAX_V3_I]] to <4 x i16>1145// CHECK-NEXT: [[TMP5:%.*]] = bitcast <4 x i16> [[TMP4]] to <4 x half>1146// CHECK-NEXT: ret <4 x half> [[TMP5]]1147//1148float16x4_t test_vmax_f16(float16x4_t a, float16x4_t b) {1149 return vmax_f16(a, b);1150}1151 1152// CHECK-LABEL: define dso_local <8 x half> @test_vmaxq_f16(1153// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {1154// CHECK-NEXT: [[ENTRY:.*:]]1155// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>1156// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x half> [[B]] to <8 x i16>1157// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>1158// CHECK-NEXT: [[TMP3:%.*]] = bitcast <8 x i16> [[TMP1]] to <16 x i8>1159// CHECK-NEXT: [[VMAXQ_V_I:%.*]] = bitcast <16 x i8> [[TMP2]] to <8 x half>1160// CHECK-NEXT: [[VMAXQ_V1_I:%.*]] = bitcast <16 x i8> [[TMP3]] to <8 x half>1161// CHECK-NEXT: [[VMAXQ_V2_I:%.*]] = call <8 x half> @llvm.arm.neon.vmaxs.v8f16(<8 x half> [[VMAXQ_V_I]], <8 x half> [[VMAXQ_V1_I]])1162// CHECK-NEXT: [[VMAXQ_V3_I:%.*]] = bitcast <8 x half> [[VMAXQ_V2_I]] to <16 x i8>1163// CHECK-NEXT: [[TMP4:%.*]] = bitcast <16 x i8> [[VMAXQ_V3_I]] to <8 x i16>1164// CHECK-NEXT: [[TMP5:%.*]] = bitcast <8 x i16> [[TMP4]] to <8 x half>1165// CHECK-NEXT: ret <8 x half> [[TMP5]]1166//1167float16x8_t test_vmaxq_f16(float16x8_t a, float16x8_t b) {1168 return vmaxq_f16(a, b);1169}1170 1171// CHECK-LABEL: define dso_local <4 x half> @test_vmaxnm_f16(1172// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {1173// CHECK-NEXT: [[ENTRY:.*:]]1174// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>1175// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x half> [[B]] to <4 x i16>1176// CHECK-NEXT: [[TMP2:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>1177// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP1]] to <8 x i8>1178// CHECK-NEXT: [[VMAXNM_V_I:%.*]] = bitcast <8 x i8> [[TMP2]] to <4 x half>1179// CHECK-NEXT: [[VMAXNM_V1_I:%.*]] = bitcast <8 x i8> [[TMP3]] to <4 x half>1180// CHECK-NEXT: [[VMAXNM_V2_I:%.*]] = call <4 x half> @llvm.arm.neon.vmaxnm.v4f16(<4 x half> [[VMAXNM_V_I]], <4 x half> [[VMAXNM_V1_I]])1181// CHECK-NEXT: [[VMAXNM_V3_I:%.*]] = bitcast <4 x half> [[VMAXNM_V2_I]] to <8 x i8>1182// CHECK-NEXT: [[TMP4:%.*]] = bitcast <8 x i8> [[VMAXNM_V3_I]] to <4 x i16>1183// CHECK-NEXT: [[TMP5:%.*]] = bitcast <4 x i16> [[TMP4]] to <4 x half>1184// CHECK-NEXT: ret <4 x half> [[TMP5]]1185//1186float16x4_t test_vmaxnm_f16(float16x4_t a, float16x4_t b) {1187 return vmaxnm_f16(a, b);1188}1189 1190// CHECK-LABEL: define dso_local <8 x half> @test_vmaxnmq_f16(1191// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {1192// CHECK-NEXT: [[ENTRY:.*:]]1193// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>1194// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x half> [[B]] to <8 x i16>1195// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>1196// CHECK-NEXT: [[TMP3:%.*]] = bitcast <8 x i16> [[TMP1]] to <16 x i8>1197// CHECK-NEXT: [[VMAXNMQ_V_I:%.*]] = bitcast <16 x i8> [[TMP2]] to <8 x half>1198// CHECK-NEXT: [[VMAXNMQ_V1_I:%.*]] = bitcast <16 x i8> [[TMP3]] to <8 x half>1199// CHECK-NEXT: [[VMAXNMQ_V2_I:%.*]] = call <8 x half> @llvm.arm.neon.vmaxnm.v8f16(<8 x half> [[VMAXNMQ_V_I]], <8 x half> [[VMAXNMQ_V1_I]])1200// CHECK-NEXT: [[VMAXNMQ_V3_I:%.*]] = bitcast <8 x half> [[VMAXNMQ_V2_I]] to <16 x i8>1201// CHECK-NEXT: [[TMP4:%.*]] = bitcast <16 x i8> [[VMAXNMQ_V3_I]] to <8 x i16>1202// CHECK-NEXT: [[TMP5:%.*]] = bitcast <8 x i16> [[TMP4]] to <8 x half>1203// CHECK-NEXT: ret <8 x half> [[TMP5]]1204//1205float16x8_t test_vmaxnmq_f16(float16x8_t a, float16x8_t b) {1206 return vmaxnmq_f16(a, b);1207}1208 1209// CHECK-LABEL: define dso_local <4 x half> @test_vmin_f16(1210// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {1211// CHECK-NEXT: [[ENTRY:.*:]]1212// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>1213// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x half> [[B]] to <4 x i16>1214// CHECK-NEXT: [[TMP2:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>1215// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP1]] to <8 x i8>1216// CHECK-NEXT: [[VMIN_V_I:%.*]] = bitcast <8 x i8> [[TMP2]] to <4 x half>1217// CHECK-NEXT: [[VMIN_V1_I:%.*]] = bitcast <8 x i8> [[TMP3]] to <4 x half>1218// CHECK-NEXT: [[VMIN_V2_I:%.*]] = call <4 x half> @llvm.arm.neon.vmins.v4f16(<4 x half> [[VMIN_V_I]], <4 x half> [[VMIN_V1_I]])1219// CHECK-NEXT: [[VMIN_V3_I:%.*]] = bitcast <4 x half> [[VMIN_V2_I]] to <8 x i8>1220// CHECK-NEXT: [[TMP4:%.*]] = bitcast <8 x i8> [[VMIN_V3_I]] to <4 x i16>1221// CHECK-NEXT: [[TMP5:%.*]] = bitcast <4 x i16> [[TMP4]] to <4 x half>1222// CHECK-NEXT: ret <4 x half> [[TMP5]]1223//1224float16x4_t test_vmin_f16(float16x4_t a, float16x4_t b) {1225 return vmin_f16(a, b);1226}1227 1228// CHECK-LABEL: define dso_local <8 x half> @test_vminq_f16(1229// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {1230// CHECK-NEXT: [[ENTRY:.*:]]1231// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>1232// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x half> [[B]] to <8 x i16>1233// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>1234// CHECK-NEXT: [[TMP3:%.*]] = bitcast <8 x i16> [[TMP1]] to <16 x i8>1235// CHECK-NEXT: [[VMINQ_V_I:%.*]] = bitcast <16 x i8> [[TMP2]] to <8 x half>1236// CHECK-NEXT: [[VMINQ_V1_I:%.*]] = bitcast <16 x i8> [[TMP3]] to <8 x half>1237// CHECK-NEXT: [[VMINQ_V2_I:%.*]] = call <8 x half> @llvm.arm.neon.vmins.v8f16(<8 x half> [[VMINQ_V_I]], <8 x half> [[VMINQ_V1_I]])1238// CHECK-NEXT: [[VMINQ_V3_I:%.*]] = bitcast <8 x half> [[VMINQ_V2_I]] to <16 x i8>1239// CHECK-NEXT: [[TMP4:%.*]] = bitcast <16 x i8> [[VMINQ_V3_I]] to <8 x i16>1240// CHECK-NEXT: [[TMP5:%.*]] = bitcast <8 x i16> [[TMP4]] to <8 x half>1241// CHECK-NEXT: ret <8 x half> [[TMP5]]1242//1243float16x8_t test_vminq_f16(float16x8_t a, float16x8_t b) {1244 return vminq_f16(a, b);1245}1246 1247// CHECK-LABEL: define dso_local <4 x half> @test_vminnm_f16(1248// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {1249// CHECK-NEXT: [[ENTRY:.*:]]1250// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>1251// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x half> [[B]] to <4 x i16>1252// CHECK-NEXT: [[TMP2:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>1253// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP1]] to <8 x i8>1254// CHECK-NEXT: [[VMINNM_V_I:%.*]] = bitcast <8 x i8> [[TMP2]] to <4 x half>1255// CHECK-NEXT: [[VMINNM_V1_I:%.*]] = bitcast <8 x i8> [[TMP3]] to <4 x half>1256// CHECK-NEXT: [[VMINNM_V2_I:%.*]] = call <4 x half> @llvm.arm.neon.vminnm.v4f16(<4 x half> [[VMINNM_V_I]], <4 x half> [[VMINNM_V1_I]])1257// CHECK-NEXT: [[VMINNM_V3_I:%.*]] = bitcast <4 x half> [[VMINNM_V2_I]] to <8 x i8>1258// CHECK-NEXT: [[TMP4:%.*]] = bitcast <8 x i8> [[VMINNM_V3_I]] to <4 x i16>1259// CHECK-NEXT: [[TMP5:%.*]] = bitcast <4 x i16> [[TMP4]] to <4 x half>1260// CHECK-NEXT: ret <4 x half> [[TMP5]]1261//1262float16x4_t test_vminnm_f16(float16x4_t a, float16x4_t b) {1263 return vminnm_f16(a, b);1264}1265 1266// CHECK-LABEL: define dso_local <8 x half> @test_vminnmq_f16(1267// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {1268// CHECK-NEXT: [[ENTRY:.*:]]1269// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>1270// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x half> [[B]] to <8 x i16>1271// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>1272// CHECK-NEXT: [[TMP3:%.*]] = bitcast <8 x i16> [[TMP1]] to <16 x i8>1273// CHECK-NEXT: [[VMINNMQ_V_I:%.*]] = bitcast <16 x i8> [[TMP2]] to <8 x half>1274// CHECK-NEXT: [[VMINNMQ_V1_I:%.*]] = bitcast <16 x i8> [[TMP3]] to <8 x half>1275// CHECK-NEXT: [[VMINNMQ_V2_I:%.*]] = call <8 x half> @llvm.arm.neon.vminnm.v8f16(<8 x half> [[VMINNMQ_V_I]], <8 x half> [[VMINNMQ_V1_I]])1276// CHECK-NEXT: [[VMINNMQ_V3_I:%.*]] = bitcast <8 x half> [[VMINNMQ_V2_I]] to <16 x i8>1277// CHECK-NEXT: [[TMP4:%.*]] = bitcast <16 x i8> [[VMINNMQ_V3_I]] to <8 x i16>1278// CHECK-NEXT: [[TMP5:%.*]] = bitcast <8 x i16> [[TMP4]] to <8 x half>1279// CHECK-NEXT: ret <8 x half> [[TMP5]]1280//1281float16x8_t test_vminnmq_f16(float16x8_t a, float16x8_t b) {1282 return vminnmq_f16(a, b);1283}1284 1285// CHECK-LABEL: define dso_local <4 x half> @test_vmul_f16(1286// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {1287// CHECK-NEXT: [[ENTRY:.*:]]1288// CHECK-NEXT: [[MUL_I:%.*]] = fmul <4 x half> [[A]], [[B]]1289// CHECK-NEXT: ret <4 x half> [[MUL_I]]1290//1291float16x4_t test_vmul_f16(float16x4_t a, float16x4_t b) {1292 return vmul_f16(a, b);1293}1294 1295// CHECK-LABEL: define dso_local <8 x half> @test_vmulq_f16(1296// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {1297// CHECK-NEXT: [[ENTRY:.*:]]1298// CHECK-NEXT: [[MUL_I:%.*]] = fmul <8 x half> [[A]], [[B]]1299// CHECK-NEXT: ret <8 x half> [[MUL_I]]1300//1301float16x8_t test_vmulq_f16(float16x8_t a, float16x8_t b) {1302 return vmulq_f16(a, b);1303}1304 1305// CHECK-LABEL: define dso_local <4 x half> @test_vpadd_f16(1306// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {1307// CHECK-NEXT: [[ENTRY:.*:]]1308// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>1309// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x half> [[B]] to <4 x i16>1310// CHECK-NEXT: [[TMP2:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>1311// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP1]] to <8 x i8>1312// CHECK-NEXT: [[VPADD_V_I:%.*]] = bitcast <8 x i8> [[TMP2]] to <4 x half>1313// CHECK-NEXT: [[VPADD_V1_I:%.*]] = bitcast <8 x i8> [[TMP3]] to <4 x half>1314// CHECK-NEXT: [[VPADD_V2_I:%.*]] = call <4 x half> @llvm.arm.neon.vpadd.v4f16(<4 x half> [[VPADD_V_I]], <4 x half> [[VPADD_V1_I]])1315// CHECK-NEXT: [[VPADD_V3_I:%.*]] = bitcast <4 x half> [[VPADD_V2_I]] to <8 x i8>1316// CHECK-NEXT: [[TMP4:%.*]] = bitcast <8 x i8> [[VPADD_V3_I]] to <4 x i16>1317// CHECK-NEXT: [[TMP5:%.*]] = bitcast <4 x i16> [[TMP4]] to <4 x half>1318// CHECK-NEXT: ret <4 x half> [[TMP5]]1319//1320float16x4_t test_vpadd_f16(float16x4_t a, float16x4_t b) {1321 return vpadd_f16(a, b);1322}1323 1324// CHECK-LABEL: define dso_local <4 x half> @test_vpmax_f16(1325// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {1326// CHECK-NEXT: [[ENTRY:.*:]]1327// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>1328// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x half> [[B]] to <4 x i16>1329// CHECK-NEXT: [[TMP2:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>1330// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP1]] to <8 x i8>1331// CHECK-NEXT: [[VPMAX_V_I:%.*]] = bitcast <8 x i8> [[TMP2]] to <4 x half>1332// CHECK-NEXT: [[VPMAX_V1_I:%.*]] = bitcast <8 x i8> [[TMP3]] to <4 x half>1333// CHECK-NEXT: [[VPMAX_V2_I:%.*]] = call <4 x half> @llvm.arm.neon.vpmaxs.v4f16(<4 x half> [[VPMAX_V_I]], <4 x half> [[VPMAX_V1_I]])1334// CHECK-NEXT: [[VPMAX_V3_I:%.*]] = bitcast <4 x half> [[VPMAX_V2_I]] to <8 x i8>1335// CHECK-NEXT: [[TMP4:%.*]] = bitcast <8 x i8> [[VPMAX_V3_I]] to <4 x i16>1336// CHECK-NEXT: [[TMP5:%.*]] = bitcast <4 x i16> [[TMP4]] to <4 x half>1337// CHECK-NEXT: ret <4 x half> [[TMP5]]1338//1339float16x4_t test_vpmax_f16(float16x4_t a, float16x4_t b) {1340 return vpmax_f16(a, b);1341}1342 1343// CHECK-LABEL: define dso_local <4 x half> @test_vpmin_f16(1344// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {1345// CHECK-NEXT: [[ENTRY:.*:]]1346// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>1347// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x half> [[B]] to <4 x i16>1348// CHECK-NEXT: [[TMP2:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>1349// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP1]] to <8 x i8>1350// CHECK-NEXT: [[VPMIN_V_I:%.*]] = bitcast <8 x i8> [[TMP2]] to <4 x half>1351// CHECK-NEXT: [[VPMIN_V1_I:%.*]] = bitcast <8 x i8> [[TMP3]] to <4 x half>1352// CHECK-NEXT: [[VPMIN_V2_I:%.*]] = call <4 x half> @llvm.arm.neon.vpmins.v4f16(<4 x half> [[VPMIN_V_I]], <4 x half> [[VPMIN_V1_I]])1353// CHECK-NEXT: [[VPMIN_V3_I:%.*]] = bitcast <4 x half> [[VPMIN_V2_I]] to <8 x i8>1354// CHECK-NEXT: [[TMP4:%.*]] = bitcast <8 x i8> [[VPMIN_V3_I]] to <4 x i16>1355// CHECK-NEXT: [[TMP5:%.*]] = bitcast <4 x i16> [[TMP4]] to <4 x half>1356// CHECK-NEXT: ret <4 x half> [[TMP5]]1357//1358float16x4_t test_vpmin_f16(float16x4_t a, float16x4_t b) {1359 return vpmin_f16(a, b);1360}1361 1362// CHECK-LABEL: define dso_local <4 x half> @test_vrecps_f16(1363// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {1364// CHECK-NEXT: [[ENTRY:.*:]]1365// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>1366// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x half> [[B]] to <4 x i16>1367// CHECK-NEXT: [[TMP2:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>1368// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP1]] to <8 x i8>1369// CHECK-NEXT: [[VRECPS_V_I:%.*]] = bitcast <8 x i8> [[TMP2]] to <4 x half>1370// CHECK-NEXT: [[VRECPS_V1_I:%.*]] = bitcast <8 x i8> [[TMP3]] to <4 x half>1371// CHECK-NEXT: [[VRECPS_V2_I:%.*]] = call <4 x half> @llvm.arm.neon.vrecps.v4f16(<4 x half> [[VRECPS_V_I]], <4 x half> [[VRECPS_V1_I]])1372// CHECK-NEXT: [[VRECPS_V3_I:%.*]] = bitcast <4 x half> [[VRECPS_V2_I]] to <8 x i8>1373// CHECK-NEXT: [[TMP4:%.*]] = bitcast <8 x i8> [[VRECPS_V3_I]] to <4 x i16>1374// CHECK-NEXT: [[TMP5:%.*]] = bitcast <4 x i16> [[TMP4]] to <4 x half>1375// CHECK-NEXT: ret <4 x half> [[TMP5]]1376//1377float16x4_t test_vrecps_f16(float16x4_t a, float16x4_t b) {1378 return vrecps_f16(a, b);1379}1380 1381// CHECK-LABEL: define dso_local <8 x half> @test_vrecpsq_f16(1382// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {1383// CHECK-NEXT: [[ENTRY:.*:]]1384// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>1385// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x half> [[B]] to <8 x i16>1386// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>1387// CHECK-NEXT: [[TMP3:%.*]] = bitcast <8 x i16> [[TMP1]] to <16 x i8>1388// CHECK-NEXT: [[VRECPSQ_V_I:%.*]] = bitcast <16 x i8> [[TMP2]] to <8 x half>1389// CHECK-NEXT: [[VRECPSQ_V1_I:%.*]] = bitcast <16 x i8> [[TMP3]] to <8 x half>1390// CHECK-NEXT: [[VRECPSQ_V2_I:%.*]] = call <8 x half> @llvm.arm.neon.vrecps.v8f16(<8 x half> [[VRECPSQ_V_I]], <8 x half> [[VRECPSQ_V1_I]])1391// CHECK-NEXT: [[VRECPSQ_V3_I:%.*]] = bitcast <8 x half> [[VRECPSQ_V2_I]] to <16 x i8>1392// CHECK-NEXT: [[TMP4:%.*]] = bitcast <16 x i8> [[VRECPSQ_V3_I]] to <8 x i16>1393// CHECK-NEXT: [[TMP5:%.*]] = bitcast <8 x i16> [[TMP4]] to <8 x half>1394// CHECK-NEXT: ret <8 x half> [[TMP5]]1395//1396float16x8_t test_vrecpsq_f16(float16x8_t a, float16x8_t b) {1397 return vrecpsq_f16(a, b);1398}1399 1400// CHECK-LABEL: define dso_local <4 x half> @test_vrsqrts_f16(1401// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {1402// CHECK-NEXT: [[ENTRY:.*:]]1403// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>1404// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x half> [[B]] to <4 x i16>1405// CHECK-NEXT: [[TMP2:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>1406// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP1]] to <8 x i8>1407// CHECK-NEXT: [[VRSQRTS_V_I:%.*]] = bitcast <8 x i8> [[TMP2]] to <4 x half>1408// CHECK-NEXT: [[VRSQRTS_V1_I:%.*]] = bitcast <8 x i8> [[TMP3]] to <4 x half>1409// CHECK-NEXT: [[VRSQRTS_V2_I:%.*]] = call <4 x half> @llvm.arm.neon.vrsqrts.v4f16(<4 x half> [[VRSQRTS_V_I]], <4 x half> [[VRSQRTS_V1_I]])1410// CHECK-NEXT: [[VRSQRTS_V3_I:%.*]] = bitcast <4 x half> [[VRSQRTS_V2_I]] to <8 x i8>1411// CHECK-NEXT: [[TMP4:%.*]] = bitcast <8 x i8> [[VRSQRTS_V3_I]] to <4 x i16>1412// CHECK-NEXT: [[TMP5:%.*]] = bitcast <4 x i16> [[TMP4]] to <4 x half>1413// CHECK-NEXT: ret <4 x half> [[TMP5]]1414//1415float16x4_t test_vrsqrts_f16(float16x4_t a, float16x4_t b) {1416 return vrsqrts_f16(a, b);1417}1418 1419// CHECK-LABEL: define dso_local <8 x half> @test_vrsqrtsq_f16(1420// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {1421// CHECK-NEXT: [[ENTRY:.*:]]1422// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>1423// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x half> [[B]] to <8 x i16>1424// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>1425// CHECK-NEXT: [[TMP3:%.*]] = bitcast <8 x i16> [[TMP1]] to <16 x i8>1426// CHECK-NEXT: [[VRSQRTSQ_V_I:%.*]] = bitcast <16 x i8> [[TMP2]] to <8 x half>1427// CHECK-NEXT: [[VRSQRTSQ_V1_I:%.*]] = bitcast <16 x i8> [[TMP3]] to <8 x half>1428// CHECK-NEXT: [[VRSQRTSQ_V2_I:%.*]] = call <8 x half> @llvm.arm.neon.vrsqrts.v8f16(<8 x half> [[VRSQRTSQ_V_I]], <8 x half> [[VRSQRTSQ_V1_I]])1429// CHECK-NEXT: [[VRSQRTSQ_V3_I:%.*]] = bitcast <8 x half> [[VRSQRTSQ_V2_I]] to <16 x i8>1430// CHECK-NEXT: [[TMP4:%.*]] = bitcast <16 x i8> [[VRSQRTSQ_V3_I]] to <8 x i16>1431// CHECK-NEXT: [[TMP5:%.*]] = bitcast <8 x i16> [[TMP4]] to <8 x half>1432// CHECK-NEXT: ret <8 x half> [[TMP5]]1433//1434float16x8_t test_vrsqrtsq_f16(float16x8_t a, float16x8_t b) {1435 return vrsqrtsq_f16(a, b);1436}1437 1438// CHECK-LABEL: define dso_local <4 x half> @test_vsub_f16(1439// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {1440// CHECK-NEXT: [[ENTRY:.*:]]1441// CHECK-NEXT: [[SUB_I:%.*]] = fsub <4 x half> [[A]], [[B]]1442// CHECK-NEXT: ret <4 x half> [[SUB_I]]1443//1444float16x4_t test_vsub_f16(float16x4_t a, float16x4_t b) {1445 return vsub_f16(a, b);1446}1447 1448// CHECK-LABEL: define dso_local <8 x half> @test_vsubq_f16(1449// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {1450// CHECK-NEXT: [[ENTRY:.*:]]1451// CHECK-NEXT: [[SUB_I:%.*]] = fsub <8 x half> [[A]], [[B]]1452// CHECK-NEXT: ret <8 x half> [[SUB_I]]1453//1454float16x8_t test_vsubq_f16(float16x8_t a, float16x8_t b) {1455 return vsubq_f16(a, b);1456}1457 1458// CHECK-LABEL: define dso_local <4 x half> @test_vfma_f16(1459// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]], <4 x half> noundef [[C:%.*]]) #[[ATTR0]] {1460// CHECK-NEXT: [[ENTRY:.*:]]1461// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>1462// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x half> [[B]] to <4 x i16>1463// CHECK-NEXT: [[TMP2:%.*]] = bitcast <4 x half> [[C]] to <4 x i16>1464// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>1465// CHECK-NEXT: [[TMP4:%.*]] = bitcast <4 x i16> [[TMP1]] to <8 x i8>1466// CHECK-NEXT: [[TMP5:%.*]] = bitcast <4 x i16> [[TMP2]] to <8 x i8>1467// CHECK-NEXT: [[TMP6:%.*]] = bitcast <8 x i8> [[TMP3]] to <4 x half>1468// CHECK-NEXT: [[TMP7:%.*]] = bitcast <8 x i8> [[TMP4]] to <4 x half>1469// CHECK-NEXT: [[TMP8:%.*]] = bitcast <8 x i8> [[TMP5]] to <4 x half>1470// CHECK-NEXT: [[TMP9:%.*]] = call <4 x half> @llvm.fma.v4f16(<4 x half> [[TMP7]], <4 x half> [[TMP8]], <4 x half> [[TMP6]])1471// CHECK-NEXT: ret <4 x half> [[TMP9]]1472//1473float16x4_t test_vfma_f16(float16x4_t a, float16x4_t b, float16x4_t c) {1474 return vfma_f16(a, b, c);1475}1476 1477// CHECK-LABEL: define dso_local <8 x half> @test_vfmaq_f16(1478// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]], <8 x half> noundef [[C:%.*]]) #[[ATTR0]] {1479// CHECK-NEXT: [[ENTRY:.*:]]1480// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>1481// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x half> [[B]] to <8 x i16>1482// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x half> [[C]] to <8 x i16>1483// CHECK-NEXT: [[TMP3:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>1484// CHECK-NEXT: [[TMP4:%.*]] = bitcast <8 x i16> [[TMP1]] to <16 x i8>1485// CHECK-NEXT: [[TMP5:%.*]] = bitcast <8 x i16> [[TMP2]] to <16 x i8>1486// CHECK-NEXT: [[TMP6:%.*]] = bitcast <16 x i8> [[TMP3]] to <8 x half>1487// CHECK-NEXT: [[TMP7:%.*]] = bitcast <16 x i8> [[TMP4]] to <8 x half>1488// CHECK-NEXT: [[TMP8:%.*]] = bitcast <16 x i8> [[TMP5]] to <8 x half>1489// CHECK-NEXT: [[TMP9:%.*]] = call <8 x half> @llvm.fma.v8f16(<8 x half> [[TMP7]], <8 x half> [[TMP8]], <8 x half> [[TMP6]])1490// CHECK-NEXT: ret <8 x half> [[TMP9]]1491//1492float16x8_t test_vfmaq_f16(float16x8_t a, float16x8_t b, float16x8_t c) {1493 return vfmaq_f16(a, b, c);1494}1495 1496// CHECK-LABEL: define dso_local <4 x half> @test_vfms_f16(1497// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]], <4 x half> noundef [[C:%.*]]) #[[ATTR0]] {1498// CHECK-NEXT: [[ENTRY:.*:]]1499// CHECK-NEXT: [[FNEG_I:%.*]] = fneg <4 x half> [[B]]1500// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>1501// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x half> [[FNEG_I]] to <4 x i16>1502// CHECK-NEXT: [[TMP2:%.*]] = bitcast <4 x half> [[C]] to <4 x i16>1503// CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>1504// CHECK-NEXT: [[TMP4:%.*]] = bitcast <4 x i16> [[TMP1]] to <8 x i8>1505// CHECK-NEXT: [[TMP5:%.*]] = bitcast <4 x i16> [[TMP2]] to <8 x i8>1506// CHECK-NEXT: [[TMP6:%.*]] = bitcast <8 x i8> [[TMP3]] to <4 x half>1507// CHECK-NEXT: [[TMP7:%.*]] = bitcast <8 x i8> [[TMP4]] to <4 x half>1508// CHECK-NEXT: [[TMP8:%.*]] = bitcast <8 x i8> [[TMP5]] to <4 x half>1509// CHECK-NEXT: [[TMP9:%.*]] = call <4 x half> @llvm.fma.v4f16(<4 x half> [[TMP7]], <4 x half> [[TMP8]], <4 x half> [[TMP6]])1510// CHECK-NEXT: ret <4 x half> [[TMP9]]1511//1512float16x4_t test_vfms_f16(float16x4_t a, float16x4_t b, float16x4_t c) {1513 return vfms_f16(a, b, c);1514}1515 1516// CHECK-LABEL: define dso_local <8 x half> @test_vfmsq_f16(1517// CHECK-SAME: <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]], <8 x half> noundef [[C:%.*]]) #[[ATTR0]] {1518// CHECK-NEXT: [[ENTRY:.*:]]1519// CHECK-NEXT: [[FNEG_I:%.*]] = fneg <8 x half> [[B]]1520// CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>1521// CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x half> [[FNEG_I]] to <8 x i16>1522// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x half> [[C]] to <8 x i16>1523// CHECK-NEXT: [[TMP3:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>1524// CHECK-NEXT: [[TMP4:%.*]] = bitcast <8 x i16> [[TMP1]] to <16 x i8>1525// CHECK-NEXT: [[TMP5:%.*]] = bitcast <8 x i16> [[TMP2]] to <16 x i8>1526// CHECK-NEXT: [[TMP6:%.*]] = bitcast <16 x i8> [[TMP3]] to <8 x half>1527// CHECK-NEXT: [[TMP7:%.*]] = bitcast <16 x i8> [[TMP4]] to <8 x half>1528// CHECK-NEXT: [[TMP8:%.*]] = bitcast <16 x i8> [[TMP5]] to <8 x half>1529// CHECK-NEXT: [[TMP9:%.*]] = call <8 x half> @llvm.fma.v8f16(<8 x half> [[TMP7]], <8 x half> [[TMP8]], <8 x half> [[TMP6]])1530// CHECK-NEXT: ret <8 x half> [[TMP9]]1531//1532float16x8_t test_vfmsq_f16(float16x8_t a, float16x8_t b, float16x8_t c) {1533 return vfmsq_f16(a, b, c);1534}1535 1536// CHECK-LABEL: define dso_local <4 x half> @test_vmul_lane_f16(1537// CHECK-SAME: <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {1538// CHECK-NEXT: [[ENTRY:.*:]]1539// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[B]] to <4 x i16>1540// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>1541// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>1542// CHECK-NEXT: [[LANE:%.*]] = shufflevector <4 x half> [[TMP2]], <4 x half> [[TMP2]], <4 x i32> <i32 3, i32 3, i32 3, i32 3>1543// CHECK-NEXT: [[MUL:%.*]] = fmul <4 x half> [[A]], [[LANE]]1544// CHECK-NEXT: ret <4 x half> [[MUL]]1545//1546float16x4_t test_vmul_lane_f16(float16x4_t a, float16x4_t b) {1547 return vmul_lane_f16(a, b, 3);1548}1549 1550// CHECK-LABEL: define dso_local <8 x half> @test_vmulq_lane_f16(1551// CHECK-SAME: <8 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {1552// CHECK-NEXT: [[ENTRY:.*:]]1553// CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[B]] to <4 x i16>1554// CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>1555// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half>1556// CHECK-NEXT: [[LANE:%.*]] = shufflevector <4 x half> [[TMP2]], <4 x half> [[TMP2]], <8 x i32> <i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3>1557// CHECK-NEXT: [[MUL:%.*]] = fmul <8 x half> [[A]], [[LANE]]1558// CHECK-NEXT: ret <8 x half> [[MUL]]1559//1560float16x8_t test_vmulq_lane_f16(float16x8_t a, float16x4_t b) {1561 return vmulq_lane_f16(a, b, 3);1562}1563 1564// CHECK-LABEL: define dso_local <4 x half> @test_vmul_n_f16(1565// CHECK-SAME: <4 x half> noundef [[A:%.*]], half noundef [[B:%.*]]) #[[ATTR0]] {1566// CHECK-NEXT: [[ENTRY:.*:]]1567// CHECK-NEXT: [[VECINIT:%.*]] = insertelement <4 x half> poison, half [[B]], i32 01568// CHECK-NEXT: [[VECINIT1:%.*]] = insertelement <4 x half> [[VECINIT]], half [[B]], i32 11569// CHECK-NEXT: [[VECINIT2:%.*]] = insertelement <4 x half> [[VECINIT1]], half [[B]], i32 21570// CHECK-NEXT: [[VECINIT3:%.*]] = insertelement <4 x half> [[VECINIT2]], half [[B]], i32 31571// CHECK-NEXT: [[MUL:%.*]] = fmul <4 x half> [[A]], [[VECINIT3]]1572// CHECK-NEXT: ret <4 x half> [[MUL]]1573//1574float16x4_t test_vmul_n_f16(float16x4_t a, float16_t b) {1575 return vmul_n_f16(a, b);1576}1577 1578// CHECK-LABEL: define dso_local <8 x half> @test_vmulq_n_f16(1579// CHECK-SAME: <8 x half> noundef [[A:%.*]], half noundef [[B:%.*]]) #[[ATTR0]] {1580// CHECK-NEXT: [[ENTRY:.*:]]1581// CHECK-NEXT: [[VECINIT:%.*]] = insertelement <8 x half> poison, half [[B]], i32 01582// CHECK-NEXT: [[VECINIT1:%.*]] = insertelement <8 x half> [[VECINIT]], half [[B]], i32 11583// CHECK-NEXT: [[VECINIT2:%.*]] = insertelement <8 x half> [[VECINIT1]], half [[B]], i32 21584// CHECK-NEXT: [[VECINIT3:%.*]] = insertelement <8 x half> [[VECINIT2]], half [[B]], i32 31585// CHECK-NEXT: [[VECINIT4:%.*]] = insertelement <8 x half> [[VECINIT3]], half [[B]], i32 41586// CHECK-NEXT: [[VECINIT5:%.*]] = insertelement <8 x half> [[VECINIT4]], half [[B]], i32 51587// CHECK-NEXT: [[VECINIT6:%.*]] = insertelement <8 x half> [[VECINIT5]], half [[B]], i32 61588// CHECK-NEXT: [[VECINIT7:%.*]] = insertelement <8 x half> [[VECINIT6]], half [[B]], i32 71589// CHECK-NEXT: [[MUL:%.*]] = fmul <8 x half> [[A]], [[VECINIT7]]1590// CHECK-NEXT: ret <8 x half> [[MUL]]1591//1592float16x8_t test_vmulq_n_f16(float16x8_t a, float16_t b) {1593 return vmulq_n_f16(a, b);1594}1595