xref: /llvm-project/llvm/test/CodeGen/SPIRV/llvm-intrinsics/maxnum.ll (revision 67d3ef74b31e1517d4f679e754cc2b3041c95901)
1; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
2
3define spir_func float @Test(float %x, float %y) {
4entry:
5  %0 = call float @llvm.maxnum.f32(float %x, float %y)
6  ret float %0
7}
8
9; CHECK: OpFunction
10; CHECK: %[[#x:]] = OpFunctionParameter %[[#]]
11; CHECK: %[[#y:]] = OpFunctionParameter %[[#]]
12; CHECK: %[[#res:]] = OpExtInst %[[#]] %[[#]] fmax %[[#x]] %[[#y]]
13; CHECK: OpReturnValue %[[#res]]
14
15declare float @llvm.maxnum.f32(float, float)
16