1 ; RUN: llc < %s -march=nvptx64 -mcpu=sm_53 -mattr=+ptx42 | FileCheck %s
2 ; RUN: %if ptxas %{ llc < %s -march=nvptx64 -mcpu=sm_53 -mattr=+ptx42 | %ptxas-verify -arch=sm_53 %}
4 declare half @llvm.nvvm.fma.rn.f16(half, half, half)
5 declare half @llvm.nvvm.fma.rn.ftz.f16(half, half, half)
6 declare half @llvm.nvvm.fma.rn.sat.f16(half, half, half)
7 declare half @llvm.nvvm.fma.rn.ftz.sat.f16(half, half, half)
8 declare <2 x half> @llvm.nvvm.fma.rn.f16x2(<2 x half>, <2 x half>, <2 x half>)
9 declare <2 x half> @llvm.nvvm.fma.rn.ftz.f16x2(<2 x half>, <2 x half>, <2 x half>)
10 declare <2 x half> @llvm.nvvm.fma.rn.sat.f16x2(<2 x half>, <2 x half>, <2 x half>)
11 declare <2 x half> @llvm.nvvm.fma.rn.ftz.sat.f16x2(<2 x half>, <2 x half>, <2 x half>)
13 ; CHECK-LABEL: fma_rn_f16
14 define half @fma_rn_f16(half %0, half %1, half %2) {
17 %res = call half @llvm.nvvm.fma.rn.f16(half %0, half %1, half %2)
21 ; CHECK-LABEL: fma_rn_ftz_f16
22 define half @fma_rn_ftz_f16(half %0, half %1, half %2) {
24 ; CHECK: fma.rn.ftz.f16
25 %res = call half @llvm.nvvm.fma.rn.ftz.f16(half %0, half %1, half %2)
29 ; CHECK-LABEL: fma_rn_sat_f16
30 define half @fma_rn_sat_f16(half %0, half %1, half %2) {
32 ; CHECK: fma.rn.sat.f16
33 %res = call half @llvm.nvvm.fma.rn.sat.f16(half %0, half %1, half %2)
37 ; CHECK-LABEL: fma_rn_ftz_sat_f16
38 define half @fma_rn_ftz_sat_f16(half %0, half %1, half %2) {
40 ; CHECK: fma.rn.ftz.sat.f16
41 %res = call half @llvm.nvvm.fma.rn.ftz.sat.f16(half %0, half %1, half %2)
45 ; CHECK-LABEL: fma_rn_f16x2
46 define <2 x half> @fma_rn_f16x2(<2 x half> %0, <2 x half> %1, <2 x half> %2) {
49 %res = call <2 x half> @llvm.nvvm.fma.rn.f16x2(<2 x half> %0, <2 x half> %1, <2 x half> %2)
53 ; CHECK-LABEL: fma_rn_ftz_f16x2
54 define <2 x half> @fma_rn_ftz_f16x2(<2 x half> %0, <2 x half> %1, <2 x half> %2) {
56 ; CHECK: fma.rn.ftz.f16x2
57 %res = call <2 x half> @llvm.nvvm.fma.rn.ftz.f16x2(<2 x half> %0, <2 x half> %1, <2 x half> %2)
61 ; CHECK-LABEL: fma_rn_sat_f16x2
62 define <2 x half> @fma_rn_sat_f16x2(<2 x half> %0, <2 x half> %1, <2 x half> %2) {
64 ; CHECK: fma.rn.sat.f16x2
65 %res = call <2 x half> @llvm.nvvm.fma.rn.sat.f16x2(<2 x half> %0, <2 x half> %1, <2 x half> %2)
69 ; CHECK-LABEL: fma_rn_ftz_sat_f16x2
70 define <2 x half> @fma_rn_ftz_sat_f16x2(<2 x half> %0, <2 x half> %1, <2 x half> %2) {
72 ; CHECK: fma.rn.ftz.sat.f16x2
73 %res = call <2 x half> @llvm.nvvm.fma.rn.ftz.sat.f16x2(<2 x half> %0, <2 x half> %1, <2 x half> %2)