Debian Codegraph @

llvm/test/CodeGen/SPIRV/llvm-intrinsics/ceil.ll

raw
1 ; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
2
3 ; CHECK: %[[#extinst_id:]] = OpExtInstImport "OpenCL.std"
4
5 ; CHECK: %[[#var1:]] = OpTypeFloat 32
6 ; CHECK: %[[#var2:]] = OpTypeFloat 64
7 ; CHECK: %[[#var3:]] = OpTypeVector %[[#var1]] 4
8
9 ; CHECK: OpFunction
10 ; CHECK: %[[#]] = OpExtInst %[[#var1]] %[[#extinst_id]] ceil
11 ; CHECK: OpFunctionEnd
12
13 define spir_func float @TestCeil32(float %x) local_unnamed_addr {
14 entry:
15 %0 = tail call float @llvm.ceil.f32(float %x)
16 ret float %0
17 }
18
19 ; CHECK: OpFunction
20 ; CHECK: %[[#]] = OpExtInst %[[#var2]] %[[#extinst_id]] ceil
21 ; CHECK: OpFunctionEnd
22
23 define spir_func double @TestCeil64(double %x) local_unnamed_addr {
24 entry:
25 %0 = tail call double @llvm.ceil.f64(double %x)
26 ret double %0
27 }
28
29 ; CHECK: OpFunction
30 ; CHECK: %[[#]] = OpExtInst %[[#var3]] %[[#extinst_id]] ceil
31 ; CHECK: OpFunctionEnd
32
33 define spir_func <4 x float> @TestCeilVec(<4 x float> %x) local_unnamed_addr {
34 entry:
35 %0 = tail call <4 x float> @llvm.ceil.v4f32(<4 x float> %x)
36 ret <4 x float> %0
37 }
38
39 declare float @llvm.ceil.f32(float)
40
41 declare double @llvm.ceil.f64(double)
42
43 declare <4 x float> @llvm.ceil.v4f32(<4 x float>)