1 ; RUN: llc < %s -march=nvptx64 -mcpu=sm_86 -mattr=+ptx72 | FileCheck %s
2 ; RUN: %if ptxas-11.2 %{ llc < %s -march=nvptx64 -mcpu=sm_86 -mattr=+ptx72 | %ptxas-verify -arch=sm_86 %}
4 ; CHECK-LABEL: fmin_xorsign_abs_f16
5 define half @fmin_xorsign_abs_f16(half %0, half %1) {
7 ; CHECK: min.xorsign.abs.f16
8 %res = call half @llvm.nvvm.fmin.xorsign.abs.f16(half %0, half %1)
12 ; CHECK-LABEL: fmin_ftz_xorsign_abs_f16
13 define half @fmin_ftz_xorsign_abs_f16(half %0, half %1) {
15 ; CHECK: min.ftz.xorsign.abs.f16
16 %res = call half @llvm.nvvm.fmin.ftz.xorsign.abs.f16(half %0, half %1)
20 ; CHECK-LABEL: fmin_nan_xorsign_abs_f16
21 define half @fmin_nan_xorsign_abs_f16(half %0, half %1) {
23 ; CHECK: min.NaN.xorsign.abs.f16
24 %res = call half @llvm.nvvm.fmin.nan.xorsign.abs.f16(half %0, half %1)
28 ; CHECK-LABEL: fmin_ftz_nan_xorsign_abs_f16
29 define half @fmin_ftz_nan_xorsign_abs_f16(half %0, half %1) {
31 ; CHECK: min.ftz.NaN.xorsign.abs.f16
32 %res = call half @llvm.nvvm.fmin.ftz.nan.xorsign.abs.f16(half %0, half %1)
36 ; CHECK-LABEL: fmin_xorsign_abs_f16x2
37 define <2 x half> @fmin_xorsign_abs_f16x2(<2 x half> %0, <2 x half> %1) {
39 ; CHECK: min.xorsign.abs.f16x2
40 %res = call <2 x half> @llvm.nvvm.fmin.xorsign.abs.f16x2(<2 x half> %0, <2 x half> %1)
44 ; CHECK-LABEL: fmin_ftz_xorsign_abs_f16x2
45 define <2 x half> @fmin_ftz_xorsign_abs_f16x2(<2 x half> %0, <2 x half> %1) {
47 ; CHECK: min.ftz.xorsign.abs.f16x2
48 %res = call <2 x half> @llvm.nvvm.fmin.ftz.xorsign.abs.f16x2(<2 x half> %0, <2 x half> %1)
52 ; CHECK-LABEL: fmin_nan_xorsign_abs_f16x2
53 define <2 x half> @fmin_nan_xorsign_abs_f16x2(<2 x half> %0, <2 x half> %1) {
55 ; CHECK: min.NaN.xorsign.abs.f16x2
56 %res = call <2 x half> @llvm.nvvm.fmin.nan.xorsign.abs.f16x2(<2 x half> %0, <2 x half> %1)
60 ; CHECK-LABEL: fmin_ftz_nan_xorsign_abs_f16x2
61 define <2 x half> @fmin_ftz_nan_xorsign_abs_f16x2(<2 x half> %0, <2 x half> %1) {
63 ; CHECK: min.ftz.NaN.xorsign.abs.f16x2
64 %res = call <2 x half> @llvm.nvvm.fmin.ftz.nan.xorsign.abs.f16x2(<2 x half> %0, <2 x half> %1)
68 ; CHECK-LABEL: fmin_xorsign_abs_bf16
69 define bfloat @fmin_xorsign_abs_bf16(bfloat %0, bfloat %1) {
71 ; CHECK: min.xorsign.abs.bf16
72 %res = call bfloat @llvm.nvvm.fmin.xorsign.abs.bf16(bfloat %0, bfloat %1)
76 ; CHECK-LABEL: fmin_nan_xorsign_abs_bf16
77 define bfloat @fmin_nan_xorsign_abs_bf16(bfloat %0, bfloat %1) {
79 ; CHECK: min.NaN.xorsign.abs.bf16
80 %res = call bfloat @llvm.nvvm.fmin.nan.xorsign.abs.bf16(bfloat %0, bfloat %1)
84 ; CHECK-LABEL: fmin_xorsign_abs_bf16x2
85 define <2 x bfloat> @fmin_xorsign_abs_bf16x2(<2 x bfloat> %0, <2 x bfloat> %1) {
87 ; CHECK: min.xorsign.abs.bf16x2
88 %res = call <2 x bfloat> @llvm.nvvm.fmin.xorsign.abs.bf16x2(<2 x bfloat> %0, <2 x bfloat> %1)
92 ; CHECK-LABEL: fmin_nan_xorsign_abs_bf16x2
93 define <2 x bfloat> @fmin_nan_xorsign_abs_bf16x2(<2 x bfloat> %0, <2 x bfloat> %1) {
95 ; CHECK: min.NaN.xorsign.abs.bf16x2
96 %res = call <2 x bfloat> @llvm.nvvm.fmin.nan.xorsign.abs.bf16x2(<2 x bfloat> %0, <2 x bfloat> %1)
100 ; CHECK-LABEL: fmin_xorsign_abs_f
101 define float @fmin_xorsign_abs_f(float %0, float %1) {
103 ; CHECK: min.xorsign.abs.f
104 %res = call float @llvm.nvvm.fmin.xorsign.abs.f(float %0, float %1)
108 ; CHECK-LABEL: fmin_ftz_xorsign_abs_f
109 define float @fmin_ftz_xorsign_abs_f(float %0, float %1) {
111 ; CHECK: min.ftz.xorsign.abs.f
112 %res = call float @llvm.nvvm.fmin.ftz.xorsign.abs.f(float %0, float %1)
116 ; CHECK-LABEL: fmin_nan_xorsign_abs_f
117 define float @fmin_nan_xorsign_abs_f(float %0, float %1) {
119 ; CHECK: min.NaN.xorsign.abs.f
120 %res = call float @llvm.nvvm.fmin.nan.xorsign.abs.f(float %0, float %1)
124 ; CHECK-LABEL: fmin_ftz_nan_xorsign_abs_f
125 define float @fmin_ftz_nan_xorsign_abs_f(float %0, float %1) {
127 ; CHECK: min.ftz.NaN.xorsign.abs.f
128 %res = call float @llvm.nvvm.fmin.ftz.nan.xorsign.abs.f(float %0, float %1)
132 ; CHECK-LABEL: fmax_xorsign_abs_f16
133 define half @fmax_xorsign_abs_f16(half %0, half %1) {
135 ; CHECK: max.xorsign.abs.f16
136 %res = call half @llvm.nvvm.fmax.xorsign.abs.f16(half %0, half %1)
140 ; CHECK-LABEL: fmax_ftz_xorsign_abs_f16
141 define half @fmax_ftz_xorsign_abs_f16(half %0, half %1) {
143 ; CHECK: max.ftz.xorsign.abs.f16
144 %res = call half @llvm.nvvm.fmax.ftz.xorsign.abs.f16(half %0, half %1)
148 ; CHECK-LABEL: fmax_nan_xorsign_abs_f16
149 define half @fmax_nan_xorsign_abs_f16(half %0, half %1) {
151 ; CHECK: max.NaN.xorsign.abs.f16
152 %res = call half @llvm.nvvm.fmax.nan.xorsign.abs.f16(half %0, half %1)
156 ; CHECK-LABEL: fmax_ftz_nan_xorsign_abs_f16
157 define half @fmax_ftz_nan_xorsign_abs_f16(half %0, half %1) {
159 ; CHECK: max.ftz.NaN.xorsign.abs.f16
160 %res = call half @llvm.nvvm.fmax.ftz.nan.xorsign.abs.f16(half %0, half %1)
164 ; CHECK-LABEL: fmax_xorsign_abs_f16x2
165 define <2 x half> @fmax_xorsign_abs_f16x2(<2 x half> %0, <2 x half> %1) {
167 ; CHECK: max.xorsign.abs.f16x2
168 %res = call <2 x half> @llvm.nvvm.fmax.xorsign.abs.f16x2(<2 x half> %0, <2 x half> %1)
172 ; CHECK-LABEL: fmax_ftz_xorsign_abs_f16x2
173 define <2 x half> @fmax_ftz_xorsign_abs_f16x2(<2 x half> %0, <2 x half> %1) {
175 ; CHECK: max.ftz.xorsign.abs.f16x2
176 %res = call <2 x half> @llvm.nvvm.fmax.ftz.xorsign.abs.f16x2(<2 x half> %0, <2 x half> %1)
180 ; CHECK-LABEL: fmax_nan_xorsign_abs_f16x2
181 define <2 x half> @fmax_nan_xorsign_abs_f16x2(<2 x half> %0, <2 x half> %1) {
183 ; CHECK: max.NaN.xorsign.abs.f16x2
184 %res = call <2 x half> @llvm.nvvm.fmax.nan.xorsign.abs.f16x2(<2 x half> %0, <2 x half> %1)
188 ; CHECK-LABEL: fmax_ftz_nan_xorsign_abs_f16x2
189 define <2 x half> @fmax_ftz_nan_xorsign_abs_f16x2(<2 x half> %0, <2 x half> %1) {
191 ; CHECK: max.ftz.NaN.xorsign.abs.f16x2
192 %res = call <2 x half> @llvm.nvvm.fmax.ftz.nan.xorsign.abs.f16x2(<2 x half> %0, <2 x half> %1)
196 ; CHECK-LABEL: fmax_xorsign_abs_bf16
197 define bfloat @fmax_xorsign_abs_bf16(bfloat %0, bfloat %1) {
199 ; CHECK: max.xorsign.abs.bf16
200 %res = call bfloat @llvm.nvvm.fmax.xorsign.abs.bf16(bfloat %0, bfloat %1)
204 ; CHECK-LABEL: fmax_nan_xorsign_abs_bf16
205 define bfloat @fmax_nan_xorsign_abs_bf16(bfloat %0, bfloat %1) {
207 ; CHECK: max.NaN.xorsign.abs.bf16
208 %res = call bfloat @llvm.nvvm.fmax.nan.xorsign.abs.bf16(bfloat %0, bfloat %1)
212 ; CHECK-LABEL: fmax_xorsign_abs_bf16x2
213 define <2 x bfloat> @fmax_xorsign_abs_bf16x2(<2 x bfloat> %0, <2 x bfloat> %1) {
215 ; CHECK: max.xorsign.abs.bf16x2
216 %res = call <2 x bfloat> @llvm.nvvm.fmax.xorsign.abs.bf16x2(<2 x bfloat> %0, <2 x bfloat> %1)
217 ret <2 x bfloat> %res
220 ; CHECK-LABEL: fmax_nan_xorsign_abs_bf16x2
221 define <2 x bfloat> @fmax_nan_xorsign_abs_bf16x2(<2 x bfloat> %0, <2 x bfloat> %1) {
223 ; CHECK: max.NaN.xorsign.abs.bf16x2
224 %res = call <2 x bfloat> @llvm.nvvm.fmax.nan.xorsign.abs.bf16x2(<2 x bfloat> %0, <2 x bfloat> %1)
225 ret <2 x bfloat> %res
228 ; CHECK-LABEL: fmax_xorsign_abs_f
229 define float @fmax_xorsign_abs_f(float %0, float %1) {
231 ; CHECK: max.xorsign.abs.f
232 %res = call float @llvm.nvvm.fmax.xorsign.abs.f(float %0, float %1)
236 ; CHECK-LABEL: fmax_ftz_xorsign_abs_f
237 define float @fmax_ftz_xorsign_abs_f(float %0, float %1) {
239 ; CHECK: max.ftz.xorsign.abs.f
240 %res = call float @llvm.nvvm.fmax.ftz.xorsign.abs.f(float %0, float %1)
244 ; CHECK-LABEL: fmax_nan_xorsign_abs_f
245 define float @fmax_nan_xorsign_abs_f(float %0, float %1) {
247 ; CHECK: max.NaN.xorsign.abs.f
248 %res = call float @llvm.nvvm.fmax.nan.xorsign.abs.f(float %0, float %1)
252 ; CHECK-LABEL: fmax_ftz_nan_xorsign_abs_f
253 define float @fmax_ftz_nan_xorsign_abs_f(float %0, float %1) {
255 ; CHECK: max.ftz.NaN.xorsign.abs.f
256 %res = call float @llvm.nvvm.fmax.ftz.nan.xorsign.abs.f(float %0, float %1)