aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/ceil.ll
blob: 14ad4e6eef3f29fe622a6198bfcf2eeff9b496b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv-unknown-vulkan %s -o - | FileCheck %s
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-vulkan %s -o - -filetype=obj | spirv-val %}
; CHECK: OpExtInstImport "GLSL.std.450"

define noundef float @ceil_float(float noundef %a) {
entry:
; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] Ceil %[[#]]
  %elt.ceil = call float @llvm.ceil.f32(float %a)
  ret float %elt.ceil
}

define noundef half @ceil_half(half noundef %a) {
entry:
; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] Ceil %[[#]]
  %elt.ceil = call half @llvm.ceil.f16(half %a)
  ret half %elt.ceil
}

declare half @llvm.ceil.f16(half)
declare float @llvm.ceil.f32(float)