bolt/deps/llvm-18.1.8/llvm/test/CodeGen/SPIRV/llvm-intrinsics/maxnum.ll
2025-02-14 19:21:04 +01:00

15 lines
463 B
LLVM

; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
define spir_func float @Test(float %x, float %y) {
entry:
%0 = call float @llvm.maxnum.f32(float %x, float %y)
ret float %0
}
; CHECK: OpFunction
; CHECK: %[[#x:]] = OpFunctionParameter %[[#]]
; CHECK: %[[#y:]] = OpFunctionParameter %[[#]]
; CHECK: %[[#res:]] = OpExtInst %[[#]] %[[#]] fmax %[[#x]] %[[#y]]
; CHECK: OpReturnValue %[[#res]]
declare float @llvm.maxnum.f32(float, float)