Debian Codegraph @

llvm/test/CodeGen/SPIRV/hlsl-intrinsics/floor.ll

raw
1 ; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv-unknown-vulkan %s -o - | FileCheck %s
2 ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-vulkan %s -o - -filetype=obj | spirv-val %}
3
4 ; CHECK: OpExtInstImport "GLSL.std.450"
5
6 define noundef float @floor_float(float noundef %a) {
7 entry:
8 ; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] Floor %[[#]]
9 %elt.floor = call float @llvm.floor.f32(float %a)
10 ret float %elt.floor
11 }
12
13 define noundef half @floor_half(half noundef %a) {
14 entry:
15 ; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] Floor %[[#]]
16 %elt.floor = call half @llvm.floor.f16(half %a)
17 ret half %elt.floor
18 }
19
20 declare half @llvm.floor.f16(half)
21 declare float @llvm.floor.f32(float)