1 ; RUN: llc < %s -march=nvptx64 -mcpu=sm_80 -mattr=+ptx70 | FileCheck %s
2 ; RUN: %if ptxas-11.0 %{ llc < %s -march=nvptx64 -mcpu=sm_80 -mattr=+ptx70 | %ptxas-verify -arch=sm_80 %}
5 ; CHECK-LABEL: cvt_rn_bf16x2_f32
6 define <2 x bfloat> @cvt_rn_bf16x2_f32(float %f1, float %f2) {
8 ; CHECK: cvt.rn.bf16x2.f32
9 %val = call <2 x bfloat> @llvm.nvvm.ff2bf16x2.rn(float %f1, float %f2);
14 ; CHECK-LABEL: cvt_rn_relu_bf16x2_f32
15 define <2 x bfloat> @cvt_rn_relu_bf16x2_f32(float %f1, float %f2) {
17 ; CHECK: cvt.rn.relu.bf16x2.f32
18 %val = call <2 x bfloat> @llvm.nvvm.ff2bf16x2.rn.relu(float %f1, float %f2);
23 ; CHECK-LABEL: cvt_rz_bf16x2_f32
24 define <2 x bfloat> @cvt_rz_bf16x2_f32(float %f1, float %f2) {
26 ; CHECK: cvt.rz.bf16x2.f32
27 %val = call <2 x bfloat> @llvm.nvvm.ff2bf16x2.rz(float %f1, float %f2);
32 ; CHECK-LABEL: cvt_rz_relu_bf16x2_f32
33 define <2 x bfloat> @cvt_rz_relu_bf16x2_f32(float %f1, float %f2) {
35 ; CHECK: cvt.rz.relu.bf16x2.f32
36 %val = call <2 x bfloat> @llvm.nvvm.ff2bf16x2.rz.relu(float %f1, float %f2);
41 declare <2 x bfloat> @llvm.nvvm.ff2bf16x2.rn(float, float)
42 declare <2 x bfloat> @llvm.nvvm.ff2bf16x2.rn.relu(float, float)
43 declare <2 x bfloat> @llvm.nvvm.ff2bf16x2.rz(float, float)
44 declare <2 x bfloat> @llvm.nvvm.ff2bf16x2.rz.relu(float, float)
46 ; CHECK-LABEL: cvt_rn_f16x2_f32
47 define <2 x half> @cvt_rn_f16x2_f32(float %f1, float %f2) {
49 ; CHECK: cvt.rn.f16x2.f32
50 %val = call <2 x half> @llvm.nvvm.ff2f16x2.rn(float %f1, float %f2);
55 ; CHECK-LABEL: cvt_rn_relu_f16x2_f32
56 define <2 x half> @cvt_rn_relu_f16x2_f32(float %f1, float %f2) {
58 ; CHECK: cvt.rn.relu.f16x2.f32
59 %val = call <2 x half> @llvm.nvvm.ff2f16x2.rn.relu(float %f1, float %f2);
64 ; CHECK-LABEL: cvt_rz_f16x2_f32
65 define <2 x half> @cvt_rz_f16x2_f32(float %f1, float %f2) {
67 ; CHECK: cvt.rz.f16x2.f32
68 %val = call <2 x half> @llvm.nvvm.ff2f16x2.rz(float %f1, float %f2);
73 ; CHECK-LABEL: cvt_rz_relu_f16x2_f32
74 define <2 x half> @cvt_rz_relu_f16x2_f32(float %f1, float %f2) {
76 ; CHECK: cvt.rz.relu.f16x2.f32
77 %val = call <2 x half> @llvm.nvvm.ff2f16x2.rz.relu(float %f1, float %f2);
82 declare <2 x half> @llvm.nvvm.ff2f16x2.rn(float, float)
83 declare <2 x half> @llvm.nvvm.ff2f16x2.rn.relu(float, float)
84 declare <2 x half> @llvm.nvvm.ff2f16x2.rz(float, float)
85 declare <2 x half> @llvm.nvvm.ff2f16x2.rz.relu(float, float)
87 ; CHECK-LABEL: cvt_rn_bf16_f32
88 define bfloat @cvt_rn_bf16_f32(float %f1) {
90 ; CHECK: cvt.rn.bf16.f32
91 %val = call bfloat @llvm.nvvm.f2bf16.rn(float %f1);
96 ; CHECK-LABEL: cvt_rn_relu_bf16_f32
97 define bfloat @cvt_rn_relu_bf16_f32(float %f1) {
99 ; CHECK: cvt.rn.relu.bf16.f32
100 %val = call bfloat @llvm.nvvm.f2bf16.rn.relu(float %f1);
105 ; CHECK-LABEL: cvt_rz_bf16_f32
106 define bfloat @cvt_rz_bf16_f32(float %f1) {
108 ; CHECK: cvt.rz.bf16.f32
109 %val = call bfloat @llvm.nvvm.f2bf16.rz(float %f1);
114 ; CHECK-LABEL: cvt_rz_relu_bf16_f32
115 define bfloat @cvt_rz_relu_bf16_f32(float %f1) {
117 ; CHECK: cvt.rz.relu.bf16.f32
118 %val = call bfloat @llvm.nvvm.f2bf16.rz.relu(float %f1);
123 declare bfloat @llvm.nvvm.f2bf16.rn(float)
124 declare bfloat @llvm.nvvm.f2bf16.rn.relu(float)
125 declare bfloat @llvm.nvvm.f2bf16.rz(float)
126 declare bfloat @llvm.nvvm.f2bf16.rz.relu(float)
128 ; CHECK-LABEL: cvt_rna_tf32_f32
129 define i32 @cvt_rna_tf32_f32(float %f1) {
131 ; CHECK: cvt.rna.tf32.f32
132 %val = call i32 @llvm.nvvm.f2tf32.rna(float %f1);
137 declare i32 @llvm.nvvm.f2tf32.rna(float)