1 ; RUN: llc -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s
2 ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %}
3 ; CHECK: OpExtInstImport "GLSL.std.450"
5 define noundef half @test_fmax_half(half noundef %a, half noundef %b) {
7 ; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] NMax %[[#]] %[[#]]
8 %0 = call half @llvm.maxnum.f16(half %a, half %b)
12 define noundef float @test_fmax_float(float noundef %a, float noundef %b) {
14 ; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] NMax %[[#]] %[[#]]
15 %0 = call float @llvm.maxnum.f32(float %a, float %b)
19 define noundef double @test_fmax_double(double noundef %a, double noundef %b) {
21 ; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] NMax %[[#]] %[[#]]
22 %0 = call double @llvm.maxnum.f64(double %a, double %b)
26 declare half @llvm.maxnum.f16(half, half)
27 declare float @llvm.maxnum.f32(float, float)
28 declare double @llvm.maxnum.f64(double, double)