1 ; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s
3 ; Make sure dxil operation function calls for fmin are generated for half/float/double.
5 ; CHECK-LABEL:test_fmin_half
6 define noundef half @test_fmin_half(half noundef %a, half noundef %b) {
8 ; CHECK: call half @dx.op.binary.f16(i32 36, half %{{.*}}, half %{{.*}})
9 %0 = call half @llvm.minnum.f16(half %a, half %b)
13 ; CHECK-LABEL:test_fmin_float
14 define noundef float @test_fmin_float(float noundef %a, float noundef %b) {
16 ; CHECK: call float @dx.op.binary.f32(i32 36, float %{{.*}}, float %{{.*}})
17 %0 = call float @llvm.minnum.f32(float %a, float %b)
21 ; CHECK-LABEL:test_fmin_double
22 define noundef double @test_fmin_double(double noundef %a, double noundef %b) {
24 ; CHECK: call double @dx.op.binary.f64(i32 36, double %{{.*}}, double %{{.*}})
25 %0 = call double @llvm.minnum.f64(double %a, double %b)
29 declare half @llvm.minnum.f16(half, half)
30 declare float @llvm.minnum.f32(float, float)
31 declare double @llvm.minnum.f64(double, double)