| 1 |
; RUN: llvm-as %s -o %t.bc |
| 2 |
; RUN: llvm-spirv %t.bc -spirv-text -o - | FileCheck %s |
| 3 |
; RUN: llvm-spirv %t.bc -o %t.spv |
| 4 |
; RUN: spirv-val %t.spv |
| 5 |
|
| 6 |
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024" |
| 7 |
target triple = "spir64-unknown-unknown" |
| 8 |
|
| 9 |
define spir_func float @Test(float %x, float %y) { |
| 10 |
entry: |
| 11 |
%0 = call float @llvm.maxnum.f32(float %x, float %y) |
| 12 |
ret float %0 |
| 13 |
} |
| 14 |
|
| 15 |
; CHECK: Function |
| 16 |
; CHECK: FunctionParameter {{[0-9]+}} [[x:[0-9]+]] |
| 17 |
; CHECK: FunctionParameter {{[0-9]+}} [[y:[0-9]+]] |
| 18 |
; CHECK: ExtInst {{[0-9]+}} [[res:[0-9]+]] {{[0-9]+}} fmax [[x]] [[y]] |
| 19 |
; CHECK: ReturnValue [[res]] |
| 20 |
|
| 21 |
declare float @llvm.maxnum.f32(float, float) |