brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · ff0cf3e Raw
76 lines · plain
1; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_53 -mattr=+ptx42 | FileCheck %s2; RUN: %if ptxas-sm_53 && ptxas-isa-4.2 %{ llc < %s -mtriple=nvptx64 -mcpu=sm_53 -mattr=+ptx42 | %ptxas-verify -arch=sm_53 %}3 4declare half @llvm.nvvm.fma.rn.f16(half, half, half)5declare half @llvm.nvvm.fma.rn.ftz.f16(half, half, half)6declare half @llvm.nvvm.fma.rn.sat.f16(half, half, half)7declare half @llvm.nvvm.fma.rn.ftz.sat.f16(half, half, half)8declare <2 x half> @llvm.nvvm.fma.rn.f16x2(<2 x half>, <2 x half>, <2 x half>)9declare <2 x half> @llvm.nvvm.fma.rn.ftz.f16x2(<2 x half>, <2 x half>, <2 x half>)10declare <2 x half> @llvm.nvvm.fma.rn.sat.f16x2(<2 x half>, <2 x half>, <2 x half>)11declare <2 x half> @llvm.nvvm.fma.rn.ftz.sat.f16x2(<2 x half>, <2 x half>, <2 x half>)12 13; CHECK-LABEL: fma_rn_f1614define half @fma_rn_f16(half %0, half %1, half %2) {15  ; CHECK-NOT: call16  ; CHECK: fma.rn.f1617  %res = call half @llvm.nvvm.fma.rn.f16(half %0, half %1, half %2)18  ret half %res19}20 21; CHECK-LABEL: fma_rn_ftz_f1622define half @fma_rn_ftz_f16(half %0, half %1, half %2) {23  ; CHECK-NOT: call24  ; CHECK: fma.rn.ftz.f1625  %res = call half @llvm.nvvm.fma.rn.ftz.f16(half %0, half %1, half %2)26  ret half %res27}28 29; CHECK-LABEL: fma_rn_sat_f1630define half @fma_rn_sat_f16(half %0, half %1, half %2) {31  ; CHECK-NOT: call32  ; CHECK: fma.rn.sat.f1633  %res = call half @llvm.nvvm.fma.rn.sat.f16(half %0, half %1, half %2)34  ret half %res35}36 37; CHECK-LABEL: fma_rn_ftz_sat_f1638define half @fma_rn_ftz_sat_f16(half %0, half %1, half %2) {39  ; CHECK-NOT: call40  ; CHECK: fma.rn.ftz.sat.f1641  %res = call half @llvm.nvvm.fma.rn.ftz.sat.f16(half %0, half %1, half %2)42  ret half %res43}44 45; CHECK-LABEL: fma_rn_f16x246define <2 x half> @fma_rn_f16x2(<2 x half> %0, <2 x half> %1, <2 x half> %2) {47  ; CHECK-NOT: call48  ; CHECK: fma.rn.f16x249  %res = call <2 x half> @llvm.nvvm.fma.rn.f16x2(<2 x half> %0, <2 x half> %1, <2 x half> %2)50  ret <2 x half> %res51}52 53; CHECK-LABEL: fma_rn_ftz_f16x254define <2 x half> @fma_rn_ftz_f16x2(<2 x half> %0, <2 x half> %1, <2 x half> %2) {55  ; CHECK-NOT: call56  ; CHECK: fma.rn.ftz.f16x257  %res = call <2 x half> @llvm.nvvm.fma.rn.ftz.f16x2(<2 x half> %0, <2 x half> %1, <2 x half> %2)58  ret <2 x half> %res59}60 61; CHECK-LABEL: fma_rn_sat_f16x262define <2 x half> @fma_rn_sat_f16x2(<2 x half> %0, <2 x half> %1, <2 x half> %2) {63  ; CHECK-NOT: call64  ; CHECK: fma.rn.sat.f16x265  %res = call <2 x half> @llvm.nvvm.fma.rn.sat.f16x2(<2 x half> %0, <2 x half> %1, <2 x half> %2)66  ret <2 x half> %res67}68 69; CHECK-LABEL: fma_rn_ftz_sat_f16x270define <2 x half> @fma_rn_ftz_sat_f16x2(<2 x half> %0, <2 x half> %1, <2 x half> %2) {71  ; CHECK-NOT: call72  ; CHECK: fma.rn.ftz.sat.f16x273  %res = call <2 x half> @llvm.nvvm.fma.rn.ftz.sat.f16x2(<2 x half> %0, <2 x half> %1, <2 x half> %2)74  ret <2 x half> %res75}76