1 ; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
3 ; CHECK: %[[#extinst_id:]] = OpExtInstImport "OpenCL.std"
5 ; CHECK: %[[#var1:]] = OpTypeFloat 32
6 ; CHECK: %[[#var2:]] = OpTypeFloat 64
7 ; CHECK: %[[#var3:]] = OpTypeVector %[[#var1]] 4
10 ; CHECK: %[[#]] = OpExtInst %[[#var1]] %[[#extinst_id]] ceil
11 ; CHECK: OpFunctionEnd
13 define spir_func float @TestCeil32(float %x) local_unnamed_addr {
15 %0 = tail call float @llvm.ceil.f32(float %x)
20 ; CHECK: %[[#]] = OpExtInst %[[#var2]] %[[#extinst_id]] ceil
21 ; CHECK: OpFunctionEnd
23 define spir_func double @TestCeil64(double %x) local_unnamed_addr {
25 %0 = tail call double @llvm.ceil.f64(double %x)
30 ; CHECK: %[[#]] = OpExtInst %[[#var3]] %[[#extinst_id]] ceil
31 ; CHECK: OpFunctionEnd
33 define spir_func <4 x float> @TestCeilVec(<4 x float> %x) local_unnamed_addr {
35 %0 = tail call <4 x float> @llvm.ceil.v4f32(<4 x float> %x)
39 declare float @llvm.ceil.f32(float)
41 declare double @llvm.ceil.f64(double)
43 declare <4 x float> @llvm.ceil.v4f32(<4 x float>)