1 ; RUN: llc < %s -verify-machineinstrs -mtriple=aarch64 -mattr=+neon -mattr=+bf16 | FileCheck %s
3 declare bfloat @llvm.aarch64.neon.bfcvt(float)
4 declare <8 x bfloat> @llvm.aarch64.neon.bfcvtn(<4 x float>)
5 declare <8 x bfloat> @llvm.aarch64.neon.bfcvtn2(<8 x bfloat>, <4 x float>)
7 ; CHECK-LABEL: test_vcvth_bf16_f32
10 define bfloat @test_vcvth_bf16_f32(float %a) {
12 %vcvth_bf16_f32 = call bfloat @llvm.aarch64.neon.bfcvt(float %a)
13 ret bfloat %vcvth_bf16_f32
16 ; CHECK-LABEL: test_vcvtq_low_bf16_f32
17 ; CHECK: bfcvtn v0.4h, v0.4s
19 define <8 x bfloat> @test_vcvtq_low_bf16_f32(<4 x float> %a) {
21 %cvt = call <8 x bfloat> @llvm.aarch64.neon.bfcvtn(<4 x float> %a)
25 ; CHECK-LABEL: test_vcvtq_high_bf16_f32
26 ; CHECK: bfcvtn2 v1.8h, v0.4s
27 ; CHECK-NEXT: mov v0.16b, v1.16b
29 define <8 x bfloat> @test_vcvtq_high_bf16_f32(<4 x float> %a, <8 x bfloat> %inactive) {
31 %cvt = call <8 x bfloat> @llvm.aarch64.neon.bfcvtn2(<8 x bfloat> %inactive, <4 x float> %a)